Skip to content

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

CommandTitleDescription
contox.loginContox: LoginAuthenticate with your Contox API key
contox.initContox: Initialize ProjectCreate .contox.json in the workspace
contox.syncContox: Sync ContextsSync the V2 brain to the sidebar tree
contox.createContox: Create ContextCreate a new context via quick pick
contox.setupContox: Setup WizardOpen the 5-step setup wizard
contox.resetContox: Reset / LogoutClear API key and configuration
contox.flushCaptureContox: Send Captured EventsManually flush the capture buffer
contox.loadMemoryContox: Load MemoryLoad brain to .contox/memory.md and inject into AI rules
contox.endSessionContox: End Session & Start NewEnd the active session and create a new one
contox.desyncContox: Disconnect (Pause Sync)Stop all background watchers
contox.connectContox: 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:

  1. Login -- Enter and validate your API key
  2. Organization -- Select your team
  3. Project -- Link to a Contox project
  4. AI Tools -- Configure Claude, Cursor, Copilot, Windsurf
  5. 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 .cursor directory exists)
  • .github/copilot-instructions.md (if the file or .github directory 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:

  1. Flushes all pending capture events
  2. Finds and closes the active session via the API
  3. Resets the capture buffer
  4. 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