Memcone CLI

Scan your repo, push project state to the cloud, and every AI session starts knowing your project automatically. No manual config. No rules files. No repeating yourself.

Install

bash
npx @memcone/cli init
npx @memcone/cli init

No global install required. Use npx in any repo.


Commands

memcone init

Scans your repo and writes .memcone/identity.json.

bash
npx @memcone/cli init
npx @memcone/cli init

Detects from: package.json, tsconfig.json, pyproject.toml, Cargo.toml, go.mod, AGENTS.md, CLAUDE.md, and lock files.

Prompts for anything it can't auto-detect (deployment platform, database, semicolons).

Important: init is useful, but it is not the main activation step. It only creates the local baseline file.

Use init when you want to:

  • inspect what Memcone detected before linking
  • commit .memcone/identity.json into the repo
  • fill in missing identity fields once up front

If you skip init, link will still detect your repo and write the file automatically.


memcone link

Links this repo to your account and pushes the full project state to the cloud.

bash
npx @memcone/cli link
npx @memcone/cli link

What it does:

  1. Prompts for your API key (saved to ~/.memcone/credentials — never committed)
  2. Creates or finds a matching project on your account
  3. Sets it as the active project
  4. Pushes identity fields, detected stack, and rules from AGENTS.md / CLAUDE.md / .cursorrules
  5. Uploads local skills from folders like .agents/skills/, .claude/skills/, .cursor/skills/, .codex/skills/, and skills/
  6. MCP installs: interactive link always shows a picker so you choose which editors (VS Code, Cursor, Claude Code, Windsurf, Zed, …) get Memcone MCP. Non‑TTY (scripts) defaults to .vscode/mcp.json only — set MEMCONE_MCP=vscode,cursor,… or run in a normal terminal to choose; MEMCONE_LINK_SKIP_MCP=1 skips MCP entirely.

Get your API key at memcone.com/dashboard/keys when you run link the first time, then the CLI stores it. After that, your tools talk to Memcone; you keep using your AI as usual.

If you only remember one command, remember this one.


memcone sync

Rescans your repo and pushes only what changed.

bash
npx @memcone/cli sync
npx @memcone/cli sync

Run this after:

  • Adding a new dependency
  • Updating AGENTS.md or CLAUDE.md
  • Making a major architectural decision
  • Installing or editing local skills
  • Moving important systems or changing project structure

sync updates:

  • identity fields
  • context files and rules
  • local skills
  • architecture map

Output shows each section separately:

text
  Identity: up to date
  Rules:    updated from AGENTS.md
  Skills:   3 from local dirs
✓ Synced. Bootstrap context updated.
  Identity: up to date
  Rules:    updated from AGENTS.md
  Skills:   3 from local dirs
✓ Synced. Bootstrap context updated.

memcone doctor

Shows detected stack, cloud sync status, and MCP configuration.

bash
npx @memcone/cli doctor
npx @memcone/cli doctor --verbose   # include source file for each field
npx @memcone/cli doctor
npx @memcone/cli doctor --verbose   # include source file for each field

Checks:

  • Stack detected from repo files
  • .memcone/identity.json present and linked
  • API key valid + reachable
  • MCP configured in Claude / Cursor / Windsurf

What gets detected

| Source | What's extracted | |---|---| | package.json | language, framework, auth, ORM, payments, styling, package manager | | tsconfig.json | strict mode | | pyproject.toml | language, framework, package manager, formatter | | Cargo.toml | language, project name | | go.mod | language, project name | | AGENTS.md / CLAUDE.md / .cursorrules | full content stored as Hard Rules + facts extracted | | Lock files | package manager (authoritative) | | vercel.json / fly.toml / railway.json | deployment platform |


The .memcone/ directory

text
your-repo/
  .memcone/
    identity.json    # safe to commit — no secrets
your-repo/
  .memcone/
    identity.json    # safe to commit — no secrets

identity.json is human-readable and safe to commit. It doesn't contain your API key. Example:

json
{
  "_version": 1,
  "_projectId": "abc123",
  "projectName": "my-saas",
  "stack": {
    "language": "typescript",
    "framework": "Next.js App Router",
    "auth": "Better Auth",
    "orm": "Drizzle ORM",
    "payments": "Stripe",
    "packageManager": "pnpm",
    "database": "Neon (PostgreSQL)"
  },
  "conventions": {
    "strictMode": true
  },
  "_sources": {
    "language": "package_json",
    "framework": "package_json",
    "auth": "package_json"
  }
}
{
  "_version": 1,
  "_projectId": "abc123",
  "projectName": "my-saas",
  "stack": {
    "language": "typescript",
    "framework": "Next.js App Router",
    "auth": "Better Auth",
    "orm": "Drizzle ORM",
    "payments": "Stripe",
    "packageManager": "pnpm",
    "database": "Neon (PostgreSQL)"
  },
  "conventions": {
    "strictMode": true
  },
  "_sources": {
    "language": "package_json",
    "framework": "package_json",
    "auth": "package_json"
  }
}

What gets injected at session start

After memcone link, every new chat in Cursor, Claude Code, or VS Code opens with the full bootstrap context already loaded — in this exact order:

text
## Project Identity
language: typescript
framework: Next.js App Router
packageManager: pnpm
strictMode: true

## Hard Rules
[verbatim content from AGENTS.md / CLAUDE.md]

## Architecture
auth: Better Auth
orm: Drizzle ORM
database: Neon (PostgreSQL)
payments: Stripe

## Key Decisions
- We use Drizzle over Prisma because of better edge compatibility
- Deploy to Vercel, not Railway, for preview URLs

## Working Memory
[retrieved from past sessions, filtered to current task]
## Project Identity
language: typescript
framework: Next.js App Router
packageManager: pnpm
strictMode: true

## Hard Rules
[verbatim content from AGENTS.md / CLAUDE.md]

## Architecture
auth: Better Auth
orm: Drizzle ORM
database: Neon (PostgreSQL)
payments: Stripe

## Key Decisions
- We use Drizzle over Prisma because of better edge compatibility
- Deploy to Vercel, not Railway, for preview URLs

## Working Memory
[retrieved from past sessions, filtered to current task]

No userId. No per-session config. No manual calls. The state flows from repo → cloud → every new chat, automatically.

Set up MCP to connect your AI tools.