Agent-first CRM CLI for relationship tracking, fully self-contained (no external services required).
cargo build --releaseBinary: target/release/crm-agent-cli
Uses a local SQLite database stored in your OS app data directory:
- macOS:
~/Library/Application Support/dev.toolsforagents.crm-agent/crm.db - Linux:
~/.local/share/dev.toolsforagents.crm-agent/crm.db - Windows:
%APPDATA%\dev.toolsforagents.crm-agent\crm.db
Override with --db /path/to/file.sqlite, CRM_AGENT_DB, or config (see Config below).
Add a contact:
crm-agent-cli add "John Smith" --email john@acme.com --company "Acme Corp" --tags "investor,tech" --notes "Met at conference"Capture from natural language:
crm-agent-cli capture "Sarah Connor sarah@skynet.com #ai #founder followup tomorrow"
crm-agent-cli capture "John Doe 555-1234 @Acme" --dry-runList and search:
crm-agent-cli list
crm-agent-cli list --tag investor --limit 10
crm-agent-cli search "acme" --company "Acme" --tags "investor"
crm-agent-cli search "john" --archived
crm-agent-cli search "john" --include-archived
crm-agent-cli search "john" --raw
crm-agent-cli get "John"Update contacts:
crm-agent-cli update "John" --email new@email.com
crm-agent-cli update "John" --company "NewCorp" --role "CEO"
crm-agent-cli update "John" --archive
crm-agent-cli update "John" --unarchive
crm-agent-cli update "John" --pick <contact-id>
crm-agent-cli delete "John" --pick <contact-id> --force
crm-agent-cli log "John" --pick <contact-id> --type call --summary "Hello"
crm-agent-cli edit "John"Log interactions with contacts:
crm-agent-cli log "John" --type call --summary "Discussed partnership"
crm-agent-cli log "John" --type email --summary "Sent proposal" --tags "sales,proposal"
crm-agent-cli log "John" --type meeting --at "2026-01-20" --followup "next friday"With things-agent-cli integration:
crm-agent-cli log "John" --type call --summary "Follow up needed" --followup "in 3 days" --taskView interactions:
crm-agent-cli interactions "John" --limit 5
crm-agent-cli recent --limit 10Set follow-up dates:
crm-agent-cli followup "John" --date tomorrow
crm-agent-cli followup "John" --date "next friday"
crm-agent-cli followup "John" --date "in 2 weeks" --taskView due follow-ups:
crm-agent-cli due
crm-agent-cli due --within 7 # or --days 7Add links with labels:
crm-agent-cli link "John" "https://linkedin.com/in/johnsmith" --label "LinkedIn" --primary
crm-agent-cli link "John" "https://twitter.com/johnsmith" --label "Twitter"Manage tags:
crm-agent-cli tags
crm-agent-cli tag "John" --add "vip"
crm-agent-cli tag "John" --remove "prospect"Morning brief (counts + due + recent):
crm-agent-cli brief
crm-agent-cli brief --textFind stale contacts:
crm-agent-cli stale --days 30
crm-agent-cli stale --days 14 --limit 5Resolve ambiguous names:
crm-agent-cli resolve "John"Find duplicates:
crm-agent-cli dedupe --by email
crm-agent-cli dedupe --by phone
crm-agent-cli dedupe --by company --merge
crm-agent-cli dedupe --by email --include-archivedMerge duplicates:
crm-agent-cli merge <source-id> <target-id>
crm-agent-cli merge <source-id> <target-id> --dry-runGet contact deep links:
crm-agent-cli open "John"Returns: crm-agent://contact/<uuid>
crm-agent-cli doctor
crm-agent-cli doctor --textcrm-agent-cli export --out backup.json
crm-agent-cli import backup.json
crm-agent-cli import backup.json --dry-run
crm-agent-cli import backup.json --overwrite
cat backup.json | crm-agent-cli import --stdin --mergeExports include a version and timestamp; imports accept older formats when possible.
Default output is JSON for agent friendliness. All commands support --json or --text:
crm-agent-cli list --text
crm-agent-cli brief --json
crm-agent-cli doctor --textYou can set a default output format via CRM_AGENT_FORMAT=text or config (see below).
Search JSON output includes highlights by default; use --raw to return plain contact arrays.
Config file (optional):
- macOS:
~/Library/Application Support/dev.toolsforagents.crm-agent/config.json - Linux:
~/.config/dev.toolsforagents.crm-agent/config.json - Windows:
%APPDATA%\\dev.toolsforagents.crm-agent\\config.json
Example:
{
"dbPath": "/tmp/crm-agent-cli.sqlite",
"outputFormat": "text"
}Environment overrides:
CRM_AGENT_DB=/path/to/file.sqliteCRM_AGENT_FORMAT=json|text
crm-agent-cli completions zsh > _crm-agent-cli
crm-agent-cli completions bash > crm-agent-cli.bashThese accept natural dates (local timezone):
--date tomorrow--date "next friday"--date "next month"--date "in 3 months"--date "Jan 2"--date "tomorrow 3pm"--at "2026-01-20 14:30"
Errors follow the selected output format (JSON default, text with --text).
Example JSON error:
{
"error": {
"code": "get.contact_not_found",
"message": "No contact found: xyz"
}
}Exit codes:
- 0: Success
- 1: Not found / unexpected error
- 2: Validation error
- 3: Ambiguous match (use resolve command)
- 4: Database error
This CLI follows toolsforagents.dev principles:
- JSON Output - All commands output structured JSON by default
- Structured Errors - Errors include
codeandmessage - Natural Language - Dates like "tomorrow", "next friday" work everywhere
- Brief Commands -
brief,stale,recent,duefor quick context - Bulk Operations - Commands handle multiple items efficiently
- Self-Contained - Local SQLite, no external services required
- Deep Links -
crm-agent://contact/<id>URIs for stable references - Cross-Tool Integration -
--taskflag exports to things-agent-cli