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
npx @memcone/cli initnpx @memcone/cli initNo global install required. Use npx in any repo.
Commands
memcone init
Scans your repo and writes .memcone/identity.json.
npx @memcone/cli initnpx @memcone/cli initDetects 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.jsoninto 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.
npx @memcone/cli linknpx @memcone/cli linkWhat it does:
- Prompts for your API key (saved to
~/.memcone/credentials— never committed) - Creates or finds a matching project on your account
- Sets it as the active project
- Pushes identity fields, detected stack, and rules from
AGENTS.md/CLAUDE.md/.cursorrules - Uploads local skills from folders like
.agents/skills/,.claude/skills/,.cursor/skills/,.codex/skills/, andskills/ - MCP installs: interactive
linkalways 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.jsononly — setMEMCONE_MCP=vscode,cursor,…or run in a normal terminal to choose;MEMCONE_LINK_SKIP_MCP=1skips 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.
npx @memcone/cli syncnpx @memcone/cli syncRun this after:
- Adding a new dependency
- Updating
AGENTS.mdorCLAUDE.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:
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.
npx @memcone/cli doctor
npx @memcone/cli doctor --verbose # include source file for each fieldnpx @memcone/cli doctor
npx @memcone/cli doctor --verbose # include source file for each fieldChecks:
- Stack detected from repo files
.memcone/identity.jsonpresent 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
your-repo/
.memcone/
identity.json # safe to commit — no secretsyour-repo/
.memcone/
identity.json # safe to commit — no secretsidentity.json is human-readable and safe to commit. It doesn't contain your API key. Example:
{
"_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:
## 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.