Skip to content

Cline, Aider, Antigravity & Other Tools

Contox works with any AI coding tool that can read context from files or supports MCP. For tools without a dedicated integration, the CLI export command and the .contox/memory.md brain document provide universal access to project memory.

Cline

Cline supports both MCP and file-based integration.

MCP setup (recommended): Cline supports MCP servers natively. Configure the Contox MCP server in Cline's MCP settings with the same environment variables used for Claude:

  • CONTOX_API_KEY -- Your API key
  • CONTOX_API_URL -- https://contox.dev
  • CONTOX_TEAM_ID -- Your team ID
  • CONTOX_PROJECT_ID -- Your project ID

This gives Cline access to all 21 Contox tools.

File-based setup: Cline also reads a .clinerules file. The Contox VS Code extension automatically injects the brain document into .clinerules when a .clinerules file or .cline directory exists in your workspace. The injection uses the same <!-- contox:start --> / <!-- contox:end --> markers as other tools.

Aider

Aider can read context from files passed to it. Use the CLI to export the brain:

bash
contox export -f markdown

This creates a contox-brain.md file in your project root. You can then include it in your Aider session:

bash
aider --read contox-brain.md

Alternatively, pipe the brain directly:

bash
contox export -f markdown --stdout | aider --message-file -

At the end of your session, save your work:

bash
contox save "Brief summary of what was accomplished"

Antigravity

Antigravity can read project context from markdown files. Export the brain document:

bash
contox export -f markdown

Then reference contox-brain.md in your Antigravity configuration or include it as context when starting a session.

Generic setup for any tool

Any AI coding tool can use Contox memory if it can read files. The universal approach:

1. Export the brain document:

bash
contox export -f markdown

2. Load memory before your session:

bash
contox memory

This prints the full brain document to stdout. Pipe it into your tool or save it to a file your tool can read.

3. Save at session end:

bash
contox save "Brief summary of what was accomplished"

For structured saves with categorized changes:

bash
echo '{"summary":"Built auth flow","changes":[{"category":"implementation","title":"JWT auth","content":"Implemented JWT-based authentication with refresh tokens"}]}' | contox save --json

The .contox/memory.md file

When the VS Code extension runs contox.loadMemory, it writes the brain document to .contox/memory.md in your workspace. Any AI tool that can read workspace files can access this. The file is automatically refreshed on each sync.

CLI export formats

The contox export command supports multiple output formats:

FormatFlagOutput FileDescription
Cursor rules-f cursorrules.cursorrulesCursor-compatible rules file
Copilot instructions-f copilot.github/copilot-instructions.mdGitHub Copilot instructions
Windsurf rules-f windsurfrules.windsurfrulesWindsurf-compatible rules file
Markdown-f markdowncontox-brain.mdPlain markdown brain document

Add --stdout to any format to print the output instead of writing a file:

bash
contox export -f markdown --stdout

CLAUDE.md as a universal context file

Contox also maintains a CLAUDE.md file with the brain summary injected between markers. Since many AI tools can read markdown files from the workspace root, CLAUDE.md serves as an additional context source even for non-Claude tools.

Next steps