Skip to main content

Install the CLI

npm install -g @promptloop/cli
Or run without a global install:
npx @promptloop/cli --help

Authenticate

Use browser login (recommended):
promptloop auth login --browser
Or authenticate directly with an API key:
promptloop auth login --api-key YOUR_API_KEY
Verify auth status:
promptloop auth whoami
Create API keys from your PromptLoop settings page: promptloop.com/account/settings

Run your first task

List tasks:
promptloop tasks list
Run one task with inputs:
promptloop tasks run YOUR_TASK_ID --inputs "https://promptloop.com"

Run a batch job

Create a batch from a CSV or JSON file:
promptloop batches create --task-id YOUR_TASK_ID --file ./input.csv
Watch status:
promptloop batches status YOUR_BATCH_ID --watch
Fetch results:
promptloop batches results YOUR_BATCH_ID --wait

Optional: point CLI to a local API

promptloop config set api_url http://localhost:8080
promptloop config list
To switch back to production:
promptloop config set api_url https://api.promptloop.com