forgecode 0.97.1 → 0.98.1

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 CHANGED
@@ -1,51 +1,462 @@
1
- # Code Forge CLI
1
+ <h1 align="center">⚒️ Forge: AI-Enhanced Terminal Development Environment</h1>
2
+ <p align="center">A comprehensive coding agent that integrates AI capabilities with your development environment</p>
2
3
 
3
- Code Forge is an AI-powered coding assistant CLI that helps you write, review, and understand code.
4
+ <p align="center"><code>npx forgecode@latest</code></p>
4
5
 
5
- ## Installation
6
+ [![CI Status](https://img.shields.io/github/actions/workflow/status/antinomyhq/forge/ci.yml?style=for-the-badge)](https://github.com/antinomyhq/forge/actions)
7
+ [![GitHub Release](https://img.shields.io/github/v/release/antinomyhq/forge?style=for-the-badge)](https://github.com/antinomyhq/forge/releases)
8
+ [![Discord](https://img.shields.io/discord/1044859667798568962?style=for-the-badge&cacheSeconds=120&logo=discord)](https://discord.gg/kRZBPpkgwq)
9
+ [![CLA assistant](https://cla-assistant.io/readme/badge/antinomyhq/forge?style=for-the-badge)](https://cla-assistant.io/antinomyhq/forge)
6
10
 
7
- ### Global Installation (Recommended)
11
+ ![Code-Forge Demo](https://assets.antinomy.ai/images/forge_demo_2x.gif)
8
12
 
9
- You can install Code Forge globally to use it with the simple `forge` command:
13
+ ---
14
+
15
+ <details>
16
+ <summary><strong>Table&nbsp;of&nbsp;Contents</strong></summary>
17
+
18
+ - [Quickstart](#quickstart)
19
+ - [Usage Examples](#usage-examples)
20
+ - [Why Forge?](#why-forge)
21
+ - [Command-Line Options](#command-line-options)
22
+ - [Advanced Configuration](#advanced-configuration)
23
+ - [Provider Configuration](#provider-configuration)
24
+ - [forge.yaml Configuration Options](#forgeyaml-configuration-options)
25
+ - [MCP Configuration](#mcp-configuration)
26
+ - [Example Use Cases](#example-use-cases)
27
+ - [Usage in Multi-Agent Workflows](#usage-in-multi-agent-workflows)
28
+ - [Documentation](#documentation)
29
+ - [Community](#community)
30
+ - [Support Us](#support-us)
31
+
32
+ </details>
33
+
34
+ ---
35
+
36
+ ## Quickstart
37
+
38
+ Sign up at [Forgecode.dev](https://app.forgecode.dev/app/) to create a key for the Forge provider.
39
+
40
+ Then set up your Forge provider key:
41
+
42
+ ```bash
43
+ # .env
44
+ FORGE_KEY=ForgeKey
45
+ ```
46
+
47
+ Run Forge in interactive mode via npx
48
+
49
+ ```bash
50
+ npx forgecode@latest
51
+ ```
52
+
53
+ That's it! Forge is now ready to assist you with your development tasks.
54
+
55
+ ## Usage Examples
56
+
57
+ Forge can be used in different ways depending on your needs. Here are some common usage patterns:
58
+
59
+ <details>
60
+ <summary><strong>Code Understanding</strong></summary>
61
+
62
+ ```
63
+ > Can you explain how the authentication system works in this codebase?
64
+ ```
65
+
66
+ Forge will analyze your project's structure, identify authentication-related files, and provide a detailed explanation of the authentication flow, including the relationships between different components.
67
+
68
+ </details>
69
+
70
+ <details>
71
+ <summary><strong>Implementing New Features</strong></summary>
72
+
73
+ ```
74
+ > I need to add a dark mode toggle to our React application. How should I approach this?
75
+ ```
76
+
77
+ Forge will suggest the best approach based on your current codebase, explain the steps needed, and even scaffold the necessary components and styles for you.
78
+
79
+ </details>
80
+
81
+ <details>
82
+ <summary><strong>Debugging Assistance</strong></summary>
83
+
84
+ ```
85
+ > I'm getting this error: "TypeError: Cannot read property 'map' of undefined". What might be causing it?
86
+ ```
87
+
88
+ Forge will analyze the error, suggest potential causes based on your code, and propose different solutions to fix the issue.
89
+
90
+ </details>
91
+
92
+ <details>
93
+ <summary><strong>Code Reviews</strong></summary>
94
+
95
+ ```
96
+ > Please review the code in src/components/UserProfile.js and suggest improvements
97
+ ```
98
+
99
+ Forge will analyze the code, identify potential issues, and suggest improvements for readability, performance, security, and maintainability.
100
+
101
+ </details>
102
+
103
+ <details>
104
+ <summary><strong>Learning New Technologies</strong></summary>
105
+
106
+ ```
107
+ > I want to integrate GraphQL into this Express application. Can you explain how to get started?
108
+ ```
109
+
110
+ Forge will provide a tailored tutorial on integrating GraphQL with Express, using your specific project structure as context.
111
+
112
+ </details>
113
+
114
+ <details>
115
+ <summary><strong>Database Schema Design</strong></summary>
116
+
117
+ ```
118
+ > I need to design a database schema for a blog with users, posts, comments, and categories
119
+ ```
120
+
121
+ Forge will suggest an appropriate schema design, including tables/collections, relationships, indexes, and constraints based on your project's existing database technology.
122
+
123
+ </details>
124
+
125
+ <details>
126
+ <summary><strong>Refactoring Legacy Code</strong></summary>
127
+
128
+ ```
129
+ > Help me refactor this class-based component to use React Hooks
130
+ ```
131
+
132
+ Forge can help modernize your codebase by walking you through refactoring steps and implementing them with your approval.
133
+
134
+ </details>
135
+
136
+ <details>
137
+ <summary><strong>Git Operations</strong></summary>
138
+
139
+ ```
140
+ > I need to merge branch 'feature/user-profile' into main but there are conflicts
141
+ ```
142
+
143
+ Forge can guide you through resolving git conflicts, explaining the differences and suggesting the best way to reconcile them.
144
+
145
+ </details>
146
+
147
+ ## Why Forge?
148
+
149
+ Forge is designed for developers who want to enhance their workflow with AI assistance while maintaining full control over their development environment.
150
+
151
+ - **Zero configuration** - Just add your API key and you're ready to go
152
+ - **Seamless integration** - Works right in your terminal, where you already work
153
+ - **Multi-provider support** - Use OpenAI, Anthropic, or other LLM providers
154
+ - **Secure by design** - Your code stays on your machine
155
+ - **Open-source** - Transparent, extensible, and community-driven
156
+
157
+ Forge helps you code faster, solve complex problems, and learn new technologies without leaving your terminal.
158
+
159
+ ## Command-Line Options
160
+
161
+ Here's a quick reference of Forge's command-line options:
162
+
163
+ | Option | Description |
164
+ | ------------------------------- | ---------------------------------------------------------- |
165
+ | `-p, --prompt <PROMPT>` | Direct prompt to process without entering interactive mode |
166
+ | `-c, --command <COMMAND>` | Path to a file containing initial commands to execute |
167
+ | `-w, --workflow <WORKFLOW>` | Path to a file containing the workflow to execute |
168
+ | `-e, --event <EVENT>` | Dispatch an event to the workflow |
169
+ | `--conversation <CONVERSATION>` | Path to a file containing the conversation to execute |
170
+ | `-r, --restricted` | Enable restricted shell mode for enhanced security |
171
+ | `--verbose` | Enable verbose output mode |
172
+ | `-h, --help` | Print help information |
173
+ | `-V, --version` | Print version |
174
+
175
+ ## Advanced Configuration
176
+
177
+ ### Provider Configuration
178
+
179
+ Forge supports multiple AI providers. Below are setup instructions for each supported provider:
180
+
181
+ <details>
182
+ <summary><strong>forgecode.dev (Recommended)</strong></summary>
10
183
 
11
184
  ```bash
12
- npm install -g forgecode
185
+ # .env
186
+ FORGE_KEY=ForgeKey
13
187
  ```
14
188
 
15
- After installation, you can run the command from anywhere:
189
+ To use Forgecode's provider with Forge:
190
+
191
+ 1. Visit [https://app.forgecode.dev/](https://app.forgecode.dev/)
192
+ 2. Login with your existing credentials or create a new account
193
+ 3. Once logged in, your account will automatically enable the Forge Provider
194
+
195
+ _No changes in `forge.yaml` required_
196
+
197
+ </details>
198
+
199
+ <details>
200
+ <summary><strong>OpenRouter</strong></summary>
16
201
 
17
202
  ```bash
18
- forge --help
203
+ # .env
204
+ OPENROUTER_API_KEY=<your_openrouter_api_key>
19
205
  ```
20
206
 
21
- ### Using npx (No Installation)
207
+ _No changes in `forge.yaml` required_
22
208
 
23
- If you prefer not to install anything globally, you can use npx to run Code Forge directly:
209
+ </details>
210
+
211
+ <details>
212
+ <summary><strong>OpenAI</strong></summary>
24
213
 
25
214
  ```bash
26
- npx forgecode
215
+ # .env
216
+ OPENAI_API_KEY=<your_openai_api_key>
27
217
  ```
28
218
 
29
- Both methods will automatically download the appropriate binary for your platform.
219
+ ```yaml
220
+ # forge.yaml
221
+ model: o3-mini-high
222
+ ```
30
223
 
31
- ## Supported Platforms
224
+ </details>
32
225
 
33
- - macOS (Intel, Apple Silicon)
34
- - Linux (x64, ARM64)
35
- - Windows (x64, ARM64)
226
+ <details>
227
+ <summary><strong>Anthropic</strong></summary>
36
228
 
37
- ## Usage
229
+ ```bash
230
+ # .env
231
+ ANTHROPIC_API_KEY=<your_anthropic_api_key>
232
+ ```
233
+
234
+ ```yaml
235
+ # forge.yaml
236
+ model: claude-3.7-sonnet
237
+ ```
38
238
 
39
- Once installed, you can use the `forge` command:
239
+ </details>
240
+
241
+ <details>
242
+ <summary><strong>Google Vertex AI</strong></summary>
40
243
 
41
244
  ```bash
42
- # If installed globally
43
- forge --version
245
+ # .env
246
+ PROJECT_ID=<your_project_id>
247
+ LOCATION=<your_location>
248
+ OPENAI_API_KEY=<vertex_ai_key>
249
+ OPENAI_URL=https://${LOCATION}-aiplatform.googleapis.com/v1beta1/projects/${PROJECT_ID}/locations/${LOCATION}/endpoints/openapi
250
+ ```
44
251
 
45
- # Or with npx
46
- npx forgecode --version
252
+ ```yaml
253
+ # forge.yaml
254
+ model: publishers/anthropic/models/claude-3-7-sonnet
47
255
  ```
48
256
 
257
+ </details>
258
+
259
+ <details>
260
+ <summary><strong>OpenAI-Compatible Providers</strong></summary>
261
+
262
+ ```bash
263
+ # .env
264
+ OPENAI_API_KEY=<your_provider_api_key>
265
+ OPENAI_URL=<your_provider_url>
266
+ ```
267
+
268
+ ```yaml
269
+ # forge.yaml
270
+ model: <provider-specific-model>
271
+ ```
272
+
273
+ </details>
274
+
275
+ <details>
276
+ <summary><strong>Groq</strong></summary>
277
+
278
+ ```bash
279
+ # .env
280
+ OPENAI_API_KEY=<your_groq_api_key>
281
+ OPENAI_URL=https://api.groq.com/openai/v1
282
+ ```
283
+
284
+ ```yaml
285
+ # forge.yaml
286
+ model: deepseek-r1-distill-llama-70b
287
+ ```
288
+
289
+ </details>
290
+
291
+ <details>
292
+ <summary><strong>Amazon Bedrock</strong></summary>
293
+
294
+ To use Amazon Bedrock models with Forge, you'll need to first set up the [Bedrock Access Gateway](https://github.com/aws-samples/bedrock-access-gateway):
295
+
296
+ 1. **Set up Bedrock Access Gateway**:
297
+
298
+ - Follow the deployment steps in the [Bedrock Access Gateway repo](https://github.com/aws-samples/bedrock-access-gateway)
299
+ - Create your own API key in Secrets Manager
300
+ - Deploy the CloudFormation stack
301
+ - Note your API Base URL from the CloudFormation outputs
302
+
303
+ 2. **Create these files in your project directory**:
304
+
305
+ ```bash
306
+ # .env
307
+ OPENAI_API_KEY=<your_bedrock_gateway_api_key>
308
+ OPENAI_URL=<your_bedrock_gateway_base_url>
309
+ ```
310
+
311
+ ```yaml
312
+ # forge.yaml
313
+ model: anthropic.claude-3-opus
314
+ ```
315
+
316
+ </details>
317
+
318
+ ### forge.yaml Configuration Options
319
+
320
+ The `forge.yaml` file supports several advanced configuration options that let you customize Forge's behavior.
321
+
322
+ <details>
323
+ <summary><strong>Custom Rules</strong></summary>
324
+
325
+ Add your own guidelines that all agents should follow when generating responses.
326
+
327
+ ```yaml
328
+ # forge.yaml
329
+ custom_rules: |
330
+ 1. Always add comprehensive error handling to any code you write.
331
+ 2. Include unit tests for all new functions.
332
+ 3. Follow our team's naming convention: camelCase for variables, PascalCase for classes.
333
+ ```
334
+
335
+ </details>
336
+
337
+ <details>
338
+ <summary><strong>Commands</strong></summary>
339
+
340
+ Define custom commands as shortcuts for repetitive prompts:
341
+
342
+ ```yaml
343
+ # forge.yaml
344
+ commands:
345
+ - name: "refactor"
346
+ description: "Refactor selected code"
347
+ prompt: "Please refactor this code to improve readability and performance"
348
+ ```
349
+
350
+ </details>
351
+
352
+ <details>
353
+ <summary><strong>Model</strong></summary>
354
+
355
+ Specify the default AI model to use for all agents in the workflow.
356
+
357
+ ```yaml
358
+ # forge.yaml
359
+ model: "claude-3.7-sonnet"
360
+ ```
361
+
362
+ </details>
363
+
364
+ <details>
365
+ <summary><strong>Max Walker Depth</strong></summary>
366
+
367
+ Control how deeply Forge traverses your project directory structure when gathering context.
368
+
369
+ ```yaml
370
+ # forge.yaml
371
+ max_walker_depth: 3 # Limit directory traversal to 3 levels deep
372
+ ```
373
+
374
+ </details>
375
+
376
+ <details>
377
+ <summary><strong>Temperature</strong></summary>
378
+
379
+ Adjust the creativity and randomness in AI responses. Lower values (0.0-0.3) produce more focused, deterministic outputs, while higher values (0.7-2.0) generate more diverse and creative results.
380
+
381
+ ```yaml
382
+ # forge.yaml
383
+ temperature: 0.7 # Balanced creativity and focus
384
+ ```
385
+
386
+ </details>
387
+
388
+ ---
389
+
390
+ <details>
391
+ <summary><strong>Model Context Protocol (MCP)</strong></summary>
392
+
393
+ The MCP feature allows AI agents to communicate with external tools and services. This implementation follows Anthropic's [Model Context Protocol](https://docs.anthropic.com/en/docs/claude-code/tutorials#set-up-model-context-protocol-mcp) design.
394
+
395
+ ### MCP Configuration
396
+
397
+ Configure MCP servers using the CLI:
398
+
399
+ ```bash
400
+ # List all MCP servers
401
+ forge mcp list
402
+
403
+ # Add a new server
404
+ forge mcp add
405
+
406
+ # Add a server using JSON format
407
+ forge mcp add-json
408
+
409
+ # Get server details
410
+ forge mcp get
411
+
412
+ # Remove a server
413
+ forge mcp remove
414
+ ```
415
+
416
+ Or manually create a `.mcp.json` file with the following structure:
417
+
418
+ ```json
419
+ {
420
+ "mcpServers": {
421
+ "server_name": {
422
+ "command": "command_to_execute",
423
+ "args": ["arg1", "arg2"],
424
+ "env": { "ENV_VAR": "value" }
425
+ },
426
+ "another_server": {
427
+ "url": "http://localhost:3000/events"
428
+ }
429
+ }
430
+ }
431
+ ```
432
+
433
+ MCP configurations are read from two locations (in order of precedence):
434
+
435
+ 1. Local configuration (project-specific)
436
+ 2. User configuration (user-specific)
437
+
438
+ ### Example Use Cases
439
+
440
+ MCP can be used for various integrations:
441
+
442
+ - Web browser automation
443
+ - External API interactions
444
+ - Tool integration
445
+ - Custom service connections
446
+
447
+ ### Usage in Multi-Agent Workflows
448
+
449
+ MCP tools can be used as part of multi-agent workflows, allowing specialized agents to interact with external systems as part of a collaborative problem-solving approach.
450
+
451
+ </details>
452
+
453
+ ---
454
+
455
+ ## Documentation
456
+
457
+ For comprehensive documentation on all features and capabilities, please visit the [documentation site](https://forgecode.dev/docs).
458
+
459
+ ---
49
460
  ## Troubleshooting
50
461
 
51
462
  ### Linux glibc Compatibility Issues
@@ -70,6 +481,25 @@ This means the binary requires a newer version of glibc than what's available on
70
481
  3. **Use a Docker container with a newer Linux distribution**
71
482
 
72
483
  The musl binary has fewer system dependencies and should work on most Linux systems regardless of glibc version.
484
+ ---
485
+
486
+ ## Community
487
+
488
+ Join our vibrant Discord community to connect with other Forge users and contributors, get help with your projects, share ideas, and provide feedback!
489
+
490
+ [![Discord](https://img.shields.io/discord/1044859667798568962?style=for-the-badge&cacheSeconds=120&logo=discord)](https://discord.gg/kRZBPpkgwq)
491
+
492
+ ---
493
+
494
+ ## Support Us
495
+
496
+ Your support drives Forge's continued evolution! By starring our GitHub repository, you:
497
+
498
+ - Help others discover this powerful tool 🔍
499
+ - Motivate our development team 💪
500
+ - Enable us to prioritize new features 🛠️
501
+ - Strengthen our open-source community 🌱
502
+
73
503
 
74
504
  ## License
75
505
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "forgecode",
3
- "version": "0.97.1",
3
+ "version": "0.98.1",
4
4
  "description": "Code Forge CLI - an AI-powered coding assistant",
5
5
  "bin": {
6
6
  "forge": "forge.js"