|
20 | 20 | <a href="#why-gitagent">Why</a> • |
21 | 21 | <a href="#install">Install</a> • |
22 | 22 | <a href="#use">Use</a> • |
| 23 | + <a href="#cli-options">CLI</a> • |
23 | 24 | <a href="#results">Results</a> • |
24 | 25 | <a href="#how-gitagent-works">How it works</a> • |
25 | 26 | <a href="#architecture">Architecture</a> • |
@@ -82,6 +83,50 @@ GITHUB_TOKEN=... gitagent --repo https://github.com/org/app.git -p "fix the fail |
82 | 83 |
|
83 | 84 | In interactive mode, Ctrl-C stops the current task and Ctrl-D or `exit` quits. |
84 | 85 |
|
| 86 | +### CLI options |
| 87 | + |
| 88 | +`gitagent [OPTIONS] [PROMPT]`. Without a prompt it opens the console in `--dir`. |
| 89 | + |
| 90 | +| Option | What it does | |
| 91 | +|---|---| |
| 92 | +| `[PROMPT]`, `-p, --prompt <text>` | The task, as plain words; runs it once and exits | |
| 93 | +| `--instruction-file <file>` | Read the task from a file | |
| 94 | +| `-d, --dir <dir>` | The agent folder to work in (default: the current directory) | |
| 95 | +| `-m, --model <provider:model>` | The model; overrides `gitagent.yaml` | |
| 96 | +| `-e, --env <name>` | Apply the agent's `config/<name>.yaml` (default: `GITAGENT_ENV`) | |
| 97 | +| `--profile <name or path>` | `auto`, a built-in profile, or a profile file | |
| 98 | +| `--config <file>` | A `gitagent.yaml` to use; its `prompts/` and `profiles/` override the built-ins | |
| 99 | +| `--conversation` | A plain reply ends the run, instead of `task_complete` (always on in the console) | |
| 100 | +| `--max-turns <n>` | Stop after this many model calls | |
| 101 | +| `--timeout-s <seconds>` | Time budget for the run | |
| 102 | +| `--allowed-tools <a,b>`, `--disallowed-tools <a,b>` | Offer only these tools, or never these | |
| 103 | +| `--append-system-prompt <text>` | Text added after the system prompt | |
| 104 | +| `--workflow <name>`, `--input key=value` | Run one of the agent's workflows instead of a task | |
| 105 | +| `-r, --repo <url>` | Work in a clone of the repository on a new branch, and commit the result | |
| 106 | +| `--base <branch>`, `--branch <name>`, `--session <name>` | Repo mode: the branch to start from, or an existing branch to resume | |
| 107 | +| `--push`, `--pat <token>` | Repo mode: push the branch after committing; the token to use (default: `GITAGENT_GIT_TOKEN`, `GITHUB_TOKEN` or `GIT_TOKEN`) | |
| 108 | +| `--out-dir <dir>` | Where the trajectory, counters and logs go (default: `/tmp/gitagent`) | |
| 109 | +| `--session-id <id>` | Session id recorded in the trajectory | |
| 110 | +| `--events jsonl` | Print every step as a JSON object per line | |
| 111 | +| `--output-format text \| stream-json` | Print the summary, or the SDK's messages one per line | |
| 112 | +| `--ipc` | Serve the IPC protocol for a client library (see [SDKs](#sdks-any-language-over-ipc)) | |
| 113 | +| `--bench` | Benchmark mode: built-in configuration only, no memory, no git commits | |
| 114 | +| `--linger` | Keep the shells, and anything running in them, open after the run | |
| 115 | +| `-V, --version`, `-h, --help` | Version and help | |
| 116 | + |
| 117 | +Subcommands, each with its own `--help`: |
| 118 | + |
| 119 | +| Command | What it does | |
| 120 | +|---|---| |
| 121 | +| `gitagent init [dir]` | Create an agent folder: `agent.yaml`, `SOUL.md`, `memory/`, a git repository | |
| 122 | +| `gitagent validate [dir] [--compliance]` | Check an agent folder against the format, with file and line for every problem | |
| 123 | +| `gitagent install [dir]` | Fetch the agent's `extends` parent and its `dependencies` | |
| 124 | +| `gitagent plugin install\|list\|enable\|disable\|remove\|init` | Manage the agent's plugins | |
| 125 | +| `gitagent schedule list\|add\|run\|start\|enable\|disable\|remove` | Manage and run the agent's schedules | |
| 126 | +| `gitagent learn --from <runs>` | Learn lessons from finished runs | |
| 127 | + |
| 128 | +In the console, `/help` lists the session's commands, and typing `/` shows them as you type. |
| 129 | + |
85 | 130 | ### Models |
86 | 131 |
|
87 | 132 | `--model provider:model`, or `model:` in `gitagent.yaml`. |
|
0 commit comments