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

# Sawmills CLI

> Install the Sawmills sm CLI via Homebrew, authenticate with your account, and explore the full command reference for managing collectors and pipelines.

This page documents the `sm` binary shipped by Sawmills.

Every command accepts these global flags:

| Flag           | Meaning                                                     |
| -------------- | ----------------------------------------------------------- |
| `--json`       | Emit JSON output instead of human-readable tables or prose. |
| `--debug`      | Print richer debug/error output.                            |
| `-h`, `--help` | Show command help.                                          |

At the root level, `sm -V` and `sm --version` print the installed CLI version.

## Install the CLI

### Homebrew

This is the primary install path for macOS and Linux:

```bash theme={null}
brew tap sawmills/tap https://github.com/Sawmills/homebrew-tap
brew install sawmills/tap/sm
sm --version
```

## Uninstall the CLI

```bash theme={null}
brew uninstall sm
```

## Login and organization selection

The CLI uses a browser-based OAuth PKCE flow.

```bash theme={null}
sm login
```

Confirm your authentication:

```bash theme={null}
sm auth status
```

Expected output:

```bash theme={null}
Checking API access...
Profile: prod
Status: Authenticated
```
