Skip to main content
authforge is the command line for the Developer API. Run it with no arguments for a full-screen interactive mode, or with a command for one result and an exit code. Every command takes flags and prints JSON with --json, so the same tool works by hand and in a pipeline.
The interactive mode: browsing apps, filtering licenses, issuing three new ones and watching the live log

The interactive mode, recorded against made-up data

It manages your account: apps, licenses, webhooks, logs. Checking a license inside your own software is the job of an SDK.

Install

It needs Node.js 22.12 or later and runs in PowerShell and Windows Terminal, and in any terminal on macOS and Linux. To try it without installing, run npx authforge.

Sign in

1

The CLI shows a code and opens the pairing page

The page is app.authforge.cc/pair. If no browser can be opened (over SSH, for example), the link is printed: open it on any device where you are signed in to the dashboard.
2

You check the code and approve

The page lists what the key will be allowed to do. Untick anything you do not want, choose how long the key lives (7, 30 or 90 days) and approve.
3

The CLI stores the key

It goes into the operating system’s credential store: Windows Credential Manager, the macOS Keychain, or the Secret Service (GNOME Keyring, KWallet) on Linux. Where there is none, it goes into a file only your user account can read. The CLI says which one it used.
No password is typed in the terminal, and the whole key is never printed: authforge whoami shows its first characters, its scopes, when it expires and where it is stored. The key appears on the dashboard’s API Keys page with a CLI badge and can be revoked there. authforge logout revokes it and removes it from the machine, and signing in again replaces it and revokes the old one.

Scopes

A key from authforge login may read and write apps and licenses, read logs and read the account, unless you ask for something else:
The scopes are the Developer API’s scopes. Each command’s --help names the ones it needs, and a command your key lacks the scope for fails with the scope’s name and the login command that adds it.

First commands

An app is given by its ID, its name, or the start of either, with --app or once with authforge use. authforge <command> --help describes every flag and gives examples.
Three commands and their output: status, licenses create and logs search

Interactive mode

authforge on its own opens a full-screen view of your apps, each app’s licenses, a live log, webhooks with their deliveries, and your account. Quitting leaves the terminal as it was.
The apps screen: the list of apps on the left, the selected app's settings and last 24 hours on the right
Each screen lists its own keys in the bottom line: n creates, r revokes or reactivates a license, e extends it, t opens an app’s live log, and so on. Anything destructive asks first, and deleting an app asks you to type its name. An action your key has no scope for is dimmed, and pressing it says which scope is missing. The interactive mode needs a terminal. When output is piped or the CLI runs in CI, authforge with no arguments prints help instead.

Commands

Account

Apps

Licenses

An expiry cannot be removed through the API. licenses extend --days therefore refuses a license that never expires, and --until on one gives it an expiry for good.

Logs

logs tail keeps going through a dropped connection or a rate limit and picks up where it stopped. Rows appear about two seconds after the event.

Webhooks and security

The webhook commands need the read:webhooks and write:webhooks scopes, which authforge login does not ask for by default: sign in with --scopes +read:webhooks,+write:webhooks.

Everything else

Scripts and CI

Set AUTHFORGE_API_KEY to a key created on the dashboard’s API Keys page. Nothing is stored and no sign-in is needed.
What a script can rely on:
  • stdout carries the result and nothing else. Progress, hints and errors go to stderr.
  • --json prints one JSON document; logs tail --json prints one object per line. An error is then JSON on stderr: {"error":{"code":"...","message":"...","hint":"...","status":403}}.
  • Piped output is plain. Tables become tab-separated lines with no header and no colour, and licenses create prints only the keys.
  • Nothing waits for an answer in a pipeline. Without a terminal, a command that needs a confirmation fails and says to pass --yes.
  • Creating licenses is safe to retry. The request carries an idempotency key, so a retry after a dropped connection never issues twice.
  • --wait waits out a rate limit instead of failing.
The same properties let an AI coding agent run the CLI for you. Developing with AI covers the key to give it and a prompt to start from.

Exit codes

Flags for every command

Environment variables

Shell completion

Troubleshooting

The key file used where there is no credential store is credentials.json in the settings folder, readable by your user account only. Set AUTHFORGE_KEY_STORAGE=file to choose it on purpose, for example on a server without a keyring.
The source is at github.com/AuthForgeCC/authforge-cli.