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

# CLI Reference

> The openlinear command — launch the desktop app and manage GitHub authentication.

```bash theme={null}
npm install -g openlinear
```

***

## Launch

```bash theme={null}
openlinear [args...]
```

The launcher searches for the desktop binary in the following order:

| Platform | Search paths |
| - | - |
| macOS | `~/Applications/OpenLinear.app`, `~/.openlinear/OpenLinear.app` |
| Linux | `~/.openlinear/openlinear`, `~/.openlinear/openlinear.AppImage` |

On Linux, the launcher applies environment flags for X11/Wayland compatibility and passes all arguments through to the app.

If the binary is not found:

```
OpenLinear desktop app not found.

Install it from npm:
  npm install -g openlinear

Or download the latest desktop release:
  https://github.com/kaizen403/openlinear/releases/latest
```

***

## GitHub Commands

All GitHub auth commands use local-only flows. No hosted callback server is required.

| Command | Description |
| - | - |
| `openlinear github login` | Authenticate with GitHub (auto-selects best method) |
| `openlinear github login --browser` | Force browser-based OAuth flow |
| `openlinear github login --device` | Force device flow (for headless environments) |
| `openlinear github status` | Show current auth status |
| `openlinear github whoami` | Display authenticated GitHub username |
| `openlinear github logout` | Remove stored credentials |

See [GitHub Authentication](https://openlinear.mintlify.site/cli/github-auth) for detailed flow documentation.

***

## Post-Install Behavior

When you run `npm install -g openlinear`, the `postinstall` script runs automatically:

**1. Platform detection**

Identifies macOS (Apple Silicon / Intel) or Linux x64.

**2. Binary download**

Downloads the latest desktop release from GitHub Releases.

**3. Installation**

* **macOS**: Places `OpenLinear.app` in `~/Applications/`
* **Linux**: Places the AppImage in `~/.openlinear/` and registers a `.desktop` entry at `~/.local/share/applications/openlinear.desktop`

***

## Library API

The `openlinear` package also exports TypeScript utilities for programmatic use:

| Entry point | Contents |
| - | - |
| `openlinear` | Re-exports everything below |
| `openlinear/types` | Zod schemas, validation functions for execution metadata |
| `openlinear/validation` | Payload sanitization and forbidden-field utilities |
| `openlinear/config` | Feature flag parsing and execution mode helpers |

See [Library Overview](https://openlinear.mintlify.site/library/overview) for full API documentation.


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