CLI
Tallyify CLI (tally)
tally brings the Tallyify platform to your terminal: search and compare model pricing, estimate costs, export the pricing catalog and send usage events — all scriptable. It has zero runtime dependencies and runs on macOS, Linux and Windows with Node.js 18+.
Catalog & monitoring commands (search, list, show, cheapest, compare, calc, watch, status) work without an account. pull, track, watchlist and usage require an API key.
Installation
This installs the tally binary on your PATH. Verify the install:
Quick Start
Authentication
Create an API key in your Tallyify profile, then store it with login. The key is saved to ~/.tallyify/config.json with 0600 permissions.
In CI, set environment variables instead of logging in — they always take precedence over the stored config file:
| Command | Scope required | Notes |
|---|---|---|
| Catalog commands | — | No account needed. |
pull | pricing:read | Enterprise plan (dedicated data feed). |
track | track:write | Available on all plans. |
watchlist | watchlist:read / watchlist:write | List, or toggle to add/remove. |
usage | usage:read | Token & cost analytics. |
Configuration
Configuration resolves in this order (highest priority first):
- Environment variables:
TALLYIFY_API_KEY,TALLYIFY_BASE_URL - Stored config file:
~/.tallyify/config.json - Defaults: base URL
https://api.tallyify.com
Global Options
These flags work on (almost) every command:
| Flag | Alias | Description |
|---|---|---|
--json | — | Machine-readable JSON output (great for scripting). |
--limit <n> | -l | Maximum rows returned. |
--provider <p> | -p | Filter by provider name. |
--category <c> | -c | Filter by category (LLM, Image, Audio, …). |
--help | -h | Show help. |
--version | -v | Print the CLI version. |
Commands
search
Search the model catalog by name or provider.
list
List models with optional filters and sorting.
show
Show a single model: pricing, specs and an inline price-history sparkline.
cheapest
List the cheapest priced models by input price.
compare
Compare two or more models side by side. Slugs are resolved automatically.
calc
Estimate the cost of a workload for a given token volume. Prices and units are fetched from the model.
| Flag | Alias | Required | Description |
|---|---|---|---|
--model | -m | Yes | Model slug to price. |
--input | — | Yes | Input tokens per request. |
--output | — | Yes | Output tokens per request. |
--requests | — | No | Number of requests (default 1). |
watch
Poll one or more models and print a line whenever their input/output price changes. Runs until you press Ctrl-C, or once with --once. No account required.
| Flag | Default | Description |
|---|---|---|
--interval | 60 | Seconds between polls (minimum 5). |
--once | off | Print the current snapshot once and exit (no watching). |
status
Show the live API status and 90-day uptime of the major AI providers, straight from their official status pages. Pass a provider to filter. No account required. This is the terminal companion to the web /status page.
pull
Export the full pricing catalog (the Enterprise data feed) to JSON or CSV. Requires an API key with the pricing:read scope on an Enterprise plan.
| Flag | Default | Description |
|---|---|---|
--format | json | json or csv. |
--out (-o) | stdout | Write to a file instead of stdout. |
--history | off | Include historical price points. |
--provider, --category | all | Filter the export. |
track
Send a usage / cost telemetry event from a script or CI. Requires an API key with the track:write scope. This is the CLI equivalent of the SDK's track().
The CLI never sends prompts or responses — only aggregated usage metrics, the same as the SDK.
watchlist
List the models on your watchlist, or add/remove one by id. Requires an API key with the watchlist:read scope to list and watchlist:write to toggle.
usage
Show token & cost analytics for your account — month-to-date spend, tokens, top provider and a per-provider breakdown. Requires an API key with the usage:read scope.
login · logout · whoami
Manage stored credentials.
JSON Output & Scripting
Add --json to most commands to pipe structured data into other tools, e.g. jq.
Exit Codes
| Code | Meaning |
|---|---|
0 | Success. |
1 | Error — invalid arguments, network failure, or an API error (e.g. 401/403 for missing/invalid key). |
On a 401/403 the CLI hints to check your key with tally whoami or set one with tally login.