Skip to main content
Before the CLI can reach your data, you need to sign in. It uses OAuth, a browser-based sign-in, so you never have to copy or store a token by hand. You can check whether you’re signed in at any time with appsignal-cli auth status.

Sign in

Run:
Shell
appsignal-cli auth login
This opens your browser to authorize the CLI with your AppSignal account, then hands control back through a local callback on http://127.0.0.1:9789/callback. Once you approve, the CLI stores the tokens and refreshes them for you, so you won’t have to sign in again.
The browser flow needs a browser on the same machine as the CLI.

Set a default organization

If you belong to more than one organization, set a default while you sign in, so you don’t have to pass it on every command:
Shell
appsignal-cli auth login --org <YOUR_ORG_SLUG>
Your organization slug is the short name in your AppSignal URL: appsignal.com/<org-slug>. Running appsignal-cli apps list after you sign in also saves your account’s organization as the default.

Check your status

To see whether you’re signed in, and which config the CLI is reading, run:
Shell
appsignal-cli auth status
appsignal-cli about shows the same authentication status alongside your version, endpoint, and default organization.

Sign out

To remove your stored credentials:
Shell
appsignal-cli auth logout

Where your credentials live

The CLI stores your credentials in a global config file, in your operating system’s standard config directory. The exact location varies by OS, so run appsignal-cli auth status to see the path the CLI is using.

Project-local configuration

You can also keep configuration alongside a project, in an .appsignal.toml file in the project directory. Create one with:
Shell
appsignal-cli project init
A project-local config is handy for pinning a repository to a specific organization. To set the default organization for the project as you create it:
Shell
appsignal-cli project init --org <YOUR_ORG_SLUG>
When a project-local .appsignal.toml is present, the CLI uses the nearest one as the only config for commands run in that directory or its subdirectories. For the full list of config keys and how they resolve, see Configuration.
project init doesn’t copy your global OAuth credentials into the project config. After creating it, run appsignal-cli auth login again inside the project to set up project-specific credentials.

Next steps

You’re signed in. Next, list your applications to find the apps you’ll be querying.