Skip to content

haasonsaas/crm-agent-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

crm-agent

Agent-first CRM CLI for relationship tracking, fully self-contained (no external services required).

toolsforagents.dev

Install

cargo build --release

Binary: target/release/crm-agent-cli

Data location

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).

Core commands

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-run

List 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"

Interactions

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" --task

View interactions:

crm-agent-cli interactions "John" --limit 5
crm-agent-cli recent --limit 10

Follow-ups

Set 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" --task

View due follow-ups:

crm-agent-cli due
crm-agent-cli due --within 7    # or --days 7

Links

Add 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"

Tags

Manage tags:

crm-agent-cli tags
crm-agent-cli tag "John" --add "vip"
crm-agent-cli tag "John" --remove "prospect"

Brief commands

Morning brief (counts + due + recent):

crm-agent-cli brief
crm-agent-cli brief --text

Find stale contacts:

crm-agent-cli stale --days 30
crm-agent-cli stale --days 14 --limit 5

Deduplication

Resolve 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-archived

Merge duplicates:

crm-agent-cli merge <source-id> <target-id>
crm-agent-cli merge <source-id> <target-id> --dry-run

Deep links

Get contact deep links:

crm-agent-cli open "John"

Returns: crm-agent://contact/<uuid>

Health check

crm-agent-cli doctor
crm-agent-cli doctor --text

Import / export

crm-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 --merge

Exports include a version and timestamp; imports accept older formats when possible.

Output formats

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 --text

You 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

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.sqlite
  • CRM_AGENT_FORMAT=json|text

Shell completions

crm-agent-cli completions zsh > _crm-agent-cli
crm-agent-cli completions bash > crm-agent-cli.bash

Natural dates

These 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"

Error handling

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

Agent-Friendly Design

This CLI follows toolsforagents.dev principles:

  • JSON Output - All commands output structured JSON by default
  • Structured Errors - Errors include code and message
  • Natural Language - Dates like "tomorrow", "next friday" work everywhere
  • Brief Commands - brief, stale, recent, due for 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 - --task flag exports to things-agent-cli

About

Agent-first CRM CLI for relationship tracking — lightweight, local-first contact and interaction management

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages