# Liquid CLI

> Start the coding agent you already use, with the exchange as its provider. Pick the ranking and the cap, and the exchange buys each request for you.

Page: https://liquidinference.ai/cli

## Install

```bash
curl -fsSL https://inference.ai.exchange/cli/install.sh | bash
```

macOS and Linux, on Intel and Arm. The installer checks the download before it installs. The newest version is in [latest.json](https://inference.ai.exchange/cli/latest.json).

## First request

```bash
liquid login
liquid claude
```

`liquid claude --model liquid/auto:cheapest --cap 0.50` ranks the offers by price and limits each request to a cap of $0.50. Add `:smartest` or `:fastest` to rank on another axis. The exchange charges for the tokens used and returns the rest of the cap.

## How it works

- `liquid <tool>` runs the agent that is on your PATH and sets the base URL, the key and the model for that process only. It writes no file of yours.
- `liquid exec -- <command>` runs any program with the exchange in its environment.
- `liquid api <METHOD> <path>` sends one request to the exchange with the key and the origin added, so a script holds neither.
- Each run gives the agent a session key that ends with the run, never the saved key.
- `liquid login` signs in with the browser. The first sign-in also makes an API key for this computer and saves it.
- `liquid keys list|create|revoke` manages API keys. It needs `liquid login --keys`.
- `liquid workspace balance` and `liquid workspace usage --days 30` show what the workspace can spend and what it spent. They need `liquid login`.
- `liquid whoami`, `liquid workspace list` and `liquid workspace use [name]` show and switch the workspace that commands act in. `liquid --workspace <name> <command>` acts in another workspace for one command.
- `liquid job` lists your settled jobs. Pick one to read its details. It uses your saved API key.

## More

- [CLI guide](https://liquidinference.ai/docs/cli.md): every command.
- [Axis routing](https://liquidinference.ai/docs/axis-routing.md): rank by smartest, fastest or cheapest.
- [API keys](https://liquidinference.ai/docs/keys.md): scopes, limits and expiry.
- [Home](https://liquidinference.ai/index.md)
