# CLI

> Install the Antarya command line, sign in and ask from your terminal.

## Install

On macOS and Linux:

```bash
curl -fsSL https://antarya.ai/install.sh | sh
```

On Windows, in PowerShell:

```bash
irm https://antarya.ai/install.ps1 | iex
```

## Sign in

`antarya login` opens your browser and saves a key on this machine. To use a key you made yourself, set `ANTARYA_API_KEY` instead.

```bash
antarya login
```

## Ask a question

Put the question in quotes. The reply prints and the command ends.

```bash
antarya "Draft a reply that declines the meeting."
```

Pipe a file in and ask about it:

```bash
cat agreement.txt | antarya "Summarise the termination clause."
```

## Options

- `--system` (text, optional): Instructions that apply to the whole conversation, for example "Answer in plain English."
- `--json` (flag, optional): Print the full response as JSON instead of only the reply text.
- `--file` (path, optional): Attach a file to the question. Repeat the option to attach more than one.

```bash
antarya --file agreement.pdf --system "Answer in plain English." "What can I end this early for?"
```

## A conversation

`antarya chat` opens a conversation that keeps its history in a [session](https://antarya.ai/docs/guides/sessions.md) until you leave it with Ctrl+D. Leaving deletes the session.

```bash
antarya chat
```

## Config and uninstall

The CLI keeps its settings in `~/.config/antarya/config.toml` on macOS and Linux, and in `%APPDATA%\antarya\config.toml` on Windows. Delete that file to sign out.

To uninstall, run `antarya uninstall`. It removes the program and the config file.

## Next steps

- [Quickstart](https://antarya.ai/docs/quickstart.md): Make a key and send your first request.
- [Python SDK](https://antarya.ai/docs/sdk/python.md): Use Antarya from Python.
- [TypeScript SDK](https://antarya.ai/docs/sdk/typescript.md): Use Antarya from TypeScript.
