---
title: Use with coding agents
description: Connect your coding agent to Orchestor and discover CLI commands as JSON.
canonical_url: https://orchestor.io/docs/en/cli/agents
markdown_url: https://orchestor.io/docs/en/cli/agents.md
related:
  - https://orchestor.io/docs/en/cli/installation
  - https://orchestor.io/docs/en/cli/setup
  - https://orchestor.io/docs/en/mcp/clients
  - https://orchestor.io/docs/en/cli/errors
  - https://orchestor.io/docs/en/cli/quickstart
contentType: guide
---

# Use with coding agents

Use the Orchestor CLI to let a coding agent preview generation requests, generate media, and retrieve results in your Workspace.

## Set up your agent

[Install the CLI](https://orchestor.io/docs/en/cli/installation.md). From your project directory, run the following command yourself so you can approve browser sign-in if prompted.

```bash title="terminal"
orc init --skills --mcp
```

*Select a Workspace, install Orchestor Skills, and configure the hosted MCP server for supported coding agents.*

If your Workspace is already set up, you can install the Skills separately. This example targets Codex.

```bash title="terminal"
orc setup skills --agent codex
```

For a hosted MCP connection on its own, use `orc init --no-skills --mcp`. The standalone `orc setup mcp` writes a legacy local registration for `orc mcp serve`, which is unavailable in the current CLI. See the [setup reference](https://orchestor.io/docs/en/cli/setup.md) for what each command writes and [MCP clients](https://orchestor.io/docs/en/mcp/clients.md) for manual connection instructions.

## Give your agent an instruction

Paste this line into the agent chat or your project's `AGENTS.md`.

```markdown title="AGENTS.md"
Use the orc CLI for Orchestor tasks. Discover commands with orc agent-help --json, inspect each command with --help --json, and request --json for results. Choose an image model with orc image models list --json. Before generating, run the generation command with --dry-run and show me the request. Add --yes only with my explicit approval for that operation.
```

## Discover commands and handle results

```bash title="terminal"
orc agent-help --json
orc image generate --help --json
orc whoami --json
```

*List available commands, inspect a command's arguments and options, and verify the active identity and Workspace.*

Use `orc <command> --help --json` to inspect a command before running it. Pass `--json` for machine-readable results. Standalone setup commands write terminal output. When a JSON command fails, use the process exit code and read `error.reason` and `error.next` from stdout. See [errors and exit codes](https://orchestor.io/docs/en/cli/errors.md).

## Run without prompts

The CLI detects supported coding agents and suppresses prompts. Pass `--non-interactive` to make this explicit in scripts. A person using an agent terminal can restore prompts with `--non-interactive=false` when stdin and stderr are terminals. JSON mode, CI, and input piped as a payload still suppress prompts.

For unattended runs, inject `ORCHESTOR_API_KEY` from a secret store and select a Workspace explicitly. See the [non-interactive quickstart](https://orchestor.io/docs/en/cli/quickstart.md#run-without-prompts).

Choose an image model with `orc image models list --json`. Run the generation command with `--dry-run` and the exact model and inputs you plan to submit. Share the request preview before spending credits. If a destructive action requires `--yes`, stop and ask the person to approve the specific action and target. See [Preview the request](https://orchestor.io/docs/en/cli/quickstart.md#3-preview-the-request).

---

- [Documentation index](https://orchestor.io/docs/llms.txt)
- [Documentation sitemap](https://orchestor.io/docs/sitemap.md)
