Files
cortex/extension/README.md
omigamedev f21426fc43 Add browser extension and shell completions (Milestones 12-13)
M12: Browser Extension
- Chrome/Edge Manifest V3 extension
- Popup UI for saving pages
- Context menu integration (save page/selection/link)
- Background service worker
- Content script for extraction

M13: Shell Completions
- Bash, Zsh, Fish, PowerShell completions
- Dynamic node ID completion
- Dynamic tag completion
- Dynamic graph completion
- Auto-install command (--install)
2026-02-03 11:35:41 +01:00

76 lines
1.7 KiB
Markdown

# Cortex Browser Extension
Save web content directly to your Cortex knowledge graph.
## Features
- One-click save from any webpage
- Right-click context menu integration
- Save selected text only
- Auto-extract page title and content
- Tag suggestions based on URL
## Installation
### Chrome / Edge
1. Open `chrome://extensions` (or `edge://extensions`)
2. Enable "Developer mode" in the top right
3. Click "Load unpacked"
4. Select this `extension` folder
### Firefox
1. Open `about:debugging`
2. Click "This Firefox"
3. Click "Load Temporary Add-on"
4. Select `manifest.json` from this folder
## Usage
### Popup
1. Click the Cortex icon in your browser toolbar
2. Edit the title and tags as needed
3. Choose whether to include page content
4. Click "Save"
### Context Menu
- **Save page**: Right-click anywhere on a page → "Save page to Cortex"
- **Save selection**: Select text, right-click → "Save selection to Cortex"
- **Save link**: Right-click a link → "Save link to Cortex"
## Requirements
The Cortex server must be running for the extension to work:
```bash
cortex serve
```
By default, the extension connects to `http://localhost:3100/api`.
## Development
The extension uses Manifest V3 and consists of:
- `manifest.json` - Extension configuration
- `popup/` - Popup UI (HTML, CSS, JS)
- `background/` - Service worker for context menus
- `content/` - Content script for page extraction
- `icons/` - Extension icons
## Icon Generation
To generate PNG icons from the SVG:
```bash
# Using ImageMagick
convert icons/icon.svg -resize 16x16 icons/icon-16.png
convert icons/icon.svg -resize 48x48 icons/icon-48.png
convert icons/icon.svg -resize 128x128 icons/icon-128.png
```
Or use an online SVG to PNG converter.