---
title: Prefactor CLI
description: Use the Prefactor CLI to manage accounts, environments, and agents
  from the terminal, in CI pipelines, or from inside a coding tool.
editUrl: true
head: []
template: doc
sidebar:
  hidden: false
  attrs: {}
pagefind: true
draft: false
---

The Prefactor CLI is the command-line tool for working with the Prefactor API without writing code. You can use it to query accounts, list environments, manage agents, and run bulk operations from any terminal.

For interactive use, install the binary, run `prefactor login`, and use named profiles to switch between accounts. For automation, the CLI reads credentials from `PREFACTOR_API_TOKEN` so it works in CI and other non-interactive environments without a config file. Commands that accept JSON payloads also accept a file path prefixed with `@` (`--items @./bulk-items.json`), which keeps large or repeated inputs in versioned files rather than inline.

Coding tools like Cursor and Claude Code can invoke the CLI directly. The [agent skills](/cli/agent-skills) provide instruction files that tell those tools how to bootstrap Prefactor resources, instrument agents, and record risk data — covering the patterns that come up repeatedly when setting up a new integration.

## In this section

- [Getting started](/cli/getting-started) — install the CLI, configure a profile, and run your first commands
- [Configuration](/cli/configuration) — config file format, profiles, and environment variables
- [Agent skills](/cli/agent-skills) — install skills that teach coding tools how to work with Prefactor