jetic-cli 0.2.6 → 0.2.8
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 +65 -153
- package/dist/dashboard/assets/index-DfTWnEz_.js +430 -0
- package/dist/dashboard/assets/index-Dz50r4Cq.css +1 -0
- package/dist/dashboard/brand/JeticLogo.tsx +79 -0
- package/dist/dashboard/brand/jetic-animated.svg +33 -0
- package/dist/dashboard/brand/jetic-black.svg +5 -0
- package/dist/dashboard/brand/jetic-intro.svg +38 -0
- package/dist/dashboard/brand/jetic.svg +5 -0
- package/dist/dashboard/index.html +12 -3
- package/dist/index.js +1102 -123
- package/package.json +5 -4
- package/public/brand/JeticLogo.tsx +79 -0
- package/public/brand/jetic-animated.svg +33 -0
- package/public/brand/jetic-black.svg +5 -0
- package/public/brand/jetic-intro.svg +38 -0
- package/public/brand/jetic.svg +5 -0
- package/public/jetic_logo.png +0 -0
- package/dist/dashboard/assets/index-BxpFwhwt.css +0 -1
- package/dist/dashboard/assets/index-CBkHSFmz.js +0 -409
package/README.md
CHANGED
|
@@ -1,212 +1,124 @@
|
|
|
1
|
-
<
|
|
2
|
-
<img src="public/jetic_logo.png" alt="Jetic Banner" width="140">
|
|
3
|
-
</p>
|
|
1
|
+
<div align="center">
|
|
4
2
|
|
|
5
|
-
<
|
|
3
|
+
<picture>
|
|
4
|
+
<source media="(prefers-color-scheme: dark)" srcset="public/brand/jetic.svg">
|
|
5
|
+
<img src="public/brand/jetic-black.svg" alt="Jetic" width="64">
|
|
6
|
+
</picture>
|
|
6
7
|
|
|
8
|
+
# Jetic CLI
|
|
7
9
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
<a href="#-cli-commands">CLI Reference</a> •
|
|
13
|
-
<a href="#-jetic-studio">Jetic Studio</a>
|
|
14
|
-
</p>
|
|
10
|
+
**Code-aware. Deterministic. Zero setup.**
|
|
11
|
+
Scan your backend, model endpoints, author workflows, and simulate stateful API flows — straight from your terminal.
|
|
12
|
+
|
|
13
|
+
<br/>
|
|
15
14
|
|
|
16
15
|
<p align="center">
|
|
17
|
-
<a href="https://www.npmjs.com/package/jetic-cli"><img src="https://img.shields.io/npm/v/jetic-cli.svg" alt="NPM Version"></a>
|
|
16
|
+
<a href="https://www.npmjs.com/package/jetic-cli"><img src="https://img.shields.io/npm/v/jetic-cli.svg" alt="Latest NPM Version"></a>
|
|
18
17
|
<img src="https://img.shields.io/badge/node-%3E%3D20.0.0-brightgreen" alt="Node Version">
|
|
19
|
-
<img src="https://img.shields.io/badge/AST-ts--morph-blueviolet" alt="ts-morph">
|
|
20
18
|
<img src="https://img.shields.io/badge/license-ISC-green.svg" alt="License">
|
|
21
19
|
</p>
|
|
22
20
|
|
|
23
|
-
|
|
21
|
+
[Website](https://www.jetic.space/cli) · [Docs](https://docs.jetic.space) · [Contributing](https://github.com/jeticlabs/Jetic/blob/main/CONTRIBUTING.md)
|
|
24
22
|
|
|
25
|
-
|
|
23
|
+
</div>
|
|
26
24
|
|
|
27
|
-
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
## Install
|
|
28
28
|
|
|
29
|
-
### 1. Install globally
|
|
30
29
|
```bash
|
|
31
30
|
npm install -g jetic-cli
|
|
32
31
|
```
|
|
33
32
|
|
|
34
|
-
|
|
35
|
-
|
|
33
|
+
> Or run without installing: `npx jetic-cli --help`
|
|
34
|
+
|
|
35
|
+
---
|
|
36
|
+
|
|
37
|
+
## Quickstart
|
|
38
|
+
|
|
36
39
|
```bash
|
|
37
|
-
#
|
|
40
|
+
# 1. Initialize your project
|
|
38
41
|
jetic init
|
|
39
42
|
|
|
40
|
-
#
|
|
43
|
+
# 2. Scan Express/TypeScript routes (auto-discovers endpoints)
|
|
41
44
|
jetic scan
|
|
42
|
-
```
|
|
43
45
|
|
|
44
|
-
|
|
45
|
-
```bash
|
|
46
|
-
# Option A: Launch the visual developer dashboard (http://localhost:8787)
|
|
46
|
+
# 3. Launch Jetic Studio
|
|
47
47
|
jetic dev
|
|
48
|
-
|
|
49
|
-
# Option B: Run MCP server for AI IDE assistant (Cursor, Antigravity, VS Code, opencode)
|
|
50
|
-
jetic mcp
|
|
51
|
-
```
|
|
52
|
-
|
|
53
|
-
---
|
|
54
|
-
|
|
55
|
-
## 🔄 The 4-Phase Workflow
|
|
56
|
-
|
|
57
|
-
Jetic operates on a strict, predictable 4-phase lifecycle for total model fidelity:
|
|
58
|
-
|
|
59
|
-
```
|
|
60
|
-
┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐
|
|
61
|
-
│ 1. INITIALIZE │ ──► │ 2. SCAN & MODEL │ ──► │ 3. VERIFY │ ──► │ 4. SIMULATE │
|
|
62
|
-
│ (jetic init) │ │ (jetic scan) │ │ (jetic verify) │ │ (jetic simulate)│
|
|
63
|
-
└─────────────────┘ └─────────────────┘ └─────────────────┘ └─────────────────┘
|
|
64
48
|
```
|
|
65
49
|
|
|
66
|
-
|
|
67
|
-
2. **Phase 2 — Scan & Model (`jetic scan`)**: Static AST analysis discovers Express routes, nested paths, path parameters, source locations, and recognizable middleware. It does not infer request/response schemas or business constraints. Other frameworks can be modeled manually or via MCP.
|
|
68
|
-
3. **Phase 3 — Verify (`jetic_verify_model`)**: Validates model structure and ensures all fields (descriptions, tags, parameter/response details) are complete and error-free.
|
|
69
|
-
4. **Phase 4 — Simulate (`jetic simulate`)**: Executes multi-step workflows with dynamic state capture (`captureInput` / `capture`) and header injection (`Authorization: Bearer {{workflow:token}}`).
|
|
50
|
+
For all other stacks, connect via MCP and let your AI editor model the API for you — no scanner needed.
|
|
70
51
|
|
|
71
52
|
---
|
|
72
53
|
|
|
73
|
-
##
|
|
54
|
+
## MCP Setup (Recommended)
|
|
74
55
|
|
|
75
|
-
Jetic
|
|
56
|
+
Connect Jetic to your AI editor (Cursor, Claude Code, VS Code, Windsurf, opencode) in seconds:
|
|
76
57
|
|
|
77
|
-
### Setup (e.g. `opencode.json` or Cursor `mcp.json`):
|
|
78
58
|
```json
|
|
79
59
|
{
|
|
80
60
|
"mcp": {
|
|
81
61
|
"jetic": {
|
|
82
62
|
"type": "local",
|
|
83
|
-
"command": ["jetic", "mcp"],
|
|
63
|
+
"command": ["cmd", "/c", "jetic", "mcp"],
|
|
64
|
+
"cwd": "C:/path/to/your-backend",
|
|
84
65
|
"enabled": true
|
|
85
66
|
}
|
|
86
67
|
}
|
|
87
68
|
}
|
|
88
69
|
```
|
|
89
|
-
*(On Windows, use `"command": ["cmd", "/c", "jetic", "mcp"]`)*
|
|
90
|
-
|
|
91
|
-
### 💬 Example Prompts for AI IDE
|
|
92
|
-
|
|
93
|
-
Use these prompt templates with your editor's AI assistant (opencode, Antigravity, Cursor, Claude Code, VS Code) to manage initialization, model creation, and workflow simulation:
|
|
94
70
|
|
|
95
|
-
|
|
96
|
-
> **Session Health & Quickstart:**
|
|
97
|
-
> *"Call `jetic_get_session_phase`. If the model is not initialized, run `jetic_init` to scaffold `.jetic/` and guide me through setting up the API."*
|
|
71
|
+
> macOS/Linux: replace `["cmd", "/c", "jetic", "mcp"]` with `["jetic", "mcp"]`.
|
|
98
72
|
|
|
99
|
-
|
|
100
|
-
> *"Initialize Jetic in this workspace (`jetic_init`), configure project metadata for our TypeScript backend, and verify that `.jetic/model.json` exists."*
|
|
101
|
-
|
|
102
|
-
#### 📐 Phase 2 & 3: Create & Verify Model (`create model`)
|
|
103
|
-
> **Automated AST Scan & Verification:**
|
|
104
|
-
> *"Scan our backend codebase (`jetic_scan`) to populate endpoints. Then run `jetic_verify_model` to highlight any missing descriptions, schemas, or tags."*
|
|
105
|
-
|
|
106
|
-
> **Model Completeness & Audit:**
|
|
107
|
-
> *"Run `jetic_verify_model`. Update every endpoint with missing descriptions or tags using `jetic_update_endpoint`, and re-verify until the model status is 100% complete and valid."*
|
|
108
|
-
|
|
109
|
-
> **Selective AI Re-Modelling via Change Log (`changes.json`):**
|
|
110
|
-
> *"Check recent file changes (`jetic_get_changes`). Re-analyse ONLY those modified files to update `.jetic/model.json` instead of reading the entire codebase, then clear the change log (`jetic_clear_changes`)."*
|
|
111
|
-
|
|
112
|
-
#### ⚡ Phase 4: Create & Run Workflows (`create workflow`)
|
|
113
|
-
> **Scaffold & Create Workflow:**
|
|
114
|
-
> *"Scaffold a user onboarding workflow (`jetic_scaffold_workflow`) with `POST /api/auth/register` and `GET /api/users/me`. Automatically inject the auth token, validate the workflow, and save it to `.jetic/workflows/user-onboarding.json`."*
|
|
115
|
-
|
|
116
|
-
> **Advanced Workflow with Conditions & Retry Logic:**
|
|
117
|
-
> *"Build an order fulfillment workflow. Step 1: Login. Step 2: Create Order. Step 3: Payment (add step condition `if {{workflow:userRole}} equals "admin"` and `retry` up to 3 times on failure). Validate (`jetic_validate_workflow`) and save it."*
|
|
118
|
-
|
|
119
|
-
> **Human Input Workflow (2FA / OTP):**
|
|
120
|
-
> *"Build a sensitive transfer workflow that requires human 2FA. Scaffold the steps, use `{{human:otp_code}}` for the verification payload, set `retry: { "times": 2, "delayMs": 1000 }`, and save to `.jetic/workflows/transfer.json`."*
|
|
121
|
-
|
|
122
|
-
#### 🎯 All-in-One Master Prompt
|
|
123
|
-
> *"Run `jetic_get_session_phase` and follow the Jetic 4-Phase protocol: 1. Initialize `.jetic/` if missing. 2. Scan the source code and verify the model until all endpoint descriptions are complete. 3. Ask me what integration scenario I want to test, then scaffold, validate, and save the workflow."*
|
|
73
|
+
Full MCP setup guide → [docs.jetic.space](https://docs.jetic.space)
|
|
124
74
|
|
|
125
75
|
---
|
|
126
76
|
|
|
127
|
-
##
|
|
77
|
+
## CLI Reference
|
|
128
78
|
|
|
129
79
|
| Command | Description |
|
|
130
|
-
|
|
131
|
-
| `jetic init` | Scaffold `.jetic/`
|
|
132
|
-
| `jetic scan` |
|
|
133
|
-
| `jetic inspect` | Inspect
|
|
134
|
-
| `jetic simulate endpoint` |
|
|
135
|
-
| `jetic simulate workflow` | Execute multi-step
|
|
136
|
-
| `jetic dev` | Launch
|
|
137
|
-
| `jetic
|
|
138
|
-
| `jetic
|
|
139
|
-
| `jetic
|
|
140
|
-
| `jetic
|
|
141
|
-
| `jetic
|
|
142
|
-
| `jetic
|
|
143
|
-
| `jetic
|
|
80
|
+
| :--- | :--- |
|
|
81
|
+
| `jetic init` | Scaffold `.jetic/` workspace — no AI keys or provider setup |
|
|
82
|
+
| `jetic scan` | AST-scan Express/TS routes → `model.json` |
|
|
83
|
+
| `jetic inspect` | Inspect endpoints, schemas and model summary |
|
|
84
|
+
| `jetic simulate endpoint` | Simulate single or all endpoints against a live server |
|
|
85
|
+
| `jetic simulate workflow` | Execute a saved multi-step workflow |
|
|
86
|
+
| `jetic dev` | Launch Jetic Studio (port 8787) |
|
|
87
|
+
| `jetic mcp` | Start MCP server over stdio |
|
|
88
|
+
| `jetic memory` | View/manage runtime state (`memory.json`) |
|
|
89
|
+
| `jetic model` | List or export the behavioral model (`--yaml`) |
|
|
90
|
+
| `jetic adapter` | List/inspect framework scanner adapters |
|
|
91
|
+
| `jetic agent` | Run deterministic model agents |
|
|
92
|
+
| `jetic activity` | List endpoint added/removed events from scans |
|
|
93
|
+
| `jetic tool` | List tools declared in `jetic.tools.ts` |
|
|
94
|
+
| `jetic doctor` | Diagnose setup issues |
|
|
95
|
+
| `jetic upgrade` | Check and upgrade dependencies |
|
|
96
|
+
|
|
97
|
+
Full command reference → [docs.jetic.space](https://docs.jetic.space)
|
|
144
98
|
|
|
145
99
|
---
|
|
146
100
|
|
|
147
|
-
##
|
|
101
|
+
## Jetic Studio
|
|
148
102
|
|
|
149
|
-
|
|
103
|
+
`jetic dev` opens a local web IDE with:
|
|
150
104
|
|
|
151
|
-
- **
|
|
152
|
-
- **
|
|
153
|
-
- **
|
|
154
|
-
- **Memory Inspector
|
|
155
|
-
- **
|
|
105
|
+
- **Model Explorer** — browse, search, and manually add endpoints
|
|
106
|
+
- **Endpoint Inspect** — AST source viewer, schema explorer, live REST client
|
|
107
|
+
- **Workflow Simulations** — multi-step runner with SSE live streaming
|
|
108
|
+
- **Memory Inspector** — view and edit runtime state (`memory.json`)
|
|
109
|
+
- **Execution Traces** — ReactFlow node-graph observability
|
|
110
|
+
- **File Changes** — real-time source change tracker with MCP integration
|
|
156
111
|
|
|
157
112
|
---
|
|
158
113
|
|
|
159
|
-
##
|
|
114
|
+
## Contributing
|
|
160
115
|
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
```json
|
|
164
|
-
{
|
|
165
|
-
"version": "0.3",
|
|
166
|
-
"project": { "name": "my-api", "language": "typescript", "framework": "express" },
|
|
167
|
-
"environments": [{ "name": "local", "baseUrl": "http://localhost:3000" }],
|
|
168
|
-
"endpoints": [
|
|
169
|
-
{
|
|
170
|
-
"id": "post-api-auth-login",
|
|
171
|
-
"method": "POST",
|
|
172
|
-
"path": "/api/auth/login",
|
|
173
|
-
"description": "User authentication endpoint",
|
|
174
|
-
"tags": ["auth"],
|
|
175
|
-
"requestBody": {
|
|
176
|
-
"fields": {
|
|
177
|
-
"email": { "type": "string", "format": "email", "required": true },
|
|
178
|
-
"password": { "type": "string", "minLength": 8, "required": true }
|
|
179
|
-
}
|
|
180
|
-
},
|
|
181
|
-
"responses": {
|
|
182
|
-
"200": { "description": "Returns JWT token", "schema": { "token": "string" } }
|
|
183
|
-
}
|
|
184
|
-
}
|
|
185
|
-
]
|
|
186
|
-
}
|
|
187
|
-
```
|
|
188
|
-
|
|
189
|
-
### `.jetic/changes.json` (File Changes Tracking Log)
|
|
190
|
-
|
|
191
|
-
```json
|
|
192
|
-
{
|
|
193
|
-
"version": 1,
|
|
194
|
-
"watchedSince": "2026-09-18T10:00:00.000Z",
|
|
195
|
-
"projectRoot": "C:/projects/my-api",
|
|
196
|
-
"changes": [
|
|
197
|
-
{
|
|
198
|
-
"filePath": "src/routes/user.routes.ts",
|
|
199
|
-
"absolutePath": "C:/projects/my-api/src/routes/user.routes.ts",
|
|
200
|
-
"changedAt": "2026-09-18T14:20:00.000Z",
|
|
201
|
-
"eventType": "change"
|
|
202
|
-
}
|
|
203
|
-
]
|
|
204
|
-
}
|
|
205
|
-
```
|
|
116
|
+
See [CONTRIBUTING.md](https://github.com/jeticlabs/Jetic/blob/main/CONTRIBUTING.md) for setup instructions and PR guidelines.
|
|
206
117
|
|
|
207
118
|
---
|
|
208
119
|
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
120
|
+
## License
|
|
121
|
+
|
|
122
|
+
[ISC](https://github.com/jeticlabs/Jetic/blob/main/LICENSE)
|
|
212
123
|
|
|
124
|
+
<p align="center"><i>Built with care by the Jetic Team. Star us on GitHub if Jetic helps you.</i></p>
|