Documentation

Everything you need to know about ContextSync CLI commands and features.

Installation

One-line Install

The fastest way to install ContextSync on macOS or Linux:

curl -fsSL https://contextsync.yangqing.one/install | sh

Homebrew

Install via Homebrew on macOS:

brew install contextsync

Manual Download

Download the latest release for your platform from GitHub Releases.

Quick Start

Get up and running in under a minute:

# Login to your account
contextsync login
# Initialize and configure your AI tools
contextsync init
# Start the MCP server (usually auto-started by AI tools)
contextsync server

Commands

contextsync login

Login to your ContextSync account using email verification. You will receive a 6-digit verification code via email.

contextsync login

After verification, your account will be linked to your device.

contextsync logout

Logout from your ContextSync account on this device.

contextsync logout

contextsync init

Initialize ContextSync and configure all detected AI coding tools. This command will:

  • Create the ~/.contextsync directory structure
  • Initialize the SQLite database
  • Detect installed AI tools (12+ supported)
  • Configure MCP server for each tool (Free: max 2 tools)
  • Create default rules file
contextsync init

Pro users can configure unlimited tools. Free tier is limited to 2 tools.

contextsync status

Show current status including version, account, license tier, device info, memory stats, and configured tools.

contextsync status

contextsync doctor

Run diagnostics to check your ContextSync installation, configuration, and detected AI tools.

contextsync doctor

Use this command to troubleshoot issues with your installation.

contextsync server

Start the Model Context Protocol (MCP) server. This provides tools and resources for AI coding assistants:

  • get_memories - Retrieve relevant memories
  • save_memory - Save important context (Pro)
  • get_rules - Get current coding rules
  • list_memories - List all memories
contextsync server

This is typically called automatically by AI tools configured with ContextSync.

contextsync upgrade

Upgrade to ContextSync Pro. Opens the pricing page in your browser.

contextsync upgrade

Pro unlocks unlimited tools, permanent memory, and cloud sync.

contextsync activate <license-key>

Activate a Pro license key on your device.

contextsync activate YOUR_LICENSE_KEY

contextsync rules

Manage your coding rules. Rules are synced across all configured AI tools.

# Edit rules file
contextsync rules edit
# Display current rules
contextsync rules show
# Sync rules to all tools
contextsync rules sync

Rules file is located at ~/.contextsync/rules.md

contextsync memories

Manage your stored memories.

# List all memories
contextsync memories list
# Show a specific memory
contextsync memories show <id>
# Delete a memory
contextsync memories delete <id>

contextsync version

Print version information.

contextsync version

contextsync update

Update ContextSync CLI to the latest version from GitHub releases. This command will:

  • Check for the latest version on GitHub
  • Download the new binary for your platform
  • Automatically replace the current installation
contextsync update

If installed in a system directory like /usr/local/bin, you may need to run with sudo.

Features

Free Tier

  • 2 AI tools
  • 14-day memory retention
  • Read-only memory access
  • Local SQLite storage
  • Cloud sync
  • Save new memories

Pro Tier

  • All 12+ AI tools
  • Permanent memory retention
  • Unlimited memory storage
  • Cloud sync across devices
  • Save new memories
  • Priority support

Supported Tools

ContextSync integrates with the following AI coding tools via MCP protocol:

Claude Code Native MCP
Cursor Native MCP
Windsurf Native MCP
Gemini CLI Native MCP
GitHub Copilot MCP Support
Cline / Roo Code MCP Support
Codex CLI MCP Support
Aider MCP Support
Zed MCP Support
Continue MCP Support
Replit AI MCP Support

Configuration

Directory Structure

~/.contextsync/
├── config.json # Configuration file
├── rules.md # Coding rules
├── data/
│ └── memories.db # SQLite database
├── backups/ # Backup directory
└── logs/ # Log files

Global Flags

--config string Config file (default is $HOME/.contextsync/config.json)
-v, --verbose Verbose output

Need Help?

If you have questions or encounter issues: