Katphi Browser
An open-source, privacy-first desktop browser built in Python with PySide6 and Qt WebEngine. Includes a modular plugin system, Tor support, and advanced privacy controls — all in a clean, minimal interface.
Overview
Katphi Browser is a desktop web browser designed for developers, researchers, and privacy-conscious users. It combines the rendering power of Qt WebEngine (Chromium) with a rich set of built-in tools: a hierarchical bookmark manager, a password manager, a screenshot suite, Tor integration, and an extensible plugin system.
The base browser is free and open source. All core features — including Tor integration, privacy tools, and the built-in plugins (Themes, Split View, Pentesting Suite) — work locally without an account.
Built-in ad/tracker blocking, Tor routing, user-agent spoofing, and multiple privacy profiles.
Encrypted local storage, auto-fill detection, password generator, and breach checking.
Tab groups, session restore, tab search, movable/closable tabs with full keyboard control.
Hierarchical folder tree, drag-and-drop, search, and HTML export compatible with Firefox/Chrome.
Open architecture for third-party plugins, loaded dynamically at runtime with no browser restart required.
Tech Stack
Katphi is written entirely in Python 3.10+ and relies on a focused set of dependencies:
| Layer | Technology | Purpose |
|---|---|---|
| UI Framework | PySide6 only | Widgets, signals/slots, layouts (PyQt5/PyQt6 are not compatible) |
| Web Engine | QWebEngineView | Chromium-based page rendering |
| Privacy | stem + PySocks | Tor SOCKS5 proxy routing |
| Encryption | cryptography (Fernet/PBKDF2) | Password vault encryption |
| Auth | JWT + PyJWT | Account login and session tokens |
| Storage | SQLite3 + QSettings | Bookmarks, passwords, session, preferences |
| Networking | requests | Backend API communication |
Runtime requirements
Installation
-
1Get the source code
Clone or download the project into a folder containing
main.py,requirements.txt, andconfig.yaml. -
2Create and activate a virtual environment
A virtual environment isolates Katphi's dependencies from the system Python and avoids the
externally-managed-environmenterror on modern Linux distros.# Linux / macOS python3 -m venv venv source venv/bin/activate python -m pip install --upgrade pip setuptools wheel # Windows (PowerShell / CMD) python -m venv venv_win venv_win\Scripts\activate.bat
-
3Install PySide6 first, explicitly
When installing everything from
requirements.txtat once,pipcan be interrupted by a heavy optional package (e.g.chromadb,sentence-transformers) before it reaches PySide6, leaving the environment without it. Install and verify PySide6 on its own first:pip install --upgrade "PySide6>=6.5.0" python3 -c "from PySide6.QtWebEngineWidgets import QWebEngineView; print('PySide6 OK')"
Only PySide6 is supported — PyQt5 and PyQt6 are not recognised by the codebase and must not be installed alongside it.
-
4Install the remaining dependencies
pip install -r requirements.txtOn Linux, PySide6 and Qt WebEngine also need native system libraries (
libxcb-cursor0,libnss3,libgl1-mesa-glx, and similar) — seeINSTALACION.mdin the project root for the full per-distro list. -
5Install Playwright browsers (optional)
Only needed for the Advanced Scraping plugin's Playwright mode.
playwright install chromium -
6Run the browser
python3 main.py
python3 check_dependencies.py to verify PySide6, Qt WebEngine, and the optional packages are installed correctly before starting.
Verify the connection to the backend
python3 verificar_conexion_backend.py
This checks reachability of the Katphi API server (required for account login, session sync, and plugin distribution).
Tab Management
Katphi uses a custom tab bar built on QTabWidget
with a + button that always appears immediately after the last tab.
Tabs are movable, closable, and can be searched in real time from the toolbar.
Key capabilities
All open tabs are saved when the browser closes and restored on the next launch (requires login).
Organise related tabs into named groups with a dedicated Tab Groups panel.
Filter all open tabs instantly by typing in the search field in the toolbar.
Reopen the last closed tab with Ctrl+Shift+T.
Per-tab privacy profiles
Each tab can be associated with a different browser profile, which means separate cookies, storage, and network settings. This allows you to be logged into the same site with different accounts simultaneously.
Bookmarks
The bookmark system offers a hierarchical folder tree stored in a local SQLite database. It replaces the flat bookmark list common in most browsers with a proper nested folder structure.
| Feature | Details |
|---|---|
| Folder tree | Unlimited nesting depth. Create, rename, delete folders via right-click context menu. |
| Move bookmarks | Move items between folders from the context menu. |
| Quick search | Filter bookmarks and folders by title or URL in real time. |
| Open bookmark | Double-click a bookmark to open it in the current tab. |
| Add from toolbar | Click the bookmark icon in the nav bar to save the current page. Choose the destination folder. |
| Favourites bar | A separate horizontal bar below the nav bar for quick one-click access. Toggle with the heart icon. |
| Export to HTML | Export all bookmarks as a standard HTML file compatible with Firefox, Chrome, and Edge. |
Automatic migration
On first launch, if a flat bookmark database from an older version is detected, Katphi automatically migrates it to the new hierarchical format without data loss.
History
Browsing history is stored locally in SQLite. The History panel (accessible from the nav bar or Ctrl+H) shows a time-sorted list of visited pages with search and delete capabilities.
History is linked to the user's session. When the user is not logged in, history is cleared on browser close for added privacy.
Downloads
The Download Manager panel (Ctrl+J) shows all active and completed downloads with progress bars, file size information, and open/reveal-in-folder actions.
Downloads are handled by Qt's native download mechanism and stored in the system's
default Downloads folder.
Password Manager
Katphi includes a built-in encrypted password manager that stores credentials locally using Fernet symmetric encryption derived from a master password via PBKDF2-HMAC-SHA256.
All credentials stored in an encrypted SQLite database. Never sent to any server.
A non-intrusive banner appears below the nav bar when credentials are detected on a form submit.
Generate strong, customisable passwords with configurable length, symbols, and complexity.
Credentials are stored per URL origin (scheme + host + port) for precise auto-fill.
Find in Page
Press Ctrl+F to open the Find bar. It appears below the nav bar and highlights all matches on the current page. Use Enter / Shift+Enter to cycle through matches, or press Esc to close.
The find system wraps Qt WebEngine's native text search, supporting case-sensitive matching and real-time highlighting as you type.
Screenshots
Katphi ships with a three-mode screenshot suite accessible from the main menu or via keyboard shortcuts.
| Mode | Shortcut | Description |
|---|---|---|
| Full page | Ctrl+Shift+S |
Captures the entire visible area of the current tab. |
| Region select | Via main menu | Click-and-drag to select any rectangular region of the screen. |
| Element select | Via main menu | Click any element in the page to capture it precisely. |
All screenshots are saved as PNG files. An annotation editor allows you to draw, add text, and highlight areas before saving.
Privacy & Ad Blocking
Katphi includes a built-in network interceptor that operates at the Qt WebEngine request level, blocking ads and trackers before they are loaded.
| Feature | Description |
|---|---|
| Ad blocking | EasyList-compatible ABP filter rules. Blocks display ads network-wide. |
| Tracker blocking | EasyPrivacy rules block analytics and tracking pixels. |
| User-agent spoofing | Choose from Chrome, Firefox, Safari, or custom user-agent strings to prevent browser fingerprinting. |
| Cookie controls | Block third-party cookies, clear cookies on close, or disable all cookies per-profile. |
| JavaScript toggle | Disable JavaScript globally or per-site. |
| Referrer control | Strip or spoof the HTTP Referer header. |
| HTTPS preference | Prefer HTTPS connections automatically where available. |
| Filter updates | Block-lists can be updated from the Privacy panel. |
Tor Network
Katphi includes native Tor support via the stem library and a SOCKS5 proxy routed through a local Tor daemon. It follows the same workflow as Tor Browser: the user activates Tor → bootstrap → automatic browser restart with all traffic routed through Tor.
How to use Tor
-
1Install the Tor daemon
On Linux:
sudo apt install tor. The daemon must be running on ports9150(SOCKS) and9151(control). -
2Open the Tor panel
Click the Tor icon in the left sidebar or navigate to the Tor section in Settings.
-
3Click "Connect"
The panel shows a bootstrap progress bar. When it reaches 100%, the browser restarts with all network traffic routed through Tor.
-
4Get a new identity
Click "New Identity" to request a fresh Tor circuit and a new exit IP address without restarting.
User Profiles
Profiles provide separate browser environments: cookies, local storage, cache, and privacy settings are completely isolated between profiles.
Switch profiles from the toolbar profile switcher (visible at window widths above 750 px). Each tab can optionally be pinned to a specific profile, allowing you to be logged into the same site with different accounts simultaneously.
Practical uses
- Personal vs. work browsing in the same window
- Testing web apps with different user accounts
- Separating social media sessions
- Research profiles with specific privacy settings
User Scripts
Katphi supports custom JavaScript injection into pages via its
User Script Manager. Scripts are injected at page load time using
Qt WebEngine's QWebEngineScript API.
Access the User Script Manager from the main menu. You can create, edit, enable, disable, and delete scripts. Each script targets a URL pattern and runs either at document start or document end.
Themes
Katphi's appearance is controlled by a centralised ThemeEngine
(ui/core/theme_engine.py) that reads JSON theme files and applies
design tokens across all UI components in real time.
| Token | Dark | Light | Purpose |
|---|---|---|---|
surface_0 | #1A1A1A | #F5F5F5 | Primary background |
surface_1 | #222222 | #FFFFFF | Cards and panels |
accent | #4B9EFF | #2563EB | Interactive elements |
text_primary | #F0F0F0 | #1A1A1A | Main text |
text_secondary | #A0A0A0 | #666666 | Secondary text |
border | rgba(255,255,255,0.08) | rgba(0,0,0,0.10) | Subtle borders |
Theme changes are broadcast via Qt signals, so every panel and widget updates
instantly without a restart. Custom themes can be created as JSON files in the
ui/themes/ directory.
Search Engines
The Search Engine Manager lets you define and switch the active search engine from a button in the toolbar. Katphi ships with several pre-configured engines and allows you to add custom ones.
You can also switch the engine temporarily for a single search by clicking the engine button and selecting an alternative — the default engine is not changed.
Split View
The Split View plugin (free, built-in) adds a persistent side panel to the right of the main content area. It behaves like an independent browser tab with its own navigation bar, URL input, back/forward/reload controls, and full context menu support.
How to activate
Right-click any tab in the tab bar and choose "Open in Split View". The Split View panel appears to the right of the current tabs. You can browse normally in the main area while the Split View keeps its own page visible.
Full back/forward/reload controls and URL bar — browse independently from the main tabs.
Right-click any link in the Split View to open it in a main browser tab.
The last URL loaded in the Split View is remembered across browser sessions.
Drag the splitter handle to adjust how much space the Split View takes.
Plugin System
Katphi's plugin system is designed for extensibility. Any developer
can build a plugin and distribute it freely. Plugins are loaded dynamically at runtime
from the plugins/ directory, with no browser restart required after
installation.
How plugins work
-
1Discovery
The Plugin Manager scans
plugins/at startup and reads each plugin'splugin_info.jsonfor its metadata. -
2Load
The manager imports
plugin.pyviaimportliband callsinitialize_plugin(). -
3Integration
The plugin receives a reference to the browser window and can add panels, sidebar buttons, toolbar actions, and page hooks.
Built-in plugins
Adds a persistent side panel with a full independent browser. Keep any page visible while browsing in the main tabs. Includes navigation controls, URL bar, context menu, and session persistence.
Visual theme selector and editor integrated with the browser's ThemeEngine. Supports light, dark, and fully custom themes with a real-time preview editor, colour picker, font/spacing controls, and theme import/export.
Ethical hacking and security-testing toolkit: SQL injection and XSS payload libraries, a security header scanner, form detection/auto-fill, a JavaScript console, and a passive vulnerability scanner.
Building your own plugin
Katphi's plugin API is fully documented. Any Python developer can create a plugin that adds panels, toolbar buttons, page hooks, or entirely new features to the browser.
Refer to the Plugin Development Guide for the complete API reference, code templates, and step-by-step tutorials.
Developer Tools
Press F12 to open the built-in DevTools panel, powered by Qt WebEngine's Chromium DevTools integration. It docks to the right or bottom of the window and provides the full Chromium DevTools experience: Elements, Console, Network, Sources, Performance, and more.
You can also open DevTools from the right-click context menu on any page by selecting "Inspect".
View Page Source
Press Ctrl+U to open the raw HTML source of the current page in a new tab.
Log Viewer
The Log Viewer panel shows all internal browser log messages in real time with colour-coded severity levels.
| Level | Colour | Meaning |
|---|---|---|
DEBUG | Blue-grey | Verbose diagnostic info |
INFO | Green | Normal operation events |
WARNING | Amber | Non-critical issues |
ERROR | Red | Recoverable errors |
CRITICAL | Purple | Fatal or severe issues |
Features: real-time auto-scroll, filter by level and module name, full-text search, and export to a plain-text file. Logs are also written to katphi_browser.log on disk with automatic rotation.
Keyboard Shortcuts
Navigation
Page
Panels & Tools
Configuration
All persistent settings are stored in config.yaml at the project root.
The file is loaded at startup by config_manager.py. You can edit it
with any text editor; changes take effect on the next browser launch.
| Section | Key settings |
|---|---|
| backend | primary_url — the Katphi API server address used for authentication and plugin distribution. |
| frontend | url, login_url, registration_url, dashboard_url — links to the Katphi web portal. |
| database | Paths to the bookmark (bookmarks.db), password (passwords.db), and session (session.db) SQLite files. |
| logging | Log level (INFO by default), log file path, max file size (10 MB), and backup count (3). |
| network | Connection timeout (10 s), health check interval (30 s), network mode. |
| plugins | Plugin directory, backup directory, checksum validation, cache duration (300 s). |
| security | JWT algorithm, token expiry, secret key. Change the secret key in production. |
| tor | SOCKS port (9150), control port (9151), enabled flag. |
Sensitive values
Katphi does not read a .env file. AI provider keys (Anthropic, llmapi.ai, HuggingFace)
are entered directly in the browser's AI settings panel and stored locally via Qt's
QSettings — never in a plain-text file. The only value you should change by hand in
config.yaml is security.secret_key, which ships with a placeholder and
must be replaced before any production-like use.