Install the CLI
Install the anlyon CLI from npm on Node 20.3 or later, check the install, upgrade it and remove it.
The CLI is the npm package @anlyonhq/cli. It installs one executable, anlyon. The package has no runtime dependencies: the Anlyon TypeScript SDK is bundled into it, so installing it adds nothing else to your machine or your CI image.
Check your Node version
The CLI needs Node 20.3 or later ("engines": { "node": ">=20.3.0" }).
node --version
On an older Node, npm prints an EBADENGINE warning during the install. Upgrade Node before you use the CLI.
Install from npm
npm install -g @anlyonhq/clipnpm add -g @anlyonhq/cliTo run a single command without a global install:
npx @anlyonhq/cli --version
In CI, pin the version you tested with, so a new release cannot change a job’s behaviour on its own:
npm install -g @anlyonhq/cli@0.3.0
The CLI runs wherever Node 20.3 or later runs, including Linux, macOS and Windows. Browser login stores its credential in the operating system’s credential store. On Linux that needs secret-tool. See Where the credential is kept.
Verify the install
anlyon --version
anlyon 0.3.0 (@anlyonhq/sdk 2.3.0, node 20.18.0)
The output names the CLI version, the @anlyonhq/sdk version bundled into this build, and the runtime. With --json it prints one object:
anlyon --version --json
{
"cli": "0.3.0",
"sdk": "2.3.0",
"runtime": "node 20.18.0",
"platform": "linux/x64"
}
Then check the whole path to Anlyon, one line per layer:
anlyon doctor
anlyon doctor checks the version, the config directory, which profile commands will use, the credential store, that the API answers, your clock against the server’s, OAuth discovery for a browser login, and the credential. It exits 0 when no check fails and 1 otherwise. A warning does not fail it. Before you log in, the credential check fails with not logged in. That is expected. Log in next.
Upgrade
Install again with the version you want:
npm install -g @anlyonhq/cli@latest
anlyon --version
Your profiles and stored credentials stay as they are. They live in the config directory and the credential store, not in the package.
While the CLI is 0.x, read the changelog before you upgrade a pinned CI version. A change to a command, flag, JSON field or exit code is marked Breaking there.
Uninstall
Log out of each profile first. Uninstalling the package does not revoke a login or delete stored credentials.
anlyon profile list
anlyon auth logout --profile default --forget
npm uninstall -g @anlyonhq/cli
auth logout revokes the profile’s refresh token and deletes its credential from the credential store. --forget also removes the profile from the config file. Repeat it for each profile profile list shows.
The config directory then holds no secrets, and you can delete it: ~/.config/anlyon (or $XDG_CONFIG_HOME/anlyon) on Linux and macOS, %APPDATA%\anlyon on Windows, or the directory ANLYON_CONFIG_DIR names.
Fix install problems
| What you see | What to do |
|---|---|
anlyon: command not found after a global install |
npm’s global bin directory is not on your PATH. Run npm prefix -g and add its bin directory (on Windows, the directory itself) to PATH, then open a new terminal. |
EBADENGINE warning during the install |
Your Node is older than 20.3. Upgrade Node, then install again. |
EACCES during npm install -g |
npm’s global directory belongs to another user. Use a Node version manager, or set npm’s prefix to a directory you own. Do not install with sudo. |
anlyon doctor fails the credential store check |
Browser login cannot store its credential. On Linux, install secret-tool (package libsecret-tools) and a Secret Service such as gnome-keyring. On a server, use an API key. See Log in and profiles. |

