Skip to content

About

Local-first command-line CRM in Go: people, orgs, timeline, follow-ups and full-text search in SQLite, with JSON output for scripting.

Topics

Resources

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

6 Commits

Folders and files

Repository files navigation

ContextCRM

A small, local-first CRM for the command line. It keeps people, organizations, conversations, follow-ups and relationship notes in a single SQLite file, and every read command can return JSON so it works well in shell scripts and other automation.

CI Go License: MIT

The project is called ContextCRM; the command is crm.

Why I built it

Most CRMs assume a browser dashboard and a sales team. I wanted something closer to how I actually keep track of contacts: fast to capture from a terminal, easy to search, easy to back up, and with data I can query from a script without screen-scraping a web app. ContextCRM is that tool: deliberately small, explicit, and boring to operate.

Features

  • People and organizations with emails, phones, titles, tags and stable slugs/UUIDs
  • Interaction timeline: log meetings, calls and emails with a summary, next step and follow-up date
  • Tasks and follow-ups: crm due and crm stale show what needs attention
  • Threads: lightweight multi-step relationships (a partnership, a hiring process, a pilot) with stages
  • Edges: durable context between people and organizations ("champion at", "introduced by")
  • Pre-call briefs and per-person timelines
  • Full-text search across the whole database (SQLite FTS5)
  • Prospect research: stage notes on a lead as Markdown before promoting it into the CRM
  • JSON output on reads via --format json
  • Export, backup and health checks: crm export json, crm backup, crm doctor
  • Pure-Go SQLite driver, so the binary has no C dependencies

Quick start

Requires Go 1.22+.

git clone https://github.com/mizoz/context-crm.git
cd context-crm
make build          # produces ./crm
./crm version

Or install it onto your PATH:

go install github.com/mizoz/context-crm/cmd/crm@latest

Initialize a database and add some records:

export CRM_HOME="$HOME/.crm"
crm init
crm doctor

crm org add --name "Acme Corp" --domain acme.example

crm person add \
  --name "Jane Doe" \
  --email jane@acme.example \
  --org acme-corp \
  --title "COO" \
  --tags prospect

crm interaction log \
  --person jane \
  --kind meeting \
  --summary "Discovery call about API rollout" \
  --next-step "Send security questionnaire" \
  --follow-up 2026-11-25

crm task add --title "Send security questionnaire" --person jane --due 2026-11-22

crm brief person jane

Track a multi-step relationship and record context between records:

crm thread add --label "Acme pilot" --kind partnership \
  --person jane --org acme-corp --stage discovery

crm edge add --from jane --org acme-corp --type champion \
  --note "Internal sponsor for security review"

Stage a lead for research, then promote it when it is worth working:

crm prospect research --business "Northside Barbers" --contact "Sam Rivera" \
  --phone "555-0100" --notes "Check booking workflow before reaching out."

crm prospect capture --org-name "Northside Barbers" --person-name "Sam Rivera" \
  --phone "555-0100" --title "Owner" --summary "Intro call" \
  --next-step "Book a follow-up" --follow-up 2026-11-18

Scripting with JSON

crm person list --format json | jq '.[].slug'
crm due --format json | jq '.[] | select(.due_at != "")'
crm search "discovery" --format json | jq .
crm export json > backup.json

Writes are always explicit commands; nothing rewrites records in the background.

Commands

Command Purpose
crm init / doctor / config show Setup and health checks
crm person, crm org Contact records
crm interaction Timeline capture
crm task / crm due / crm stale Follow-up management
crm thread Multi-step relationship threads
crm edge Relationship context
crm brief / crm timeline / crm search Retrieval
crm prospect Research and first-touch capture
crm export, crm import, crm backup Portability and recovery

Run crm --help or crm <command> --help for every flag.

Where data lives

Path Purpose
$CRM_HOME/config.json Config and database path
$CRM_HOME/data.sqlite The database
$CRM_HOME/backups/ Timestamped SQLite backups
$CRM_HOME/research/ Prospect research notes (Markdown)

If CRM_HOME is unset, crm uses .crm/ in the current directory, which makes throwaway test databases easy.

Tech stack

Go, Cobra for the CLI, modernc.org/sqlite (pure Go) with FTS5, GitHub Actions for CI.

Development

make fmt
make test
make build

See docs/data-model.md for the entities and identity rules, and docs/development.md for the repository layout. Changes are listed in CHANGELOG.md.

Status

Early-stage personal project. The core commands work and have tests for the trickier parts (prospect capture, date parsing), but expect rough edges.

License

MIT © 2026 Ahmed Mahmoud. See LICENSE.

About

Local-first command-line CRM in Go: people, orgs, timeline, follow-ups and full-text search in SQLite, with JSON output for scripting.

Topics

Resources

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages