CLI Commands Reference

Complete guide to every truenex-mem command, parameter, and example.

Quick navigation

Setup & Diagnostics

Safe

truenex-mem init

Prepares the hidden .truenex-memory/ folder in the current directory. Run once per project.

truenex-mem init

truenex-mem doctor

Quick diagnostic: shows if the database exists, how many documents/chunks you have, and which vector backend is active.

truenex-mem doctor
truenex-mem doctor --privacy

truenex-mem migrate

Manages database schema migrations when upgrading to a new version.

Sub-commandWhat it doesExample
statusShow current and latest schema versionmigrate status
applyApply pending migrations (auto-backup first)migrate apply
backup-listList available backupsmigrate backup-list
restoreRestore a backupmigrate restore backup_20250602.db

Manual Memory

Safe

truenex-mem add

Writes a manual memory node into the local project database.

truenex-mem add "We use FastAPI + JWT for auth" --type decision

Types: note, decision, issue, pattern

truenex-mem list

Lists all manual memory nodes you added.

truenex-mem list
truenex-mem list --status obsolete
truenex-mem list --json

truenex-mem status

Changes the lifecycle status of a memory node.

truenex-mem status set mem_abc123 obsolete

Statuses: active, obsolete, superseded, conflicting, unverified

Import / Export

Safe

truenex-mem export

Dumps the entire local database to a JSON file (backup).

truenex-mem export --output backup.json

truenex-mem import

Restores data from a previously exported JSON file.

truenex-mem import backup.json

Git Sync PRO

Safe

Synchronize your memory database across multiple PCs using any Git remote. Your data stays private — exported as JSON, compressed with gzip, and pushed to your own private repository. A rare feature in the local AI memory space.

truenex-mem git init

Initializes the Git Bridge sync directory in ~/.truenex-memory/sync/.

truenex-mem git init

truenex-mem git remote add

Links your sync directory to a private Git remote (SSH URL recommended).

truenex-mem git remote add origin [email protected]:YOUR_USER/YOUR_REPO.git

truenex-mem git push

Exports the local database to JSON, compresses it with gzip, commits and pushes to the remote.

truenex-mem git push

truenex-mem git pull

Pulls the latest memory data from the remote, decompresses it, and imports it into the local database. Automatically repairs missing embeddings and UUIDs.

truenex-mem git pull

truenex-mem git remote remove

Removes the configured remote.

truenex-mem git remote remove origin
Why Git Sync is special: Most local AI memory tools trap your data on a single device. Truenex Memory Pro lets you own your sync infrastructure — any Git provider, private repo, no cloud lock-in. With automatic gzip compression (118 MB → ~22 MB), embedding auto-repair after import, and intelligent upsert (no duplicates), it's one of the few solutions that truly respects multi-device workflows without compromising privacy.

For a complete setup walkthrough, see the Git Bridge Setup Guide.

Agent Integration

truenex-mem adapter

Prints instructions to copy into your AI agent config so it knows how to use Truenex Memory.

truenex-mem adapter claude-md
truenex-mem adapter agents-md

truenex-mem mcp

Blocking

Starts a stdio server speaking the MCP (Model Context Protocol). This is how Claude Code, Codex, and Cursor talk to Truenex Memory as an external tool. The process stays alive until you press Ctrl+C.

truenex-mem mcp

truenex-mem serve

Blocking

Starts an HTTP API server (default 127.0.0.1:8000) for the Truenex Memory Desktop GUI. Stays alive until Ctrl+C.

truenex-mem serve
truenex-mem serve --port 9000
Bug: requires httpx which is not included in the current PyPI package.

Global Store

Safe

The global store lives in ~/.truenex-memory/ and holds data for all your projects.

Sub-commandWhat it doesExample
statusGlobal store statusglobal status
discoverFinds projects from agent clientsglobal discover
refreshIncremental refresh from catalogglobal refresh
contextRead-only context for a projectglobal context my-project
searchSearch global store without mutating logsglobal search "query"
sourcesReview and confirm source catalogglobal sources

Agent Manifest

Safe

Manage the external JSON manifest that controls which AI agent directories Truenex Memory scans. No hardcoded paths — fully user-configurable.

truenex-mem agent list

Shows all agents configured in the manifest and their scan roots.

truenex-mem agent list

truenex-mem agent add

Adds a new agent to the discovery manifest. The manifest is stored at ~/.truenex-memory/agent_manifest.json.

truenex-mem agent add windsurf --dir .windsurf --subdir sessions

Creates a new agent entry. To add an extra root to an existing agent, edit the JSON manually.

truenex-mem agent remove

Removes an agent from the manifest.

truenex-mem agent remove windsurf
Default agents: Codex, Claude, Kimi, Cursor, OpenClaw, Aider, Antigravity, Gemini. The manifest is created automatically with embedded defaults if missing. Edit the JSON directly for advanced changes (multiple roots per agent, custom labels).

Task Pipeline

Safe

Tracks adaptive tasks executed by AI agents, with human judgment and calibration stats.

Sub-commandWhat it doesExample
open "TITLE"Open a new task recordtask open "Refactor auth"
close IDClose a task with human judgmenttask close task_abc123
listList recent taskstask list
show IDShow task details with stepstask show task_abc123
calibrationShow calibration statisticstask calibration

Orchestration

Advanced

Recursive multi-agent loop: multiple AI agents work in sequence, converging toward a solution.

Sub-commandWhat it doesExample
run FILE.jsonExecute recursive loop from JSON configorchestrate run config.json
converge-check A BCheck if two rounds are byte-identicalorchestrate converge-check r1.json r2.json

License

Safe

Manage your Truenex Memory Pro license.

Sub-commandWhat it doesExample
statusShow active licenselicense status
activate KEYActivate a Pro licenselicense activate trxn-pro-XXXX
deactivateRemove local license filelicense deactivate --yes
require TIERCheck if current tier meets minimumlicense require pro

Utility

Safe
CommandWhat it doesExample
versionPrint version stringversion
version-infoPrint all component versions as JSONversion-info
update checkCheck for updates (no data sent)update check

Typical workflow

# 1. Setup
cd my-project
truenex-mem init

# 2. Annotate decisions
truenex-mem add "Use PostgreSQL, not MySQL" --type decision

# 3. Index code
truenex-mem index

# 4. Search
truenex-mem search "database choice"

# 5. Check health
truenex-mem doctor

# 6. Activate Pro license
truenex-mem license activate trxn-pro-XXXXXXXXXXXXXXXX

# 7. Sync to another PC (Pro)
truenex-mem git push # on PC with new data
truenex-mem git pull # on the other PC