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

# CLI

> Manage Dedalus Machines from the terminal.

The Dedalus CLI wraps the [Go SDK](https://github.com/dedalus-labs/dedalus-go) with command-line argument parsing, auto-pagination, shell completions, and an interactive TUI explorer.

## Install

<CodeGroup>
  ```bash Homebrew theme={"theme":{"light":"github-light","dark":"github-dark"}}
  brew install dedalus-labs/tap/dedalus
  ```

  ```bash Go theme={"theme":{"light":"github-light","dark":"github-dark"}}
  go install github.com/dedalus-labs/dedalus-cli/cmd/dedalus@latest
  ```

  ```bash curl theme={"theme":{"light":"github-light","dark":"github-dark"}}
  curl -fsSL https://www.dedaluslabs.ai/install/dedalus | bash
  ```

  ```powershell PowerShell theme={"theme":{"light":"github-light","dark":"github-dark"}}
  powershell -c "irm https://www.dedaluslabs.ai/install/dedalus | iex"
  ```
</CodeGroup>

## Authentication

Set your API key:

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
export DEDALUS_API_KEY=your-api-key
```

## Usage

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
dedalus machines create --vcpu 1 --memory-mib 2048 --storage-gib 10 --autosleep 15m
dm list  # after alias dm='dedalus machines'
dedalus machines retrieve --machine-id dm-abc123
dm update --machine-id dm-abc123 --autosleep never
```

### Subresources

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
dedalus ssh dm-abc123
dedalus machines executions create --machine-id dm-abc123 --command '["echo", "hello"]'
dedalus machines terminals list --machine-id dm-abc123
dedalus machines artifacts list --machine-id dm-abc123
```

### Output formats

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
dedalus machines list --format json
dedalus machines list --format explore  # interactive TUI
```

### Piping input

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
dedalus machines create <<YAML
vcpu: 2
memory_mib: 4096
storage_gib: 20
autosleep: 15m
YAML
```

### Data transformation

Filter responses with JSONPath-style syntax:

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
dedalus machines list --transform "items.#.machine_id"
```

## Shell completions

Homebrew installs completions automatically. For manual installs:

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
dedalus @completion bash > ~/.bash_completion.d/dedalus
dedalus @completion zsh > "${fpath[1]}/_dedalus"
dedalus @completion fish > ~/.config/fish/completions/dedalus.fish
```

## Links

|              |                                                                           |
| ------------ | ------------------------------------------------------------------------- |
| Repository   | [dedalus-labs/dedalus-cli](https://github.com/dedalus-labs/dedalus-cli)   |
| Homebrew tap | [dedalus-labs/homebrew-tap](https://github.com/dedalus-labs/homebrew-tap) |
