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

# Command line

> Every omnicoreagent and omniserve command, and every flag

# Command line

Two commands are installed: `omnicoreagent` (headless runs, and Harbor) and
`omniserve` (the server, with `omnicoreagent[serve]`).

## `omnicoreagent harbor`

Harbor's CLI with this runtime as the default agent (see `harbor --help`).

Two commands are this runtime's own, and neither name is Harbor's:
`results` (what a job did) and `doctor` (whether a trial can run here).

Every other Harbor command passes through: `omnicoreagent harbor run`, `view`,
`job resume`, `init` and the rest take Harbor's own flags
([Harbor guide](/docs/how-to-guides/harbor)).

### `omnicoreagent harbor doctor`

Check that a Harbor trial of this agent can run on this machine.

| Option        | Takes | Default | What it does                                                                  |
| ------------- | ----- | ------- | ----------------------------------------------------------------------------- |
| `-m, --model` | text  |         | The model a trial will use, to check its key.                                 |
| `--container` | flag  |         | Also install the agent into a throwaway task container (takes a few minutes). |

### `omnicoreagent harbor results`

Summarize a Harbor job directory, or every job in a jobs directory.

| Option   | Takes    | Default  | What it does               |
| -------- | -------- | -------- | -------------------------- |
| `PATH`   | argument | required |                            |
| `--json` | flag     |          | Print the summary as JSON. |

## `omnicoreagent run`

Run one instruction unattended and exit with its terminal state.

| Option                   | Takes                             | Default  | What it does                                                            |
| ------------------------ | --------------------------------- | -------- | ----------------------------------------------------------------------- |
| `--agent, -a`            | text                              | required | Python file defining 'agent' or 'create\_agent()'.                      |
| `--instruction, -i`      | text                              |          | The instruction to run.                                                 |
| `--instruction-file, -f` | text                              |          | Read the instruction from a file, or '-' for stdin.                     |
| `--session-id`           | text                              |          | Session to run in (default: new).                                       |
| `--run-id`               | text                              |          | Run ID (default: generated).                                            |
| `--tag`                  | text                              |          | Label recorded on the trace. Repeatable.                                |
| `--provenance`           | text                              |          | Trace provenance, e.g. trial\_id=abc. Unknown keys go to external\_ids. |
| `--approval-mode`        | stop \| allow \| deny \| scripted | `stop`   | How approvals the policy asks for are answered.                         |
| `--approvals-file`       | text                              |          | JSON rules for --approval-mode scripted.                                |
| `--budget-mode`          | stop \| deny                      | `stop`   | stop: exit when a budget runs out; deny: end the run cleanly.           |
| `--timeout`              | float                             |          | Deadline in seconds for the whole run.                                  |
| `--max-approval-rounds`  | integer                           | `20`     | Most pause-and-resume cycles before giving up.                          |
| `--output-dir, -o`       | text                              |          | Write result.json and trajectory.json here.                             |
| `--json`                 | flag                              |          | Print result.json to stdout.                                            |

## `omniserve config`

View or generate configuration.

Example:
omniserve config --show
eval "\$(omniserve config --env-example)"

| Option          | Takes | Default | What it does                                |
| --------------- | ----- | ------- | ------------------------------------------- |
| `--show`        | flag  |         | Show current configuration from environment |
| `--env-example` | flag  |         | Print example shell environment             |

## `omniserve generate-dockerfile`

Generate a Dockerfile for deploying your agent.

Works both locally and on cloud platforms (Cloud Run, AWS Fargate, Railway).

* Copies all files into the image
* Uses environment variables for configuration

Example:
omniserve generate-dockerfile --file my\_agent.py

| Option             | Takes | Default | What it does                         |
| ------------------ | ----- | ------- | ------------------------------------ |
| `--file, -f`       | path  |         | Path to your agent Python file       |
| `--output-dir, -o` | text  | `.`     | Output directory for generated files |

## `omniserve quickstart`

Start a quick agent server without writing any code.

Example:
omniserve quickstart --provider openai --model gpt-4o --port 8000

| Option              | Takes   | Default                           | What it does                             |
| ------------------- | ------- | --------------------------------- | ---------------------------------------- |
| `--provider, -p`    | text    | `gemini`                          | LLM provider (openai, gemini, anthropic) |
| `--model, -m`       | text    | `gemini-2.0-flash`                | Model name                               |
| `--name, -n`        | text    | `QuickAgent`                      | Agent name                               |
| `--instruction, -i` | text    | `You are a helpful AI assistant.` | System instruction                       |
| `--port`            | integer | `8000`                            | Port to bind to                          |
| `--host`            | text    | `0.0.0.0`                         | Host to bind to                          |

## `omniserve run`

Run an agent as an API server.

Example:
omniserve run --agent my\_agent.py --port 8000

| Option           | Takes   | Default | What it does                                   |
| ---------------- | ------- | ------- | ---------------------------------------------- |
| `--agent, -a`    | path    |         | Path to Python file containing the agent       |
| `--host, -h`     | text    |         | Host to bind to (default: 0.0.0.0)             |
| `--port, -p`     | integer |         | Port to bind to (default: 8000)                |
| `--workers, -w`  | integer | `1`     | Worker processes. Direct OmniServe requires 1. |
| `--no-docs`      | flag    |         | Disable Swagger UI                             |
| `--cors-origins` | text    | `*`     | Comma-separated CORS origins                   |
| `--auth-token`   | text    |         | Enable auth with this token                    |
| `--rate-limit`   | integer |         | Rate limit (requests per minute)               |
