---
title: Using the CLI
description: Authenticate the akos command line and scaffold your first workspace.
---

The `akos` command line operates AKOS from your terminal and CI — authenticate, scaffold a workspace, run flows, manage triggers, and deploy.

## Authenticate

The CLI signs in with a device-code grant and stores your credentials securely on your machine:

```bash
akos auth login
```

Useful related commands:

```bash
akos auth whoami     # show the signed-in identity
akos auth status     # check your session
akos tenant list     # list accessible tenants
akos tenant use <id> # local/self-host tenant switch
akos auth logout     # end the session
```

## Scaffold a workspace

Create a new workspace configuration with sensible defaults:

```bash
akos init
```

You can start from a starter template to get a working agent immediately, then edit it in the app or in your config.

## Operate from the terminal

Common first commands after `akos init`:

```bash
akos doctor --creds          # verify provider keys are present
akos connections guide slack # read setup steps from the registry
akos flows list --json       # inspect inline flows (sidecar required)
akos run akos.config.yaml    # dry-run your first flow
```

## Next steps

- Topic walkthroughs: **[CLI Guide](/docs/cli)** (authentication, connections, flows, pipelines, knowledge, security, costs).
- Full command table: **[Command reference](/docs/cli/command-reference)**.
- Prefer a visual interface? Open the **[web app](/docs/getting-started/web)** instead.

<Callout>The CLI authenticates to the same workspace as the web and desktop apps. Anything you create from the CLI shows up in the app, governed and audited the same way.</Callout>
