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

Shell
npm install -g @tallyify/cli

This installs the tally binary on your PATH. Verify the install:

Shell
tally --version
tally --help

Quick Start

Shell
tally search "gpt-4o"                       # search the catalog
tally show claude-3-5-sonnet                # details + price-history sparkline
tally compare gpt-4o claude-3-5-sonnet      # side-by-side comparison
tally cheapest --category LLM               # cheapest priced models
tally calc --model gpt-4o --input 1500 --output 800 --requests 1000
tally watch gpt-4o claude-3-5-sonnet        # alert on price changes in your terminal
tally status                                # provider API status & uptime

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.

Shell
tally login --key tly_live_xxxxxxxx
tally whoami        # show the active base URL & masked key

In CI, set environment variables instead of logging in — they always take precedence over the stored config file:

Shell
export TALLYIFY_API_KEY=tly_live_xxxxxxxx
export TALLYIFY_BASE_URL=https://api.tallyify.com   # optional override
CommandScope requiredNotes
Catalog commandsNo account needed.
pullpricing:readEnterprise plan (dedicated data feed).
tracktrack:writeAvailable on all plans.
watchlistwatchlist:read / watchlist:writeList, or toggle to add/remove.
usageusage:readToken & cost analytics.

Configuration

Configuration resolves in this order (highest priority first):

  1. Environment variables: TALLYIFY_API_KEY, TALLYIFY_BASE_URL
  2. Stored config file: ~/.tallyify/config.json
  3. Defaults: base URL https://api.tallyify.com
~/.tallyify/config.json
{
  "apiKey": "tly_live_xxxxxxxx",
  "baseUrl": "https://api.tallyify.com"
}

Global Options

These flags work on (almost) every command:

FlagAliasDescription
--jsonMachine-readable JSON output (great for scripting).
--limit <n>-lMaximum rows returned.
--provider <p>-pFilter by provider name.
--category <c>-cFilter by category (LLM, Image, Audio, …).
--help-hShow help.
--version-vPrint the CLI version.

Commands

Search the model catalog by name or provider.

Shell
tally search <query> [--provider <p>] [--category <c>] [--limit <n>] [--json]

# examples
tally search "gpt-4o"
tally search claude --provider Anthropic --limit 5
tally search gemini --json

list

List models with optional filters and sorting.

Shell
tally list [--provider <p>] [--category <c>] [--sort <s>] [--pricing <free|paid>] [--limit <n>] [--json]

# --sort: name_asc | name_desc | price_asc | price_desc
tally list --category LLM --sort price_asc --limit 20

show

Show a single model: pricing, specs and an inline price-history sparkline.

Shell
tally show <slug> [--json]

tally show gpt-4o
tally show claude-3-5-sonnet --json
Text
Claude 3.5 Sonnet  (Anthropic)

  Category         LLM
  Input price      $3 /1M Tokens
  Output price     $15 /1M Tokens
  Context window   200,000 tokens

  Input price history  ▆▆▆▃▁▁  ($3 → $3)

cheapest

List the cheapest priced models by input price.

Shell
tally cheapest [--category <c>] [--provider <p>] [--limit <n>] [--json]

tally cheapest --category LLM --limit 3

compare

Compare two or more models side by side. Slugs are resolved automatically.

Shell
tally compare <slug1> <slug2> [slug3 ...] [--json]

tally compare gpt-4o claude-3-5-sonnet gemini-2-5-flash

calc

Estimate the cost of a workload for a given token volume. Prices and units are fetched from the model.

Shell
tally calc --model <slug> --input <tokens> --output <tokens> [--requests <n>] [--json]

tally calc --model gpt-4o --input 1500 --output 800 --requests 1000
FlagAliasRequiredDescription
--model-mYesModel slug to price.
--inputYesInput tokens per request.
--outputYesOutput tokens per request.
--requestsNoNumber 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.

Shell
tally watch <slug1> [slug2 ...] [--interval <seconds>] [--once]

# watch two models, polling every 60s (default)
tally watch gpt-4o claude-3-5-sonnet

# faster polling, in a CI/cron-style single check
tally watch gpt-4o --interval 30 --once
FlagDefaultDescription
--interval60Seconds between polls (minimum 5).
--onceoffPrint 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.

Shell
tally status [provider] [--json]

# all providers
tally status

# just one provider
tally status anthropic --json
Text
AI provider status

  Provider     Status         Incidents     Uptime 90d
  ───────────  ─────────────  ────────────  ──────────
  ● OpenAI     Operational99.98%
  ● Anthropic  Operational99.95%
  ● Groq       Minor issues   1 incident(s) 99.40%

  2/3 operational  ·  1 degraded

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.

Shell
tally pull [--provider <p>] [--category <c>] [--history] [--format json|csv] [--out <file>]

# print JSON to stdout
tally pull

# write a CSV file with up to 30 historical points per model
tally pull --format csv --out catalog.csv --history

# only one provider
tally pull --provider openai --format json --out openai.json
FlagDefaultDescription
--formatjsonjson or csv.
--out (-o)stdoutWrite to a file instead of stdout.
--historyoffInclude historical price points.
--provider, --categoryallFilter 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().

Shell
tally track --provider <p> --model <m> --input <tokens> --output <tokens> [--status success|error] [--endpoint <e>]

tally track --provider openai --model gpt-4o --input 1200 --output 350
tally track --provider anthropic --model claude-3-5-sonnet --input 800 --output 200 --status success

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.

Shell
tally watchlist                       # list your watchlist
tally watchlist toggle <model_id>     # add the model if absent, remove it if present
tally watchlist --json                # machine-readable output

tally watchlist toggle 42

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.

Shell
tally usage [--period 7d|30d|90d] [--provider <p>] [--json]

tally usage --period 30d
tally usage --provider openai --json

login · logout · whoami

Manage stored credentials.

Shell
tally login --key tly_live_xxx [--url https://api.tallyify.com]   # store credentials
tally whoami                                                     # show base URL + masked key + source
tally logout                                                     # remove stored credentials

JSON Output & Scripting

Add --json to most commands to pipe structured data into other tools, e.g. jq.

Shell
# three cheapest LLMs as JSON
tally cheapest --category LLM --limit 3 --json

# extract just the slugs with jq
tally search gpt --json | jq -r '.[].slug'

# cost estimate as JSON for a budgeting script
tally calc --model gpt-4o --input 1500 --output 800 --requests 1000 --json

Exit Codes

CodeMeaning
0Success.
1Error — 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.