> ## Documentation Index
> Fetch the complete documentation index at: https://docs.appsignal.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Installation & authentication

> Install the AppSignal CLI, sign in with OAuth, and manage where your credentials are stored.

Install the CLI, then sign in to connect it to your AppSignal account.

<h2 id="installation">
  Installation
</h2>

The CLI runs on macOS and Linux, on both Intel (`x86_64`) and Apple Silicon / ARM (`arm64`) machines. Linux distributions based on musl, such as Alpine, are supported too.

<Tabs>
  <Tab title="Homebrew">
    Install the formula. Homebrew taps `appsignal/appsignal-cli` automatically:

    ```sh theme={null}
    brew install appsignal/appsignal-cli/appsignal-cli
    ```

    To upgrade later, run:

    ```sh theme={null}
    brew upgrade appsignal-cli
    ```
  </Tab>

  <Tab title="Install script (macOS & Linux)">
    Install the latest release with the one-liner below. It needs super-user privileges to install the binary on your system path, and verifies the download against the published `SHA256SUMS` manifest before installing:

    ```sh theme={null}
    curl -sSL https://github.com/appsignal/appsignal-cli/releases/latest/download/install.sh | sudo sh
    ```

    Re-run the same command at any time to update to the latest release.
  </Tab>
</Tabs>

<Note>
  Prefer not to pipe a script into your shell? Download the binary for your platform directly from the [latest release](https://github.com/appsignal/appsignal-cli/releases/latest/).
</Note>

<h3 id="verify-the-installation">
  Verify the installation
</h3>

Check that the CLI is on your `PATH`:

```sh Shell theme={null}
appsignal-cli --version
```

Then run `appsignal-cli about` for an overview of your setup, including its version, endpoint, default organization, and authentication status:

```sh Shell theme={null}
appsignal-cli about
```

Before you authenticate, it'll show `Auth: Not authenticated` and point you at the commands to run next.

<h2 id="authentication">
  Authentication
</h2>

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`.

Run:

```sh Shell theme={null}
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.

<Note>
  The browser flow needs a browser on the same machine as the CLI.
</Note>

<h2 id="set-a-default-organization">
  Set a default organization
</h2>

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:

```sh Shell theme={null}
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.

<h2 id="check-your-status">
  Check your status
</h2>

To see whether you're signed in, and which config the CLI is reading, run:

```sh Shell theme={null}
appsignal-cli auth status
```

`appsignal-cli about` shows the same authentication status alongside your version, endpoint, and default organization.

<h2 id="sign-out">
  Sign out
</h2>

To remove your stored credentials:

```sh Shell theme={null}
appsignal-cli auth logout
```

<h2 id="where-your-credentials-live">
  Where your credentials live
</h2>

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.

<h3 id="project-local-configuration">
  Project-local configuration
</h3>

You can also keep configuration alongside a project, in an `.appsignal.toml` file in the project directory. Create one with:

```sh Shell theme={null}
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:

```sh Shell theme={null}
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](/cli/configuration).

<Note>
  `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.
</Note>

<h2 id="next-steps">
  Next steps
</h2>

You're signed in. Next, [list your applications](/cli/apps) to find the apps you'll be querying.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.