Zum Inhalt springen
Pro bringt zusätzliche Konten, Verlauf, Push und E Mail Benachrichtigungen, Cloud Messung von API Ausgaben und die Designvorlage Ember. Desktop Benachrichtigungen sind gratis.

CLI reference

Ten commands, one binary. Agent tools and people get the same interface, and every command reports a genuine failure rather than inventing a number.

Auf dieser Seite

Overview

openlimiter help
openlimiter
openlimiter setup
openlimiter login [--open]
openlimiter logout
openlimiter whoami
openlimiter sync
openlimiter init
openlimiter snapshot [--refresh]
openlimiter statusline [--host claude|antigravity|grok|codex|shell]
openlimiter terminal [--yes] [--host <id>]
openlimiter terminal status
openlimiter terminal install <host>
openlimiter terminal uninstall <host>
openlimiter terminal show <provider ...>
openlimiter terminal hide <provider ...>
openlimiter refresh
openlimiter hook [--dry-run]
openlimiter hooks install <agent>
openlimiter hooks uninstall <agent>
openlimiter hooks status <agent>
openlimiter hooks repair <agent>
openlimiter status --agent-context
openlimiter ingest [--provider <id>] [--payload <json>]
openlimiter config get statusline[.<key>]
openlimiter config set statusline.<key> <value>
openlimiter config get providers[.<key>]
openlimiter config set providers.<key> <value>
openlimiter doctor
openlimiter demo
openlimiter export

statusline keys: order, meters, width, rows, bars, color, style, show, hosts.
providers keys: claude.poll.
terminal hosts: claude, antigravity, grok, codex, shell.
statusline and ingest read JSON from standard input when it is piped in.
openlimiter with no arguments runs setup: sign in, connect, show bars in.
login opens the device code sign in; sync uploads one round to the hub when
a session exists, and refresh triggers it automatically after itself.
refresh reads the logins your provider tools already stored on this machine
and asks each provider for its own usage, at most once every 15 minutes, or
about every 5 minutes for the Claude usage request once it is on. It stands
down while the desktop app is running. statusline and snapshot start it in
the background when the cache is older than a minute.
Exit codes: 0 success, 1 failure, 2 usage, 3 no bounded quota data.

Install the global command with npm install -g openlimiter, or run it once with npx openlimiter@latest.

The commands

setup

Führt dieselben drei Schritte wie openlimiter ohne Argumente aus: anmelden, verbinden, Anzeigeort wählen. Danach erscheinen die Balken einmal. Übersprungene Schritte bleiben übersprungen. Keiner ist zum Anzeigen eines Balkens erforderlich.

login

Meldet dieses Terminal per Gerätecode an: Ein kurzer Code und der Link openlimiter.com/app/cli erscheinen sofort. Der Befehl wartet dort auf Ihre Zustimmung. --open öffnet den Link zusätzlich im Browser. Das Terminal sieht nie ein Passwort.

logout

Vergisst die auf diesem Gerät gespeicherte Sitzung. Die Zentrale wird dabei zu keiner Aktion aufgefordert.

whoami

Zeigt das angemeldete Konto und die Gerätekennung an oder sagt ausdrücklich, dass niemand angemeldet ist.

sync

Lädt die zwischengespeicherten Balken einmal in die Zentrale hoch und erneuert zuvor eine bald ablaufende Sitzung. Nach erfolgreicher Aktualisierung löst refresh dies bei vorhandener Sitzung bereits automatisch aus. Der manuelle Aufruf bestätigt, dass die Übertragung angekommen ist.

init

Writes local configuration to the state directory, recording every connector and whether it was detected. It reports the detected list, or none.

openlimiter init
Configuration saved. Detected: manual

snapshot

Prints the cached quota as a table. With --refresh it first asks every connector for meters, folds what survives validation into the cache, and then prints. Exits 3 when no bounded quota data exists.

Eight columns, always eight, separated by one space, so a script can split a row without guessing. BAR is a ten block meter, drawn in colour when the terminal supports it and in # and . when it does not or when NO_COLOR is set. AMOUNT carries the money for a plan that is priced rather than rationed. RESET is the instant the window turns over and IN is how long that is from now. A column with nothing to say reads NONE rather than disappearing.

synthetic values
openlimiter snapshot
PROVIDER METER BAR USAGE AMOUNT STATE RESET IN
CLAUDE FIVE_HOUR ####...... 42.00PERCENT NONE fresh 2026-08-10T04:00:32.969Z 5h0m
CLAUDE SEVEN_DAY ######.... 64.00PERCENT NONE fresh 2026-08-16T23:00:32.969Z 7d0h
OPENROUTER Account balance NONE NONE $7.53 fresh NONE NONE

A connector that was handed a payload and could not read it, or a reading the validator threw out, adds one line under the table in red, naming the provider and one fixed sentence. That sentence is always one of ours: no text a provider sent ever reaches your terminal.

statusline

Renders the status row for a statusline host. It reads standard input first, so a Claude Code session payload is ingested and rendered in the same call, then falls back to the cache. This is the only command that writes as a side effect of being displayed.

Das Standardlayout zeichnet für den mit --host genannten Host eine Zeile mit einer Zelle pro Zeitfenster: ein Kürzel mit Leerzeichen wie cx 5h, einen Balken mit zehn Blöcken, den Prozentsatz mit ! ab 80 Prozent und !! ab 90, und die Rücksetzzeit nach einem Pfeil wie ↻6d23h oder nach dem Wort resets in einem reinen ASCII Terminal. Ist die Zeile breiter als das Terminal, behält sie die Werte, die ihrem Limit am nächsten sind, und endet mit +N more. Die vollständige Grammatik und die Aktualitätszeichen stehen unter Agent context.

captured 10 August 2026, synthetic fixtures
NO_COLOR=1 node packages/cli/dist/bin.js statusline
OpenLimiter NEAR_CAP PREFER ANTIGRAVITY  CLAUDE ###.. 64.0%  CODEX ####. 84.0%  ANTIGRAVITY #.... 28.0%  OPENCODE ####. 92.0%
MANUAL #.... 35.0%  OPENROUTER ###.. 62.3%

statusline.style cells brings back the previous row instead: the overall reason code and the routing recommendation lead, then one compact cell per provider with a five block bar rather than the ten the new default draws.

captured 10 August 2026, synthetic fixtures
openlimiter config set statusline.meters all && NO_COLOR=1 node packages/cli/dist/bin.js statusline
OpenLimiter NEAR_CAP PREFER ANTIGRAVITY  CLAUDE:FIVE_HOUR ##... 42.0%  CLAUDE:SEVEN_DAY ###.. 64.0%  CODEX:PRIMARY ####. 84.0%
ANTIGRAVITY:PRIMARY #.... 28.0%  OPENCODE:PRIMARY ####. 92.0%  MANUAL:MONTHLY #.... 35.0%  OPENROUTER:Balance $7.53

Im Stil cells stapelt eine Zeile, die breiter als ihr Budget ist, statt abgeschnitten zu werden. Der Umbruch landet zwischen zwei Zellen und nie innerhalb einer, denn ein halber Balken sieht aus wie ein Wert und ist keiner. Zwei Zeilen sind die Obergrenze. Danach werden die Anbieter behalten, die ihrer Grenze am nächsten sind, und die letzte Zeile sagt, wie viele sie nicht zeigen konnte.

captured 10 August 2026, synthetic fixtures
openlimiter config set statusline.rows 1 && NO_COLOR=1 node packages/cli/dist/bin.js statusline
OpenLimiter NEAR_CAP PREFER ANTIGRAVITY  CODEX ####. 84.0%  OPENCODE ####. 92.0%  +4 more
captured 10 August 2026, synthetic fixtures
openlimiter config set statusline.bars false && node packages/cli/dist/bin.js statusline
OpenLimiter NEAR_CAP CLAUDE 64.0% OPENROUTER 62.3% CODEX 84.0% ANTIGRAVITY 28.0% OPENCODE 92.0% MANUAL 35.0% PREFER ANTIGRAVITY

terminal

Listet alle unterstützten Terminalprogramme mit ihrem Einrichtungszustand auf und bietet die Einrichtung einzelner oder aller Programme an. terminal install <host> und terminal uninstall <host> richten ein Programm ein oder stellen es wieder her. terminal status zeigt die Tabelle. terminal show und terminal hide bestimmen die angezeigten Anbieter. Programme und Format erklärt der Agentenkontext.

refresh

