Skip to content

Commit acb9e0e

Browse files
feat: manage agent runner from the cli (#7694)
* feat: run agent runner from the cli * fix: types * add: model and agent info in list and show * add: project id and slug support * refactor: code clean up * fix: list table formatting and status filter * fix: inconsistencies * refactor: reuse utils * fix: use label for agent id * fix: decrease prompt length limit * add: tests * fix: update help snapshot * fix: add docs * fix: remove unnecessary comments * fix: do not parse agents stop res as json * fix: remove unnecessary comments * fix: rename validation result to agentIsValid * fix: enable agent runners for non-git based sites * fix: local update * fix: default per page to 15 * fix: search sites with name * fix: update api package
1 parent 941ed95 commit acb9e0e

22 files changed

+2164
-32
lines changed

docs/commands/agents.md

Lines changed: 170 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,170 @@
1+
---
2+
title: Netlify CLI agents command
3+
sidebar:
4+
label: agents
5+
description: Manage Netlify AI agent tasks for automated development workflows
6+
---
7+
8+
# `agents`
9+
10+
<!-- AUTO-GENERATED-CONTENT:START (GENERATE_COMMANDS_DOCS) -->
11+
Manage Netlify AI agent tasks
12+
The `agents` command will help you run AI agents on your Netlify sites to automate development tasks
13+
14+
Note: Agent tasks execute remotely on Netlify infrastructure, not locally.
15+
16+
**Usage**
17+
18+
```bash
19+
netlify agents
20+
```
21+
22+
**Flags**
23+
24+
- `filter` (*string*) - For monorepos, specify the name of the application to run the command in
25+
- `debug` (*boolean*) - Print debugging information
26+
- `auth` (*string*) - Netlify auth token - can be used to run this command without logging in
27+
28+
| Subcommand | description |
29+
|:--------------------------- |:-----|
30+
| [`agents:create`](/commands/agents#agentscreate) | Create and run a new agent task on your site |
31+
| [`agents:list`](/commands/agents#agentslist) | List agent tasks for the current site |
32+
| [`agents:show`](/commands/agents#agentsshow) | Show details of a specific agent task |
33+
| [`agents:stop`](/commands/agents#agentsstop) | Stop a running agent task |
34+
35+
36+
**Examples**
37+
38+
```bash
39+
netlify agents:create --prompt "Add a contact form"
40+
netlify agents:list --status running
41+
netlify agents:show 60c7c3b3e7b4a0001f5e4b3a
42+
```
43+
44+
---
45+
## `agents:create`
46+
47+
Create and run a new agent task on your site
48+
49+
**Usage**
50+
51+
```bash
52+
netlify agents:create
53+
```
54+
55+
**Arguments**
56+
57+
- prompt - the prompt for the agent to execute
58+
59+
**Flags**
60+
61+
- `agent` (*string*) - agent type (claude, codex, gemini)
62+
- `branch` (*string*) - git branch to work on
63+
- `filter` (*string*) - For monorepos, specify the name of the application to run the command in
64+
- `json` (*boolean*) - output result as JSON
65+
- `model` (*string*) - model to use for the agent
66+
- `project` (*string*) - project ID or name (if not in a linked directory)
67+
- `prompt` (*string*) - agent prompt
68+
- `debug` (*boolean*) - Print debugging information
69+
- `auth` (*string*) - Netlify auth token - can be used to run this command without logging in
70+
71+
**Examples**
72+
73+
```bash
74+
netlify agents:create
75+
netlify agents:create "Fix the login bug"
76+
netlify agents:create --prompt "Add dark mode" --agent claude
77+
netlify agents:create -p "Update README" -a codex -b feature-branch
78+
netlify agents:create "Add tests" --project my-site-name
79+
```
80+
81+
---
82+
## `agents:list`
83+
84+
List agent tasks for the current site
85+
86+
**Usage**
87+
88+
```bash
89+
netlify agents:list
90+
```
91+
92+
**Flags**
93+
94+
- `filter` (*string*) - For monorepos, specify the name of the application to run the command in
95+
- `json` (*boolean*) - output result as JSON
96+
- `project` (*string*) - project ID or name (if not in a linked directory)
97+
- `status` (*string*) - filter by status (new, running, done, error, cancelled)
98+
- `debug` (*boolean*) - Print debugging information
99+
- `auth` (*string*) - Netlify auth token - can be used to run this command without logging in
100+
101+
**Examples**
102+
103+
```bash
104+
netlify agents:list
105+
netlify agents:list --status running
106+
netlify agents:list --json
107+
```
108+
109+
---
110+
## `agents:show`
111+
112+
Show details of a specific agent task
113+
114+
**Usage**
115+
116+
```bash
117+
netlify agents:show
118+
```
119+
120+
**Arguments**
121+
122+
- id - agent task ID to show
123+
124+
**Flags**
125+
126+
- `filter` (*string*) - For monorepos, specify the name of the application to run the command in
127+
- `json` (*boolean*) - output result as JSON
128+
- `project` (*string*) - project ID or name (if not in a linked directory)
129+
- `debug` (*boolean*) - Print debugging information
130+
- `auth` (*string*) - Netlify auth token - can be used to run this command without logging in
131+
132+
**Examples**
133+
134+
```bash
135+
netlify agents:show 60c7c3b3e7b4a0001f5e4b3a
136+
netlify agents:show 60c7c3b3e7b4a0001f5e4b3a --json
137+
```
138+
139+
---
140+
## `agents:stop`
141+
142+
Stop a running agent task
143+
144+
**Usage**
145+
146+
```bash
147+
netlify agents:stop
148+
```
149+
150+
**Arguments**
151+
152+
- id - agent task ID to stop
153+
154+
**Flags**
155+
156+
- `filter` (*string*) - For monorepos, specify the name of the application to run the command in
157+
- `json` (*boolean*) - output result as JSON
158+
- `project` (*string*) - project ID or name (if not in a linked directory)
159+
- `debug` (*boolean*) - Print debugging information
160+
- `auth` (*string*) - Netlify auth token - can be used to run this command without logging in
161+
162+
**Examples**
163+
164+
```bash
165+
netlify agents:stop 60c7c3b3e7b4a0001f5e4b3a
166+
```
167+
168+
---
169+
170+
<!-- AUTO-GENERATED-CONTENT:END -->

docs/index.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,18 @@ netlify [command] help
1818
## Commands
1919

2020
<!-- AUTO-GENERATED-CONTENT:START (GENERATE_COMMANDS_LIST) -->
21+
### [agents](/commands/agents)
22+
23+
Manage Netlify AI agent tasks
24+
25+
| Subcommand | description |
26+
|:--------------------------- |:-----|
27+
| [`agents:create`](/commands/agents#agentscreate) | Create and run a new agent task on your site |
28+
| [`agents:list`](/commands/agents#agentslist) | List agent tasks for the current site |
29+
| [`agents:show`](/commands/agents#agentsshow) | Show details of a specific agent task |
30+
| [`agents:stop`](/commands/agents#agentsstop) | Stop a running agent task |
31+
32+
2133
### [api](/commands/api)
2234

2335
Run any Netlify API method

0 commit comments

Comments
 (0)