@favcrm/cli 0.1.4 → 0.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +114 -0
  2. package/package.json +5 -5
package/README.md ADDED
@@ -0,0 +1,114 @@
1
+ # favcrm CLI
2
+
3
+ Talk to [FavCRM](https://favcrm.io) from your terminal. Wraps the public MCP server (`https://api.favcrm.io/mcp`) as ergonomic subcommands so humans get the same surface that AI agents do.
4
+
5
+ ## Install
6
+
7
+ ### From source
8
+
9
+ ```bash
10
+ git clone https://github.com/favcrm/cli ~/Project/favcrm/cli
11
+ cd ~/Project/favcrm/cli
12
+ cargo install --path .
13
+ ```
14
+
15
+ ### Pre-built
16
+
17
+ ```bash
18
+ brew install favcrm/tap/favcrm # Homebrew (macOS / Linux)
19
+ curl -fsSL favcrm.io/install.sh | sh # curl
20
+ npm install -g @favcrm/cli # npm
21
+ ```
22
+
23
+ The curl script honours `FAVCRM_VERSION` and `FAVCRM_INSTALL_DIR` overrides.
24
+
25
+ ## Auth
26
+
27
+ Three ways to provide your `fav_mcp_*` API key (in priority order):
28
+
29
+ ```bash
30
+ favcrm --api-key fav_mcp_... # CLI flag
31
+ export FAVCRM_API_KEY=fav_mcp_... # env
32
+ favcrm login fav_mcp_... # writes ~/.config/favcrm/config.toml
33
+ ```
34
+
35
+ Get a key at `Settings → MCP Keys` in the merchant portal.
36
+
37
+ You can also register without a key:
38
+
39
+ ```bash
40
+ favcrm signup request --email owner@example.com --organisation-name "Ada Studio"
41
+ favcrm signup verify --request-id <request-id> --code <code>
42
+ ```
43
+
44
+ ## Quick start
45
+
46
+ ```bash
47
+ favcrm whoami # active user / company
48
+ favcrm orgs list
49
+ favcrm orgs switch <company-id>
50
+
51
+ favcrm members search alice --limit 5
52
+ favcrm members search --inactive-days 90
53
+ favcrm members get <account-id>
54
+ favcrm members create "Ada Lovelace" --email ada@example.com --phone +15550001001
55
+ favcrm members create "Ada Member" --enroll-membership --tier-id <tier-id>
56
+
57
+ favcrm bookings list --status confirmed --limit 10
58
+ favcrm bookings stats
59
+ favcrm bookings cancel <booking-id>
60
+
61
+ favcrm invoices list --status overdue
62
+ favcrm invoices send <invoice-id>
63
+
64
+ favcrm plan status
65
+ favcrm plan check --tool create_account
66
+ favcrm plan options
67
+ favcrm plan upgrade --plan-code favcrm-lite --confirm
68
+ favcrm plan portal --confirm
69
+
70
+ favcrm team invite create --email teammate@example.com --role staff
71
+ favcrm team invite accept-request --token <invite-token>
72
+ favcrm team invite accept-verify --token <invite-token> --code <code>
73
+
74
+ favcrm whatsapp status
75
+ favcrm whatsapp connect --mode cloud-api
76
+
77
+ favcrm doctor # endpoint, auth, plan, channel checks
78
+
79
+ favcrm dashboard # headline stats
80
+
81
+ favcrm --json bookings list # raw JSON for jq
82
+ ```
83
+
84
+ ## Escape hatch
85
+
86
+ Any of the 165 registered MCP tools can be called directly:
87
+
88
+ ```bash
89
+ favcrm tool query_favcrm_platform '{"query":"create a booking"}'
90
+ favcrm tool query_company_knowledge '{"query":"refund policy"}'
91
+ favcrm tool list_campaigns '{"limit":5}'
92
+ favcrm tool generate_image '{"prompt":"sunset","model":"gemini-2.5-flash-image"}'
93
+ favcrm tool report_agent_issue '{"title":"Missing MCP path","severity":"high","area":"mcp_tool_missing","expectedBehavior":"...","actualBehavior":"...","stepsTried":["..."],"aiAnalysis":"..."}'
94
+ ```
95
+
96
+ See the full catalog at `https://api.favcrm.io/mcp` (JSON-RPC `tools/list`).
97
+
98
+ Public agent workflow skills for using this CLI live in [`favcrm/mcp/skills`](https://github.com/favcrm/mcp/tree/main/skills). The CLI stays the execution layer; the MCP repo is the public skill catalog.
99
+
100
+ ## Output
101
+
102
+ Default: human-friendly tables. Use `--json` for machine-parseable JSON (pipes well into `jq`).
103
+
104
+ ## How it works
105
+
106
+ Thin Rust client over the existing FavCRM MCP server. No business logic in the CLI — all gating (per-tool scope, per-merchant module access, plan quotas, billing links, rate limits) is enforced server-side. Token = same `fav_mcp_*` key your agents use.
107
+
108
+ ## Contributing
109
+
110
+ Issues and PRs are welcome. See [`CONTRIBUTING.md`](./CONTRIBUTING.md) before opening a PR. Please report suspected vulnerabilities privately using [`SECURITY.md`](./SECURITY.md), not public issues.
111
+
112
+ ## License
113
+
114
+ MIT
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@favcrm/cli",
3
- "version": "0.1.4",
3
+ "version": "0.1.5",
4
4
  "description": "FavCRM CLI — talk to FavCRM from your terminal via the MCP API.",
5
5
  "homepage": "https://favcrm.io",
6
6
  "repository": "github:favcrm/cli",
@@ -22,10 +22,10 @@
22
22
  "postinstall": "node install-check.js"
23
23
  },
24
24
  "optionalDependencies": {
25
- "@favcrm/cli-darwin-arm64": "0.1.4",
26
- "@favcrm/cli-linux-arm64": "0.1.4",
27
- "@favcrm/cli-linux-x64": "0.1.4",
28
- "@favcrm/cli-win32-x64": "0.1.4"
25
+ "@favcrm/cli-darwin-arm64": "0.1.5",
26
+ "@favcrm/cli-linux-arm64": "0.1.5",
27
+ "@favcrm/cli-linux-x64": "0.1.5",
28
+ "@favcrm/cli-win32-x64": "0.1.5"
29
29
  },
30
30
  "engines": {
31
31
  "node": ">=18"