attio-cli 0.3.0 → 0.3.1
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.
- package/README.md +28 -1
- package/dist/attio.js +1 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -18,6 +18,27 @@ attio people list --limit 5
|
|
|
18
18
|
|
|
19
19
|
You'll need an API key from [Attio Developer Settings](https://app.attio.com/settings/developers). `attio init` walks you through the rest.
|
|
20
20
|
|
|
21
|
+
## Examples
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
# List companies, filter by name
|
|
25
|
+
attio companies list --filter 'name~Acme'
|
|
26
|
+
|
|
27
|
+
# Search for a person
|
|
28
|
+
attio people search "Jane"
|
|
29
|
+
|
|
30
|
+
# Create a company and get back just the ID
|
|
31
|
+
attio companies create --set name="Acme" --set domains='["acme.com"]' -q
|
|
32
|
+
|
|
33
|
+
# Get a record as JSON and pipe to jq
|
|
34
|
+
attio companies list --json | jq '.[].values.name[0].value'
|
|
35
|
+
|
|
36
|
+
# Export all companies to CSV
|
|
37
|
+
attio companies list --all --csv > companies.csv
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
See [Scripting Examples](#scripting-examples) for more advanced workflows (bulk updates, chaining commands, etc.).
|
|
41
|
+
|
|
21
42
|
For non-interactive environments (CI, scripts), use any of:
|
|
22
43
|
|
|
23
44
|
```bash
|
|
@@ -221,7 +242,13 @@ attio records list companies --filter 'name^TEST_' --json -q | \
|
|
|
221
242
|
|
|
222
243
|
## Why CLI over MCP for Agents
|
|
223
244
|
|
|
224
|
-
While MCP tools
|
|
245
|
+
While MCP tools work well, a CLI is often the better choice for AI agent workflows:
|
|
246
|
+
|
|
247
|
+
- **Simpler** — a single bash command vs. structured tool-call JSON
|
|
248
|
+
- **Self-documenting** — `attio --help` and `attio companies --help` let agents discover capabilities without external docs
|
|
249
|
+
- **LLM-native** — language models are heavily RL'd on command-line usage; they generate CLI invocations more reliably than tool-call schemas
|
|
250
|
+
- **Composable** — pipe `attio` output into `jq`, `grep`, `xargs`, or any other Unix tool, building complex workflows from simple parts
|
|
251
|
+
- **Cheaper** — MCP servers load all tool schemas as input tokens on every LLM call (14,521 tokens for Attio's 30 tools), even if only one tool is used. A CLI just needs the Bash tool schema (~200 tokens). See [benchmarks/REPORT.md](benchmarks/REPORT.md) for detailed cost comparisons.
|
|
225
252
|
|
|
226
253
|
## Contributing
|
|
227
254
|
|
package/dist/attio.js
CHANGED
|
@@ -2331,9 +2331,8 @@ program.action(() => {
|
|
|
2331
2331
|
console.error("");
|
|
2332
2332
|
console.error(" to connect to your Attio workspace.");
|
|
2333
2333
|
console.error("");
|
|
2334
|
-
} else {
|
|
2335
|
-
program.outputHelp();
|
|
2336
2334
|
}
|
|
2335
|
+
program.outputHelp();
|
|
2337
2336
|
});
|
|
2338
2337
|
program.parseAsync(process.argv).catch(handleError);
|
|
2339
2338
|
process.on("uncaughtException", handleError);
|