---
url: /automate.md
---
# Automate Pandra

Scripts, CI jobs, containers, and AI agents use the same commands as you. Without a terminal, Pandra asks no question: a command that needs an answer fails, and its error lists the commands that fix it, in order.

```text
$ pandra run github.com/acme/reviewer@v1.2.0 --harness claude-code \
    --prompt "Review PR 12." --no-interactive
error: github.com/acme/reviewer@v1.2.0 cannot start: 1 problem
  claude-code is not installed
  To install it:
    pandra harness install claude-code
```

* [Output and errors](/automate/output.md): JSON documents, the event stream, structured answers, error documents, and exit codes.
* [Use by AI agents](/automate/ai-agents.md): what to set up so an AI agent runs, checks, and waits for other agents, and what stays with you.

Running in CI, container images, and editors are under [Integrate with other tools](/integrations.md).

## Non-interactive commands

A command is non-interactive when there is no terminal, with `--no-interactive` or `PANDRA_NO_INTERACTIVE=1`, with `--json`, and inside a Pandra run. Under a pseudo-terminal, such as `docker run -t` or `ssh -t`, also pass `--headless` to `pandra run` and `pandra resume`, which otherwise open the harness's interface ([headless, TUI, and ACP](/run/starting.md#headless-tui-and-acp)).

`--no-config`, or `PANDRA_NO_CONFIG=1`, reads no configuration file, for a check in a clean environment. Package approvals still apply.

## What `--yes` does

`-y`, `--yes` answers Pandra's own confirmations: approving an agent before it runs, approving a guild's members with `pandra guild trust` or before `pandra quest run`, installing a harness, and pruning.

* `pandra run --yes` approves an agent that needs approval, such as a remote agent on its first run. It does so on a terminal and with `--acp` too. The run asks nothing, so you see what the agent contains only after the approval, when the run prints the summary on stderr ([approving an agent](/run/trust.md#approving-an-agent)).
* It never allows a server, gives a secret to an agent, or skips the harness's permission checks.

For an unattended run, approve a pinned reference ahead of time instead. `pandra pull` prints what it fetched into your log, and the run then asks nothing:

```sh
pandra pull github.com/acme/reviewer@<full-commit>
pandra agent trust github.com/acme/reviewer@<full-commit>
pandra run github.com/acme/reviewer@<full-commit> --harness claude-code \
    --prompt "Review PR 12."
```
