Skip to content

Commit 0740fd2

Browse files
README: CLI options and subcommands
Every flag of the binary, grouped by what it is for, and the six subcommands, taken from gitagent --help.
1 parent a4b73fd commit 0740fd2

1 file changed

Lines changed: 45 additions & 0 deletions

File tree

‎README.md‎

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
<a href="#why-gitagent">Why</a> &bull;
2121
<a href="#install">Install</a> &bull;
2222
<a href="#use">Use</a> &bull;
23+
<a href="#cli-options">CLI</a> &bull;
2324
<a href="#results">Results</a> &bull;
2425
<a href="#how-gitagent-works">How it works</a> &bull;
2526
<a href="#architecture">Architecture</a> &bull;
@@ -82,6 +83,50 @@ GITHUB_TOKEN=... gitagent --repo https://github.com/org/app.git -p "fix the fail
8283

8384
In interactive mode, Ctrl-C stops the current task and Ctrl-D or `exit` quits.
8485

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+
85130
### Models
86131

87132
`--model provider:model`, or `model:` in `gitagent.yaml`.

0 commit comments

Comments
 (0)