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

# CLI Installation

> Install and configure the InstaPods CLI.

The InstaPods CLI (`instapods`) is a single binary that lets you deploy and manage apps from the terminal. It's designed for developers and AI agents.

## Install

```bash theme={null}
curl -fsSL https://instapods.com/install.sh | sh
```

This auto-detects your OS and architecture, verifies the SHA256 checksum, and installs to `/usr/local/bin` (or `~/.local/bin` if you don't have sudo).

## Verify Installation

```bash theme={null}
instapods version
```

Prints the CLI version, git commit, build date, and OS/architecture.

## Self-Update

```bash theme={null}
instapods update
```

Checks for the latest version, downloads the new binary, verifies its checksum, and replaces the current binary in-place. Use `--force` to skip the version check or update dev builds.

### Auto-Update Notifications

The CLI automatically checks for new versions in the background every 24 hours. If a newer version is available, you'll see a notice after your command output:

```
! A new version of instapods is available: v1.0.1 -> v1.0.2
  Run instapods update to update.
```

This check is non-blocking and won't slow down your commands. The cooldown state is stored at `~/.instapods/update-check`.

## Configuration

The CLI stores its configuration at `~/.instapods/config.json`:

```json theme={null}
{
  "token": "your-auth-token",
  "api_url": "https://app.instapods.com",
  "team_id": "your-team-id"
}
```

### API URL Priority

The CLI resolves the API URL in this order:

1. `--api` flag (e.g., `instapods --api http://localhost:7070 pods list`)
2. `INSTAPOD_API` environment variable
3. Value from `~/.instapods/config.json`
4. Default: `https://app.instapods.com`

### Global Flags

These flags are available on every command:

| Flag     | Description           |
| -------- | --------------------- |
| `--api`  | Override the API URL  |
| `--json` | Output in JSON format |

## Available Commands

The CLI organizes commands into groups:

| Group              | Commands                                               |
| ------------------ | ------------------------------------------------------ |
| **Authentication** | `login`, `whoami`, `logout`                            |
| **Catalog**        | `presets`, `plans`, `regions`                          |
| **Pod Management** | `pods`, `deploy`                                       |
| **Pod Operations** | `exec`, `ssh`, `ssh-keys`, `files`, `services`, `logs` |
| **Utilities**      | `version`, `update`, `completion`                      |

## Shell Completion

The CLI supports shell completion for bash, zsh, fish, and PowerShell:

```bash theme={null}
# Bash
instapods completion bash > /etc/bash_completion.d/instapods

# Zsh
instapods completion zsh > "${fpath[1]}/_instapods"

# Fish
instapods completion fish > ~/.config/fish/completions/instapods.fish
```

## Next Steps

* [Authentication](/cli/authentication) — Log in to your account
* [Pod Management](/cli/pods) — Create and manage pods
* [Deploy](/cli/deploy) — Deploy code in one command
