@anthropic-forge/cli 1.0.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/LICENSE +21 -0
- package/README.md +83 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +2191 -0
- package/dist/index.js.map +1 -0
- package/package.json +43 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 tickets-forge-dev
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
# @forge/cli
|
|
2
|
+
|
|
3
|
+
CLI for Forge — authenticate, browse tickets, and execute AI-assisted implementations via MCP.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install -g @forge/cli
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
Requires Node.js 20+.
|
|
12
|
+
|
|
13
|
+
## Quick Start
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
forge login # Authenticate via browser
|
|
17
|
+
forge list # Browse your tickets
|
|
18
|
+
forge show <id> # View ticket details
|
|
19
|
+
forge review <id> # Review ticket with AI — asks clarifying questions
|
|
20
|
+
forge execute <id> # Execute ticket implementation via MCP + Claude Code
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## MCP Server (Claude Code Integration)
|
|
24
|
+
|
|
25
|
+
Forge ships an embedded MCP server that gives Claude Code direct access to your tickets.
|
|
26
|
+
|
|
27
|
+
### Setup
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
forge mcp install # Writes .mcp.json and registers with Claude Code
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
Restart Claude Code after installing. The MCP server provides:
|
|
34
|
+
|
|
35
|
+
**Tools:** `get_ticket_context`, `get_file_changes`, `get_repository_context`, `update_ticket_status`, `submit_review_session`, `list_tickets`
|
|
36
|
+
|
|
37
|
+
**Prompts:** `list`, `forge-exec`, `forge-execute`, `review`
|
|
38
|
+
|
|
39
|
+
## Configuration
|
|
40
|
+
|
|
41
|
+
Auth tokens are stored in `~/.forge/config.json` (permissions 600).
|
|
42
|
+
|
|
43
|
+
The CLI points to `https://www.forge-ai.dev/api` by default. Override for local development:
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
cp .env.example .env.development
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
| Variable | Default | Description |
|
|
50
|
+
|----------|---------|-------------|
|
|
51
|
+
| `FORGE_API_URL` | `https://www.forge-ai.dev/api` | Backend API base URL |
|
|
52
|
+
| `FORGE_APP_URL` | `https://www.forge-ai.dev` | Web app URL (for device auth) |
|
|
53
|
+
|
|
54
|
+
## Security
|
|
55
|
+
|
|
56
|
+
**Authentication** — Tokens are stored in `~/.forge/config.json` with file permissions locked to owner-only (600). Tokens refresh automatically and never appear in logs or command output.
|
|
57
|
+
|
|
58
|
+
**HTTPS only** — All API calls go over HTTPS by default. The CLI warns if you override the URL to a non-HTTPS endpoint or if TLS certificate validation is disabled in your environment.
|
|
59
|
+
|
|
60
|
+
**Filesystem isolation** — The `get_repository_context` MCP tool only reads git metadata from the current working directory and its children. It cannot be used to scan other directories on your machine.
|
|
61
|
+
|
|
62
|
+
**Prompt injection** — Ticket content (titles, descriptions, acceptance criteria) is user-authored and flows into Claude's context. We protect against this in layers:
|
|
63
|
+
|
|
64
|
+
1. All ticket content is XML-escaped and wrapped in `<ticket_context>` tags, separate from system instructions in `<agent_guide>` tags. This prevents content from breaking out of its designated boundary.
|
|
65
|
+
2. Only authenticated members of your team can create or modify tickets. There is no anonymous or public input.
|
|
66
|
+
3. Claude Code prompts you before running commands or writing files. Even if ticket content tried to manipulate Claude, you approve every action.
|
|
67
|
+
|
|
68
|
+
**Device auth flow** — Login uses the OAuth device code flow. Codes are short-lived and single-use.
|
|
69
|
+
|
|
70
|
+
## Development
|
|
71
|
+
|
|
72
|
+
```bash
|
|
73
|
+
cp .env.example .env.development
|
|
74
|
+
npm install
|
|
75
|
+
npm run dev # Watch mode
|
|
76
|
+
npm run build # Production build
|
|
77
|
+
npm run test # Run tests
|
|
78
|
+
npm run typecheck # Type checking
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
## License
|
|
82
|
+
|
|
83
|
+
MIT
|
package/dist/index.d.ts
ADDED