@agentforge/cli 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +225 -0
- package/bin/agentforge.js +9 -0
- package/dist/index.cjs +1114 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +6 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +1103 -0
- package/dist/index.js.map +1 -0
- package/package.json +81 -0
- package/templates/README.md +163 -0
- package/templates/api/.env.example +13 -0
- package/templates/api/README.md +153 -0
- package/templates/api/package.json +41 -0
- package/templates/api/src/routes/agent.ts +54 -0
- package/templates/api/src/routes/health.ts +15 -0
- package/templates/api/src/server.ts +41 -0
- package/templates/api/tsconfig.json +10 -0
- package/templates/cli/.env.example +13 -0
- package/templates/cli/README.md +164 -0
- package/templates/cli/package.json +44 -0
- package/templates/cli/src/cli.ts +31 -0
- package/templates/cli/src/commands/analyze.ts +65 -0
- package/templates/cli/src/commands/chat.ts +65 -0
- package/templates/cli/tsconfig.json +10 -0
- package/templates/full/.env.example +13 -0
- package/templates/full/README.md +151 -0
- package/templates/full/package.json +40 -0
- package/templates/full/src/index.ts +53 -0
- package/templates/full/src/tools/example.ts +20 -0
- package/templates/full/tests/example.test.ts +17 -0
- package/templates/full/tsconfig.json +10 -0
- package/templates/minimal/README.md +64 -0
- package/templates/minimal/package.json +35 -0
- package/templates/minimal/src/index.ts +40 -0
- package/templates/minimal/tsconfig.json +10 -0
package/README.md
ADDED
|
@@ -0,0 +1,225 @@
|
|
|
1
|
+
# @agentforge/cli
|
|
2
|
+
|
|
3
|
+
> CLI tool for AgentForge - scaffolding, development, and deployment
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
# Global installation
|
|
9
|
+
npm install -g @agentforge/cli
|
|
10
|
+
|
|
11
|
+
# Or use with npx
|
|
12
|
+
npx @agentforge/cli create my-agent-project
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Commands
|
|
16
|
+
|
|
17
|
+
### Project Scaffolding
|
|
18
|
+
|
|
19
|
+
#### `create <project-name>`
|
|
20
|
+
|
|
21
|
+
Create a new AgentForge project with interactive setup.
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
agentforge create my-project
|
|
25
|
+
|
|
26
|
+
# With options
|
|
27
|
+
agentforge create my-project --template full --package-manager pnpm
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
**Options:**
|
|
31
|
+
- `-t, --template <template>` - Project template (minimal, full, api, cli) [default: minimal]
|
|
32
|
+
- `-p, --package-manager <pm>` - Package manager (npm, pnpm, yarn) [default: pnpm]
|
|
33
|
+
- `--no-install` - Skip dependency installation
|
|
34
|
+
- `--no-git` - Skip git initialization
|
|
35
|
+
|
|
36
|
+
### Development Commands
|
|
37
|
+
|
|
38
|
+
#### `dev`
|
|
39
|
+
|
|
40
|
+
Start development server with hot reload.
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
agentforge dev
|
|
44
|
+
|
|
45
|
+
# With options
|
|
46
|
+
agentforge dev --port 4000
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
**Options:**
|
|
50
|
+
- `-p, --port <port>` - Port number [default: 3000]
|
|
51
|
+
- `--no-open` - Do not open browser
|
|
52
|
+
|
|
53
|
+
#### `build`
|
|
54
|
+
|
|
55
|
+
Build for production.
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
agentforge build
|
|
59
|
+
|
|
60
|
+
# With options
|
|
61
|
+
agentforge build --no-minify --no-sourcemap
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
**Options:**
|
|
65
|
+
- `--no-minify` - Skip minification
|
|
66
|
+
- `--no-sourcemap` - Skip sourcemap generation
|
|
67
|
+
|
|
68
|
+
#### `test`
|
|
69
|
+
|
|
70
|
+
Run tests with coverage.
|
|
71
|
+
|
|
72
|
+
```bash
|
|
73
|
+
agentforge test
|
|
74
|
+
|
|
75
|
+
# With options
|
|
76
|
+
agentforge test --watch
|
|
77
|
+
agentforge test --ui
|
|
78
|
+
agentforge test --coverage
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
**Options:**
|
|
82
|
+
- `-w, --watch` - Watch mode
|
|
83
|
+
- `--ui` - Open test UI
|
|
84
|
+
- `--coverage` - Generate coverage report
|
|
85
|
+
|
|
86
|
+
#### `lint`
|
|
87
|
+
|
|
88
|
+
Lint and format code.
|
|
89
|
+
|
|
90
|
+
```bash
|
|
91
|
+
agentforge lint
|
|
92
|
+
|
|
93
|
+
# With options
|
|
94
|
+
agentforge lint --fix
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
**Options:**
|
|
98
|
+
- `--fix` - Auto-fix issues
|
|
99
|
+
- `--no-format` - Skip formatting
|
|
100
|
+
|
|
101
|
+
### Agent Management
|
|
102
|
+
|
|
103
|
+
#### `agent:create <name>`
|
|
104
|
+
|
|
105
|
+
Create a new agent.
|
|
106
|
+
|
|
107
|
+
```bash
|
|
108
|
+
agentforge agent:create myAgent
|
|
109
|
+
|
|
110
|
+
# With options
|
|
111
|
+
agentforge agent:create myAgent --pattern plan-execute
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
**Options:**
|
|
115
|
+
- `-p, --pattern <pattern>` - Agent pattern (react, plan-execute, reflection, multi-agent) [default: react]
|
|
116
|
+
- `--no-test` - Skip test generation
|
|
117
|
+
|
|
118
|
+
#### `agent:list`
|
|
119
|
+
|
|
120
|
+
List all agents.
|
|
121
|
+
|
|
122
|
+
```bash
|
|
123
|
+
agentforge agent:list
|
|
124
|
+
|
|
125
|
+
# With verbose output
|
|
126
|
+
agentforge agent:list --verbose
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
**Options:**
|
|
130
|
+
- `-v, --verbose` - Show detailed information
|
|
131
|
+
|
|
132
|
+
#### `agent:test <name>`
|
|
133
|
+
|
|
134
|
+
Test a specific agent.
|
|
135
|
+
|
|
136
|
+
```bash
|
|
137
|
+
agentforge agent:test myAgent
|
|
138
|
+
|
|
139
|
+
# With watch mode
|
|
140
|
+
agentforge agent:test myAgent --watch
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
**Options:**
|
|
144
|
+
- `-w, --watch` - Watch mode
|
|
145
|
+
|
|
146
|
+
#### `agent:deploy <name>`
|
|
147
|
+
|
|
148
|
+
Deploy an agent.
|
|
149
|
+
|
|
150
|
+
```bash
|
|
151
|
+
agentforge agent:deploy myAgent
|
|
152
|
+
|
|
153
|
+
# With options
|
|
154
|
+
agentforge agent:deploy myAgent --environment staging --dry-run
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
**Options:**
|
|
158
|
+
- `-e, --environment <env>` - Deployment environment [default: production]
|
|
159
|
+
- `--dry-run` - Dry run without actual deployment
|
|
160
|
+
|
|
161
|
+
### Tool Management
|
|
162
|
+
|
|
163
|
+
#### `tool:create <name>`
|
|
164
|
+
|
|
165
|
+
Create a new tool.
|
|
166
|
+
|
|
167
|
+
```bash
|
|
168
|
+
agentforge tool:create myTool
|
|
169
|
+
|
|
170
|
+
# With options
|
|
171
|
+
agentforge tool:create myTool --category web
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
**Options:**
|
|
175
|
+
- `-c, --category <category>` - Tool category (web, data, file, utility) [default: utility]
|
|
176
|
+
- `--no-test` - Skip test generation
|
|
177
|
+
|
|
178
|
+
#### `tool:list`
|
|
179
|
+
|
|
180
|
+
List all tools.
|
|
181
|
+
|
|
182
|
+
```bash
|
|
183
|
+
agentforge tool:list
|
|
184
|
+
|
|
185
|
+
# Filter by category
|
|
186
|
+
agentforge tool:list --category web --verbose
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
**Options:**
|
|
190
|
+
- `-c, --category <category>` - Filter by category
|
|
191
|
+
- `-v, --verbose` - Show detailed information
|
|
192
|
+
|
|
193
|
+
#### `tool:test <name>`
|
|
194
|
+
|
|
195
|
+
Test a specific tool.
|
|
196
|
+
|
|
197
|
+
```bash
|
|
198
|
+
agentforge tool:test myTool
|
|
199
|
+
|
|
200
|
+
# With watch mode
|
|
201
|
+
agentforge tool:test myTool --watch
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
**Options:**
|
|
205
|
+
- `-w, --watch` - Watch mode
|
|
206
|
+
|
|
207
|
+
#### `tool:publish <name>`
|
|
208
|
+
|
|
209
|
+
Publish a tool to npm.
|
|
210
|
+
|
|
211
|
+
```bash
|
|
212
|
+
agentforge tool:publish myTool
|
|
213
|
+
|
|
214
|
+
# With options
|
|
215
|
+
agentforge tool:publish myTool --tag beta --dry-run
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
**Options:**
|
|
219
|
+
- `--tag <tag>` - npm tag [default: latest]
|
|
220
|
+
- `--dry-run` - Dry run without actual publishing
|
|
221
|
+
|
|
222
|
+
## License
|
|
223
|
+
|
|
224
|
+
MIT
|
|
225
|
+
|