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

# CLI overview

> Install the mka1 CLI, enable shell completion, and run your first MKA1 API command from the terminal.

`mka1` is the official command-line interface for the MKA1 API.
Every operation you can call through the REST API is available as a command, with flags, stdin piping, multiple output formats, and an interactive command explorer.

Use it to:

* Script one-off API calls and CI jobs without bringing in an SDK.
* Inspect live data quickly — list responses, download files, search a vector store.
* Prototype request bodies before porting them into the TypeScript, C#, or Python SDK.

## Install

Pre-built binaries for every supported platform are served from [downloads.mka1.com](https://downloads.mka1.com/download.html). The `*-latest` URLs always redirect to the newest release, so you can bookmark them in scripts and CI.

| Platform | Architecture            | Download                                                                                                 |
| -------- | ----------------------- | -------------------------------------------------------------------------------------------------------- |
| macOS    | arm64 (Apple silicon)   | [`mka1_darwin_arm64-latest.tar.gz`](https://downloads.mka1.com/darwin/mka1_darwin_arm64-latest.tar.gz)   |
| macOS    | x86\_64 (Intel)         | [`mka1_darwin_x86_64-latest.tar.gz`](https://downloads.mka1.com/darwin/mka1_darwin_x86_64-latest.tar.gz) |
| Linux    | x86\_64 (Debian/Ubuntu) | [`mka1_linux_x86_64-latest.deb`](https://downloads.mka1.com/linux/mka1_linux_x86_64-latest.deb)          |
| Linux    | x86\_64 (RHEL/Fedora)   | [`mka1_linux_x86_64-latest.rpm`](https://downloads.mka1.com/linux/mka1_linux_x86_64-latest.rpm)          |
| Windows  | x86\_64                 | [`mka1_windows_x86_64-latest.zip`](https://downloads.mka1.com/windows/mka1_windows_x86_64-latest.zip)    |

### macOS

```bash theme={null}
curl -fsSL https://downloads.mka1.com/darwin/mka1_darwin_arm64-latest.tar.gz \
  | tar -xz -C /usr/local/bin mka1
```

Swap `arm64` for `x86_64` on Intel Macs.

### Linux

```bash theme={null}
# Debian / Ubuntu
curl -fsSLo mka1.deb https://downloads.mka1.com/linux/mka1_linux_x86_64-latest.deb
sudo dpkg -i mka1.deb

# RHEL / Fedora / Amazon Linux
curl -fsSLo mka1.rpm https://downloads.mka1.com/linux/mka1_linux_x86_64-latest.rpm
sudo rpm -i mka1.rpm
```

### Windows

Download [`mka1_windows_x86_64-latest.zip`](https://downloads.mka1.com/windows/mka1_windows_x86_64-latest.zip), extract it, and add the folder containing `mka1.exe` to your `PATH`.

## Verify the install

Print the CLI version to confirm the binary is on your `PATH`:

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

Every command supports `--help`, which prints a description, usage, and the flags that apply:

```bash theme={null}
mka1 --help
mka1 llm responses create --help
```

## Enable shell completion

Completions are generated on demand and cover subcommands, flags, and known enum values.

<CodeGroup>
  ```bash bash theme={null}
  # Ephemeral, for the current shell:
  source <(mka1 completion bash)

  # Persistent, system-wide:
  mka1 completion bash > /etc/bash_completion.d/mka1
  ```

  ```zsh zsh theme={null}
  # Add to ~/.zshrc:
  source <(mka1 completion zsh)

  # Or install permanently:
  mka1 completion zsh > "${fpath[1]}/_mka1"
  ```

  ```fish fish theme={null}
  mka1 completion fish | source

  # Or install permanently:
  mka1 completion fish > ~/.config/fish/completions/mka1.fish
  ```

  ```powershell PowerShell theme={null}
  mka1 completion powershell | Out-String | Invoke-Expression
  ```
</CodeGroup>

## Run your first request

Authenticate once, then call any endpoint.
The quickest path is to set your key in an environment variable and generate a response:

```bash theme={null}
export MKA1_BEARER_AUTH="Bearer <mka1-api-key>"

mka1 llm responses create \
  --model auto \
  --input '"Write a one-sentence summary of the MKA1 API."'
```

For a persistent setup that stores secrets in your OS keychain, see [authenticate the CLI](/docs/cli/authentication).

## Explore interactively

`mka1 explore` launches a terminal UI that lets you browse every command group, inspect each command's flags, and execute it without leaving the shell:

```bash theme={null}
mka1 explore
```

Use it when you are not sure which subcommand or flag name to reach for.

## Next steps

* [Authenticate the CLI](/docs/cli/authentication) — configure credentials and end-user identity.
* [Commands](/docs/cli/commands) — a tour of the command groups with worked examples.
* [Pass request bodies](/docs/cli/request-body) — mix individual flags, `--body`, and stdin.
* [Format and filter output](/docs/cli/output-formats) — switch between JSON, YAML, table, and TOON, and transform results with jq.
* [Debug and inspect](/docs/cli/diagnostics) — preview requests with `--dry-run`, trace them with `--debug`, and enable agent mode.
