Skip to content

contox export

Export your project brain to formats compatible with various AI coding tools. This lets you use Contox memory with tools that read static instruction files rather than MCP or CLI output.

Usage

bash
contox export -f <format> [options]

Options

FlagDescriptionRequiredDefault
-f, --format <format>Export formatYes--
-o, --output <path>Custom output file pathNoformat-specific default
--stdoutWrite to stdout instead of a fileNofalse

Formats

FormatDefault output pathDescription
cursorrules.cursorrulesCursor Rules file, loaded automatically by Cursor
copilot.github/copilot-instructions.mdGitHub Copilot custom instructions
markdowncontox-brain.mdPlain markdown, usable with any tool

Examples

Export for Cursor:

bash
contox export -f cursorrules

This creates a .cursorrules file in your project root that Cursor automatically reads.

Export for GitHub Copilot:

bash
contox export -f copilot

This creates .github/copilot-instructions.md, which GitHub Copilot uses for custom instructions.

Export to a custom file:

bash
contox export -f markdown -o docs/ai-context.md

Print to stdout:

bash
contox export -f markdown --stdout

When to use export

Use contox export when your AI tool reads static files rather than calling the CLI or MCP server at runtime. Common scenarios:

  • Cursor -- Reads .cursorrules at project open
  • GitHub Copilot -- Reads .github/copilot-instructions.md
  • Other tools -- Any tool that can read a markdown context file

For tools that support MCP (like Claude Code) or can execute CLI commands (like Aider), prefer using contox memory or the MCP server directly, as these always return the latest brain content.

Notes

  • Exported files are static snapshots. Run contox export again after saving new sessions or scanning your codebase to keep the file up to date.
  • Consider adding the export command to a git hook or CI step to keep the exported file current.
  • The --stdout flag is useful for piping the brain content into other commands or scripts.