Liest die von Ihren Anbietertools gespeicherten Anmeldungen und fragt jeden Anbieter höchstens alle fünfzehn Minuten nach seiner Nutzung. Gültige Messungen werden im Cache gespeichert. Die direkte Claude Nutzungsabfrage liest, sobald Sie sie einschalten, stattdessen etwa alle fünf Minuten. Während die Desktopanwendung läuft, pausiert der Befehl. statusline und snapshot starten ihn automatisch im Hintergrund, sobald der Cache älter als eine Minute ist.

config

Reads and changes the statusline layout in the configuration file. Every key is validated before it is written, a rejected value exits 2 and names what it wanted, and nothing outside the statusline section can be changed by this command. See configuration for what each key accepts.

Die direkte Claude Anfrage ist aus, bis du sie einschaltest, und ein Schalter gilt für die Desktopanwendung und dieses Werkzeug. Öffne in der Desktopanwendung Connect Tools, dann das Menü am Ende der Zeile von Claude, und schalte Read my Claude usage from Anthropic ein oder aus. Im Terminal schaltet openlimiter config set providers.claude.poll true sie ein, und openlimiter config set providers.claude.poll false stoppt sie. Eingeschaltet sendet sie deine eigene Claude Code Anmeldung nur an Anthropic, etwa alle fünf Minuten, und jeder Claude Balken kommt aus dieser einen Quelle. Anthropics Richtlinie für solche Werkzeuge ist ungeklärt.

captured 10 August 2026
openlimiter config get statusline
statusline.order=NONE
statusline.meters=worst
statusline.width=140
statusline.rows=2
statusline.bars=true
statusline.color=auto
openlimiter config set statusline.width 200
statusline.width=200

openlimiter config set statusline.rows 3
openlimiter config: statusline.rows must be 1 or 2.

openlimiter config set providers.claude.poll true
providers.claude.poll=true

openlimiter config set providers.claude.poll false
providers.claude.poll=false

hook

Emits the agent context block from the cache. It performs no network access, writes nothing, and injects nothing when every provider is unknown. See agent context for the exact format.

ingest

Accepts a quota document from any script or agent, on standard input or inline with --payload. Without --provider the document is a manual document. With it, the document goes to that connector's parser and keeps that connector's labels.

openlimiter ingest --payload '{"meters":[{"name":"AGENT_BUDGET","used_percent":12.5,"reset_at":"2026-08-09T13:11:30.141Z"}]}'
Ingested 1 bounded meters. Cached meters: 3.

doctor

Reports connector detection, freshness, drift, and cache health. Drift stays UNVERIFIED until an explicit verifier exists, and the output is redacted by design.

demo

Renders synthetic fixtures so you can see the output shape without any real account. Every value it prints is invented. The block below is the real output of that command, pasted in unedited.

captured 10 August 2026, synthetic fixtures
NO_COLOR=1 node packages/cli/dist/bin.js demo
PROVIDER METER BAR USAGE AMOUNT STATE RESET IN
CLAUDE FIVE_HOUR ####...... 42.00PERCENT NONE fresh 2026-08-10T09:12:01.000Z 4h59m
CLAUDE SEVEN_DAY ######.... 64.00PERCENT NONE fresh 2026-08-17T04:12:01.000Z 6d23h
OPENROUTER Account balance NONE NONE $7.53 fresh NONE NONE
CODEX PRIMARY ########.. 84.00PERCENT NONE fresh 2026-08-10T09:12:01.658Z 5h0m
ANTIGRAVITY PRIMARY ##........ 28.00PERCENT NONE fresh 2026-08-11T04:12:01.658Z 1d0h
OPENCODE PRIMARY #########. 92.00PERCENT NONE fresh 2026-08-11T04:12:01.658Z 1d0h
MANUAL MONTHLY ###....... 35.00PERCENT NONE fresh 2026-09-10T04:12:01.658Z 31d0h

export

Prints the cache as canonical JSON, suitable for a script to parse. Exits 3 when the cache holds no bounded quota data.

Exit codes

Exit codes and what they mean
codemeaning
0Success.
1A genuine failure.
2A usage error, such as an unknown provider id.
3No bounded quota data is available.

Behaviour worth knowing

  • Standard input is bounded and time limited, so a command never waits on a stream that does not end.
  • Displayed percentages are truncated rather than rounded, so no surface can report a cap that was not reached.
  • --provider and --payload each need a value. Passing the flag without one is a usage error.
  • Only login, sync and refresh reach the network, and only to the hub or to a provider whose login is already on this machine. Every other command is a parser over something already local.