Skip to content
AtheronDEVELOPERS
← SDKs and libraries

The atheron CLI

Sign in, list apps, rotate secrets and forward webhooks to localhost from your terminal.

Sign in to see your own test client ID in the samples.

Coming soon. @aton-network/cli is not published on npm yet, so the install line on this page does not work until it is. Until then, everything works over plain HTTP: pick cURL in any code block, or start from Endpoints.

The atheron command signs you in with your Atheron account, lists your apps, rotates client secrets, and brings your test environment's webhooks to your own machine.

Install

bash
npm install --global @aton-network/cli

Sign in

Your browser opens on this portal. Check that the pairing code it shows is the one in your terminal, then confirm. The CLI makes its token on your machine and never sends it through the browser: only its hash travels, and the portal answers your machine's own address (127.0.0.1) with an activation only that token can use. So a link somebody else made cannot sign you in on their machine.

The sign-in lasts 14 days, sits in a file only you can read, and ends with atheron logout. In CI, set ATHERON_CLI_TOKEN instead.

bash
atheron login

Your apps

bash
atheron apps list
atheron apps get "Price Check"        # an app's ID, a client ID or its name

Rotate a client secret

The new secret is shown once. With --revoke-old the environment's other secrets stop working right after the new one exists, so there is no gap. Without it they keep working until you run atheron secrets revoke <id>. Owners and admins rotate live secrets; developers rotate test ones too.

bash
atheron secrets rotate "Price Check" --env live --revoke-old

Webhooks on your machine

listen prints a signing secret for the session and signs every event it forwards with it, exactly as we sign a real delivery: the same body, Atheron-Signature and Atheron-Event-Id. Point your handler's secret at it while you test. It needs no public address. It forwards the test environment's events from the moment you start; trigger makes a test event (marked "test": true, for a made-up person), thirty a minute at most.

bash
atheron webhooks listen "Price Check" --forward-to http://localhost:3000/webhooks
atheron webhooks trigger "Price Check" user.signed_in

Send past deliveries again

deliveries lists the last thirty days of deliveries, newest first, with the resends among them (--env, --state waiting|delivered|gave-up, --limit up to 100). replay sends the deliveries you name again, exactly as they were: the same body and the same Atheron-Event-Id, so a handler that drops repeats still can, signed at the moment it goes. --failed resends the ones that gave up and have not been resent yet. Each resend is tried once, so you see straight away whether your endpoint took it. Up to 25 in one go and 60 an hour for an app; live deliveries need the owner or admin role. Every resend is in the app's Activity, and the portal's Webhooks tab does the same.

bash
atheron webhooks deliveries "Price Check" --state gave-up
atheron webhooks replay "Price Check" 812 813
atheron webhooks replay "Price Check" --failed --env test

Other tools

CommandWhat it does
atheron whoamiWho this CLI is signed in as
atheron tokens decode <jwt>A token's header and claims, with readable times (no signature check)
atheron webhooks verify --secret ... --header ... --body-file ...Whether a delivery you saved is genuine
atheron api app, atheron api usage --days 7The developer API, with ATHERON_API_KEY
atheron api graphql '<document>' or @file.graphql --variables '{...}'One GraphQL request, with ATHERON_API_KEY; exits 1 when a field failed
atheron open docsThis site in your browser

Every command takes --json. Exit codes: 0 done, 1 refused or failed, 2 a mistake in the command, 3 not signed in.

Ask Atlas

AI assistant

Ask anything about Sign in with Atheron, the API or the portal. You get an answer from our docs, with links to the pages it used.