@minttr/cli
v0.1.2
Published
Command-line interface for Minttr — agent-friendly access to your knowledge base.
Maintainers
Readme
@minttr/cli
Command-line interface for Minttr. Built so AI agents (Claude Code, Cursor, etc.) and humans can pipe content into and out of a Minttr knowledge base.
Install
npm i -g @minttr/cli
# or
npx @minttr/cli --helpAuth
Find your API token at my.minttr.com/settings → API Token.
minttr login # interactive paste
minttr login --token <token> # non-interactiveToken resolution precedence: --token flag > MINTTR_TOKEN env > ~/.config/minttr/credentials.json.
Commands
minttr login Save and validate a token
minttr profile Show the authenticated user
minttr doctor Self-diagnose (token, base url, server, env)
minttr commands Full command tree as JSON (for agents)
minttr search "<query>" [-t TYPE] Hybrid semantic + keyword search
minttr list [-t TYPE] [-i SUBTYPE] List recent content
[-l N] [-c CURSOR]
minttr stats -r 30d [-g daily] Aggregate counts over a date range
[--include-content]
minttr export -t notes -f markdown Export as md / json / csv
[-o ./out.md]
minttr notes add "<content>" Create a note (use "-" for stdin)
minttr notes update <id> "<content>" Update note content (or --append)
minttr notes delete <id> [--yes] Delete a note (destructive)
minttr links add <url> -n "<note>" Save a URL with optional note
minttr links delete <id> [--yes] Delete a link (destructive)
minttr tags list List tags with item counts
minttr feed push -t "<title>" -f FILE Push a Markdown digest to today's feedOutput
Auto-detects stdout: TTY → human-readable; pipe / CI → JSON. Force JSON with --json. Errors always go to stderr; exit code is 1 on any failure.
JSON success shape: { "success": true, ... }
JSON error shape: { "success": false, "error": { "code": "...", "message": "..." } }
minttr export is the one exception: without -o, the raw content (JSON / Markdown / CSV) always goes to stdout so you can | jq and > file.md naturally. Use -o to write to disk and get a structured success envelope.
Stable error codes: auth_required, auth_invalid, invalid_input, not_found, api_error, network_error, unknown.
For AI agents
This package ships an LLM Skill at skills/@minttr/cli/SKILL.md. After install, instruct your agent to load it. minttr commands prints the full command tree as JSON for tool discovery.
Examples
# Save a thought
echo "Markets reward focus, but compound focus needs writing" | minttr notes add -
# Save a link with context
minttr links add https://example.com/article -n "Worth re-reading next quarter"
# Find what you know about X
minttr search "compounding focus" --json | jq '.hits[].title'
# Last 30 days at a glance
minttr stats --range 30d --group-by daily
# Backup notes
minttr export -t notes -f markdown -o ~/Desktop/minttr-notes.md