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

# CLI Quickstart

> Install, authenticate, and run your first PromptLoop command in minutes

## Install the CLI

```bash theme={null}
npm install -g @promptloop/cli
```

Or run without a global install:

```bash theme={null}
npx @promptloop/cli --help
```

## Authenticate

Use browser login (recommended):

```bash theme={null}
promptloop auth login --browser
```

Or authenticate directly with an API key:

```bash theme={null}
promptloop auth login --api-key YOUR_API_KEY
```

Verify auth status:

```bash theme={null}
promptloop auth whoami
```

<Note>
  Create API keys from your PromptLoop settings page:
  [promptloop.com/account/settings](https://promptloop.com/account/settings)
</Note>

## Run your first task

<img src="https://mintcdn.com/promptloop/KPd7ccJgXyrE5ybD/images/cli-quickstart-graphic.svg?fit=max&auto=format&n=KPd7ccJgXyrE5ybD&q=85&s=2188ce23527f084d88aeeb4f705b570a" alt="PromptLoop CLI flow diagram" width="1200" height="420" data-path="images/cli-quickstart-graphic.svg" />

List tasks:

```bash theme={null}
promptloop tasks list
```

Run one task with inputs:

```bash theme={null}
promptloop tasks run YOUR_TASK_ID --inputs "https://promptloop.com"
```

## Run a batch job

Create a batch from a CSV or JSON file:

```bash theme={null}
promptloop batches create --task-id YOUR_TASK_ID --file ./input.csv
```

Watch status:

```bash theme={null}
promptloop batches status YOUR_BATCH_ID --watch
```

Fetch results:

```bash theme={null}
promptloop batches results YOUR_BATCH_ID --wait
```

## Claude quick copy

Use this as a drop-in prompt for Claude when you want it to run the same CLI workflow.

<CodeGroup>
  ```md Prompt template theme={null}
  You are helping me run PromptLoop from the CLI.

  1. Confirm I am authenticated:
     - promptloop auth whoami
  2. List available tasks:
     - promptloop tasks list
  3. Run a task:
     - promptloop tasks run YOUR_TASK_ID --inputs "https://promptloop.com"
  4. Run a batch from file:
     - promptloop batches create --task-id YOUR_TASK_ID --file ./input.csv
  5. Check progress:
     - promptloop batches status YOUR_BATCH_ID --watch
  6. Fetch results:
     - promptloop batches results YOUR_BATCH_ID --wait

  Ask me for missing IDs before executing commands.
  ```

  ```bash Command sequence theme={null}
  promptloop auth whoami
  promptloop tasks list
  promptloop tasks run YOUR_TASK_ID --inputs "https://promptloop.com"
  promptloop batches create --task-id YOUR_TASK_ID --file ./input.csv
  promptloop batches status YOUR_BATCH_ID --watch
  promptloop batches results YOUR_BATCH_ID --wait
  ```
</CodeGroup>
