Commands Reference
The Contox VS Code extension provides 11 commands, all accessible from the Command Palette (Ctrl+Shift+P or Cmd+Shift+P).
All commands
| Command | Title | Description |
|---|---|---|
contox.login | Contox: Login | Authenticate with your Contox API key |
contox.init | Contox: Initialize Project | Create .contox.json in the workspace |
contox.sync | Contox: Sync Contexts | Sync the V2 brain to the sidebar tree |
contox.create | Contox: Create Context | Create a new context via quick pick |
contox.setup | Contox: Setup Wizard | Open the 5-step setup wizard |
contox.reset | Contox: Reset / Logout | Clear API key and configuration |
contox.flushCapture | Contox: Send Captured Events | Manually flush the capture buffer |
contox.loadMemory | Contox: Load Memory | Load brain to .contox/memory.md and inject into AI rules |
contox.endSession | Contox: End Session & Start New | End the active session and create a new one |
contox.desync | Contox: Disconnect (Pause Sync) | Stop all background watchers |
contox.connect | Contox: Reconnect (Resume Sync) | Restart background watchers |
Command details
contox.login
Prompts for your Contox API key and stores it in VS Code's SecretStorage. The key is validated against the API before being saved. If invalid, an error is shown and the key is not stored.
contox.init
Creates a .contox.json file in the workspace root. Prompts for team ID and either creates a new project or links to an existing one. This file contains the team ID, project ID, and project name that all other commands use.
contox.sync
Fetches the V2 brain tree from the Contox API and updates the sidebar panel. The status bar shows a syncing indicator during the operation. This command runs automatically on workspace load if the project is configured.
contox.create
Opens a quick pick dialog for creating a new context. Enter a name and optional description. The context is created via the API and the sidebar tree refreshes.
contox.setup
Opens the setup wizard -- a 5-step webview panel that guides you through the full configuration:
- Login -- Enter and validate your API key
- Organization -- Select your team
- Project -- Link to a Contox project
- AI Tools -- Configure Claude, Cursor, Copilot, Windsurf
- Scan -- Optionally run a first codebase scan
If you are already logged in, the wizard skips directly to the team selection step.
contox.reset
Clears the stored API key from SecretStorage and removes local configuration. Use this to disconnect from Contox or switch accounts.
contox.flushCapture
Manually sends all buffered capture events (commits, file saves, active editor files) to the Contox V2 ingest API. Normally, events are flushed automatically after commits, pushes, idle timeouts, or volume thresholds. This command is useful for forcing an immediate send.
contox.loadMemory
Fetches the brain document from the API and writes it to .contox/memory.md in the workspace. Then injects the brain content into all detected AI rule files:
.cursorrules(if the file or.cursordirectory exists).github/copilot-instructions.md(if the file or.githubdirectory exists).windsurfrules(if the file exists).clinerules(if the file exists)
Injection uses <!-- contox:start --> and <!-- contox:end --> markers. Content outside the markers is preserved.
contox.endSession
Ends the current active session:
- Flushes all pending capture events
- Finds and closes the active session via the API
- Resets the capture buffer
- Creates a new session immediately
This is useful when you want to explicitly mark a session boundary.
contox.desync
Pauses all background activity:
- Stops the session watcher (no more session polling)
- Stops the git watcher (no more event capture)
- Shows a disconnected state in the status bar
This preference is persisted -- if you restart VS Code while desynced, the extension stays disconnected.
contox.connect
Resumes background activity after a desync:
- Restarts the session watcher
- Restarts the git watcher
- Clears the disconnected state
Next steps
- Settings -- All 7 configurable settings
- Auto Capture -- How the git watcher works