@leanmcp/cli 0.5.1 → 0.5.2-alpha.6.6dae082

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 CHANGED
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) 2025 LeanMCP Contributors
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.
1
+ MIT License
2
+
3
+ Copyright (c) 2025 LeanMCP Contributors
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 CHANGED
@@ -1,353 +1,368 @@
1
- <p align="center">
2
- <img
3
- src="https://raw.githubusercontent.com/LeanMCP/leanmcp-sdk/refs/heads/main/assets/logo.png"
4
- alt="LeanMCP Logo"
5
- width="400"
6
- />
7
- </p>
8
-
9
- <p align="center">
10
- <strong>@leanmcp/cli</strong><br/>
11
- Command-line tool for creating, developing, and deploying LeanMCP projects.
12
- </p>
13
-
14
- <p align="center">
15
- <a href="https://www.npmjs.com/package/@leanmcp/cli">
16
- <img src="https://img.shields.io/npm/v/@leanmcp/cli" alt="npm version" />
17
- </a>
18
- <a href="https://www.npmjs.com/package/@leanmcp/cli">
19
- <img src="https://img.shields.io/npm/dm/@leanmcp/cli" alt="npm downloads" />
20
- </a>
21
- <a href="https://docs.leanmcp.com/sdk/cli">
22
- <img src="https://img.shields.io/badge/Docs-leanmcp-0A66C2?" />
23
- </a>
24
- <a href="https://discord.com/invite/DsRcA3GwPy">
25
- <img src="https://img.shields.io/badge/Discord-Join-5865F2?logo=discord&logoColor=white" />
26
- </a>
27
- <a href="https://x.com/LeanMcp">
28
- <img src="https://img.shields.io/badge/@LeanMCP-f5f5f5?logo=x&logoColor=000000" />
29
- </a>
30
- </p>
31
-
32
- ## Features
33
-
34
- - **Quick Scaffolding** — Create production-ready MCP servers in seconds
35
- - **Hot Reload Development** — `leanmcp dev` with UI component hot-reload
36
- - **Cloud Deployment** — Deploy to LeanMCP Cloud with custom subdomains
37
- - **Project Management** — List, view, and delete cloud projects
38
- - **Interactive Setup** — Guided prompts for dependencies and dev server
39
-
40
- ## Installation
41
-
42
- ```bash
43
- npm install -g @leanmcp/cli
44
- ```
45
-
46
- Or run without installing:
47
- ```bash
48
- npx @leanmcp/cli create my-mcp-server
49
- ```
50
-
51
- ## Commands Overview
52
-
53
- ```bash
54
- # Local development
55
- leanmcp create <name> # Create a new project
56
- leanmcp add <service> # Add a service to existing project
57
- leanmcp dev # Start development server with hot-reload
58
- leanmcp build # Build for production
59
- leanmcp start # Start production server
60
-
61
- # Cloud commands
62
- leanmcp login # Authenticate with LeanMCP Cloud
63
- leanmcp logout # Remove API key
64
- leanmcp whoami # Show login status
65
- leanmcp deploy <folder> # Deploy to LeanMCP Cloud
66
- leanmcp projects list # List your cloud projects
67
- leanmcp projects get <id> # Get project details
68
- leanmcp projects delete <id> # Delete a project
69
- ```
70
-
71
- ---
72
-
73
- ## Local Development
74
-
75
- ### create
76
-
77
- Create a new MCP server project:
78
-
79
- ```bash
80
- leanmcp create my-sentiment-tool
81
- ```
82
-
83
- Interactive prompts will guide you through:
84
- 1. Creating the project structure
85
- 2. Installing dependencies (optional)
86
- 3. Starting the dev server (optional)
87
-
88
- **Generated structure:**
89
- ```
90
- my-mcp-server/
91
- ├── main.ts # Entry point with HTTP server
92
- ├── package.json # Dependencies and scripts
93
- ├── tsconfig.json # TypeScript configuration
94
- └── mcp/ # Services directory
95
- └── example/
96
- └── index.ts # Example service with tools
97
- ```
98
-
99
- ### add
100
-
101
- Add a new service to an existing project:
102
-
103
- ```bash
104
- cd my-mcp-server
105
- leanmcp add weather
106
- ```
107
-
108
- This:
109
- - Creates `mcp/weather/index.ts` with example Tool, Prompt, and Resource
110
- - Automatically registers the service in `main.ts`
111
- - Includes `@SchemaConstraint` validation examples
112
-
113
- ### dev
114
-
115
- Start the development server with hot-reload:
116
-
117
- ```bash
118
- leanmcp dev
119
- ```
120
-
121
- This command:
122
- - Scans for `@UIApp` components and builds them
123
- - Starts the HTTP server with `tsx watch`
124
- - Watches `mcp/` directory for changes
125
- - Automatically rebuilds UI components when modified
126
- - Hot-reloads when adding/removing `@UIApp` decorators
127
-
128
- ```bash
129
- $ leanmcp dev
130
-
131
- LeanMCP Development Server
132
-
133
- Found 2 @UIApp component(s)
134
- UI components built
135
-
136
- Starting development server...
137
-
138
- [HTTP][INFO] Server running on http://localhost:3001
139
- [HTTP][INFO] MCP endpoint: http://localhost:3001/mcp
140
- ```
141
-
142
- ### build
143
-
144
- Build the project for production:
145
-
146
- ```bash
147
- leanmcp build
148
- ```
149
-
150
- Compiles TypeScript and bundles UI components.
151
-
152
- ### start
153
-
154
- Start the production server:
155
-
156
- ```bash
157
- leanmcp start
158
- ```
159
-
160
- Runs the compiled production build.
161
-
162
- ---
163
-
164
- ## Cloud Commands
165
-
166
- ### login
167
-
168
- Authenticate with LeanMCP Cloud:
169
-
170
- ```bash
171
- leanmcp login
172
- ```
173
-
174
- Steps:
175
- 1. Go to [ship.leanmcp.com/api-keys](https://ship.leanmcp.com/api-keys)
176
- 2. Create an API key with "BUILD_AND_DEPLOY" scope
177
- 3. Enter the key when prompted
178
-
179
- ### logout
180
-
181
- Remove your API key:
182
-
183
- ```bash
184
- leanmcp logout
185
- ```
186
-
187
- ### whoami
188
-
189
- Check your current login status:
190
-
191
- ```bash
192
- leanmcp whoami
193
- ```
194
-
195
- ### deploy
196
-
197
- Deploy your MCP server to LeanMCP Cloud:
198
-
199
- ```bash
200
- leanmcp deploy .
201
- # Or specify a folder
202
- leanmcp deploy ./my-project
203
- ```
204
-
205
- Deployment process:
206
- 1. Creates project (or updates existing)
207
- 2. Packages and uploads code
208
- 3. Builds container image
209
- 4. Deploys to serverless Lambda
210
- 5. Configures custom subdomain
211
-
212
- ```bash
213
- $ leanmcp deploy .
214
-
215
- LeanMCP Deploy
216
-
217
- Generated project name: swift-coral-sunset
218
- Path: /path/to/my-project
219
-
220
- ? Subdomain for your deployment: my-api
221
- Subdomain 'my-api' is available
222
-
223
- ? Proceed with deployment? Yes
224
-
225
- ✔ Project created: 7f4a3b2c...
226
- Project uploaded
227
- ✔ Build complete (45s)
228
- Deployed
229
- Subdomain configured
230
-
231
- ============================================================
232
- DEPLOYMENT SUCCESSFUL!
233
- ============================================================
234
-
235
- Your MCP server is now live:
236
-
237
- URL: https://my-api.leanmcp.dev
238
-
239
- Test endpoints:
240
- curl https://my-api.leanmcp.dev/health
241
- curl https://my-api.leanmcp.dev/mcp
242
- ```
243
-
244
- ### projects
245
-
246
- Manage your cloud projects:
247
-
248
- ```bash
249
- # List all projects
250
- leanmcp projects list
251
-
252
- # Get project details
253
- leanmcp projects get <project-id>
254
-
255
- # Delete a project
256
- leanmcp projects delete <project-id>
257
- leanmcp projects delete <project-id> --force # Skip confirmation
258
- ```
259
-
260
- ---
261
-
262
- ## NPM Scripts
263
-
264
- Generated projects include:
265
-
266
- ```bash
267
- npm run dev # Start with hot reload (tsx watch)
268
- npm run build # Build for production
269
- npm run start # Run production build
270
- npm run clean # Remove build artifacts
271
- ```
272
-
273
- ## Configuration
274
-
275
- ### Port
276
-
277
- ```bash
278
- PORT=4000 npm run dev
279
- # Or in .env file
280
- PORT=4000
281
- ```
282
-
283
- ### LeanMCP Config
284
-
285
- Stored in `~/.leanmcp/config.json`:
286
- ```json
287
- {
288
- "apiKey": "airtrain_...",
289
- "apiUrl": "https://api.leanmcp.com",
290
- "lastUpdated": "2024-01-15T10:30:00.000Z"
291
- }
292
- ```
293
-
294
- ## Troubleshooting
295
-
296
- ### Port Already in Use
297
-
298
- Change the port in `.env`:
299
- ```bash
300
- PORT=3002
301
- ```
302
-
303
- ### Module Not Found Errors
304
-
305
- Ensure dependencies are installed:
306
- ```bash
307
- npm install
308
- ```
309
-
310
- ### TypeScript Decorator Errors
311
-
312
- Ensure your `tsconfig.json` has:
313
- ```json
314
- {
315
- "compilerOptions": {
316
- "experimentalDecorators": true,
317
- "emitDecoratorMetadata": true
318
- }
319
- }
320
- ```
321
-
322
- ### Deploy: Not Logged In
323
-
324
- Run `leanmcp login` first to authenticate with your API key.
325
-
326
- ### Deploy: Subdomain Taken
327
-
328
- Choose a different subdomain when prompted.
329
-
330
- ## Requirements
331
-
332
- - Node.js >= 18.0.0
333
- - npm >= 9.0.0
334
-
335
- ## Documentation
336
-
337
- - [Full Documentation](https://docs.leanmcp.com/sdk/cli)
338
-
339
- ## Related Packages
340
-
341
- - [@leanmcp/core](https://www.npmjs.com/package/@leanmcp/core) Core MCP server functionality
342
- - [@leanmcp/auth](https://www.npmjs.com/package/@leanmcp/auth) — Authentication decorators
343
- - [@leanmcp/ui](https://www.npmjs.com/package/@leanmcp/ui) MCP App UI components
344
-
345
- ## Links
346
-
347
- - [GitHub Repository](https://github.com/LeanMCP/leanmcp-sdk)
348
- - [NPM Package](https://www.npmjs.com/package/@leanmcp/cli)
349
- - [LeanMCP Dashboard](https://ship.leanmcp.com)
350
-
351
- ## License
352
-
353
- MIT
1
+ <p align="center">
2
+ <img
3
+ src="https://raw.githubusercontent.com/LeanMCP/leanmcp-sdk/refs/heads/main/assets/logo.png"
4
+ alt="LeanMCP Logo"
5
+ width="400"
6
+ />
7
+ </p>
8
+
9
+ <p align="center">
10
+ <strong>@leanmcp/cli</strong><br/>
11
+ Command-line tool for creating, developing, and deploying LeanMCP projects.
12
+ </p>
13
+
14
+ <p align="center">
15
+ <a href="https://www.npmjs.com/package/@leanmcp/cli">
16
+ <img src="https://img.shields.io/npm/v/@leanmcp/cli" alt="npm version" />
17
+ </a>
18
+ <a href="https://www.npmjs.com/package/@leanmcp/cli">
19
+ <img src="https://img.shields.io/npm/dm/@leanmcp/cli" alt="npm downloads" />
20
+ </a>
21
+ <a href="https://docs.leanmcp.com/sdk/cli">
22
+ <img src="https://img.shields.io/badge/Docs-leanmcp-0A66C2?" />
23
+ </a>
24
+ <a href="https://discord.com/invite/DsRcA3GwPy">
25
+ <img src="https://img.shields.io/badge/Discord-Join-5865F2?logo=discord&logoColor=white" />
26
+ </a>
27
+ <a href="https://x.com/LeanMcp">
28
+ <img src="https://img.shields.io/badge/@LeanMCP-f5f5f5?logo=x&logoColor=000000" />
29
+ </a>
30
+ <a href="https://leanmcp.com/">
31
+ <img src="https://img.shields.io/badge/Website-leanmcp-0A66C2?" />
32
+ </a>
33
+ <a href="https://deepwiki.com/LeanMCP/leanmcp-sdk"><img src="https://deepwiki.com/badge.svg" alt="Ask DeepWiki"></a>
34
+ </p>
35
+
36
+ ## Features
37
+
38
+ - **Quick Scaffolding** — Create production-ready MCP servers in seconds
39
+ - **Hot Reload Development** — `leanmcp dev` with UI component hot-reload
40
+ - **Cloud Deployment** — Deploy to LeanMCP Cloud with custom subdomains
41
+ - **Project Management** — List, view, and delete cloud projects
42
+ - **Interactive Setup** — Guided prompts for dependencies and dev server
43
+
44
+ ## Installation
45
+
46
+ ```bash
47
+ npm install -g @leanmcp/cli
48
+ ```
49
+
50
+ Or run without installing:
51
+
52
+ ```bash
53
+ npx @leanmcp/cli create my-mcp-server
54
+ ```
55
+
56
+ ## Commands Overview
57
+
58
+ ```bash
59
+ # Local development
60
+ leanmcp create <name> # Create a new project
61
+ leanmcp add <service> # Add a service to existing project
62
+ leanmcp dev # Start development server with hot-reload
63
+ leanmcp build # Build for production
64
+ leanmcp start # Start production server
65
+
66
+ # Cloud commands
67
+ leanmcp login # Authenticate with LeanMCP Cloud
68
+ leanmcp logout # Remove API key
69
+ leanmcp whoami # Show login status
70
+ leanmcp deploy <folder> # Deploy to LeanMCP Cloud
71
+ leanmcp projects list # List your cloud projects
72
+ leanmcp projects get <id> # Get project details
73
+ leanmcp projects delete <id> # Delete a project
74
+ ```
75
+
76
+ ---
77
+
78
+ ## Local Development
79
+
80
+ ### create
81
+
82
+ Create a new MCP server project:
83
+
84
+ ```bash
85
+ leanmcp create my-sentiment-tool
86
+ ```
87
+
88
+ Interactive prompts will guide you through:
89
+
90
+ 1. Creating the project structure
91
+ 2. Installing dependencies (optional)
92
+ 3. Starting the dev server (optional)
93
+
94
+ **Generated structure:**
95
+
96
+ ```
97
+ my-mcp-server/
98
+ ├── main.ts # Entry point with HTTP server
99
+ ├── package.json # Dependencies and scripts
100
+ ├── tsconfig.json # TypeScript configuration
101
+ └── mcp/ # Services directory
102
+ └── example/
103
+ └── index.ts # Example service with tools
104
+ ```
105
+
106
+ ### add
107
+
108
+ Add a new service to an existing project:
109
+
110
+ ```bash
111
+ cd my-mcp-server
112
+ leanmcp add weather
113
+ ```
114
+
115
+ This:
116
+
117
+ - Creates `mcp/weather/index.ts` with example Tool, Prompt, and Resource
118
+ - Automatically registers the service in `main.ts`
119
+ - Includes `@SchemaConstraint` validation examples
120
+
121
+ ### dev
122
+
123
+ Start the development server with hot-reload:
124
+
125
+ ```bash
126
+ leanmcp dev
127
+ ```
128
+
129
+ This command:
130
+
131
+ - Scans for `@UIApp` components and builds them
132
+ - Starts the HTTP server with `tsx watch`
133
+ - Watches `mcp/` directory for changes
134
+ - Automatically rebuilds UI components when modified
135
+ - Hot-reloads when adding/removing `@UIApp` decorators
136
+
137
+ ```bash
138
+ $ leanmcp dev
139
+
140
+ LeanMCP Development Server
141
+
142
+ Found 2 @UIApp component(s)
143
+ ℹ UI components built
144
+
145
+ Starting development server...
146
+
147
+ [HTTP][INFO] Server running on http://localhost:3001
148
+ [HTTP][INFO] MCP endpoint: http://localhost:3001/mcp
149
+ ```
150
+
151
+ ### build
152
+
153
+ Build the project for production:
154
+
155
+ ```bash
156
+ leanmcp build
157
+ ```
158
+
159
+ Compiles TypeScript and bundles UI components.
160
+
161
+ ### start
162
+
163
+ Start the production server:
164
+
165
+ ```bash
166
+ leanmcp start
167
+ ```
168
+
169
+ Runs the compiled production build.
170
+
171
+ ---
172
+
173
+ ## Cloud Commands
174
+
175
+ ### login
176
+
177
+ Authenticate with LeanMCP Cloud:
178
+
179
+ ```bash
180
+ leanmcp login
181
+ ```
182
+
183
+ Steps:
184
+
185
+ 1. Go to [ship.leanmcp.com/api-keys](https://ship.leanmcp.com/api-keys)
186
+ 2. Create an API key with "BUILD_AND_DEPLOY" scope
187
+ 3. Enter the key when prompted
188
+
189
+ ### logout
190
+
191
+ Remove your API key:
192
+
193
+ ```bash
194
+ leanmcp logout
195
+ ```
196
+
197
+ ### whoami
198
+
199
+ Check your current login status:
200
+
201
+ ```bash
202
+ leanmcp whoami
203
+ ```
204
+
205
+ ### deploy
206
+
207
+ Deploy your MCP server to LeanMCP Cloud:
208
+
209
+ ```bash
210
+ leanmcp deploy .
211
+ # Or specify a folder
212
+ leanmcp deploy ./my-project
213
+ ```
214
+
215
+ Deployment process:
216
+
217
+ 1. Creates project (or updates existing)
218
+ 2. Packages and uploads code
219
+ 3. Builds container image
220
+ 4. Deploys to serverless Lambda
221
+ 5. Configures custom subdomain
222
+
223
+ ```bash
224
+ $ leanmcp deploy .
225
+
226
+ LeanMCP Deploy
227
+
228
+ Generated project name: swift-coral-sunset
229
+ Path: /path/to/my-project
230
+
231
+ ? Subdomain for your deployment: my-api
232
+ Subdomain 'my-api' is available
233
+
234
+ ? Proceed with deployment? Yes
235
+
236
+ ✔ Project created: 7f4a3b2c...
237
+ ✔ Project uploaded
238
+ ✔ Build complete (45s)
239
+ Deployed
240
+ Subdomain configured
241
+
242
+ ============================================================
243
+ DEPLOYMENT SUCCESSFUL!
244
+ ============================================================
245
+
246
+ Your MCP server is now live:
247
+
248
+ URL: https://my-api.leanmcp.dev
249
+
250
+ Test endpoints:
251
+ curl https://my-api.leanmcp.dev/health
252
+ curl https://my-api.leanmcp.dev/mcp
253
+ ```
254
+
255
+ ### projects
256
+
257
+ Manage your cloud projects:
258
+
259
+ ```bash
260
+ # List all projects
261
+ leanmcp projects list
262
+
263
+ # Get project details
264
+ leanmcp projects get <project-id>
265
+
266
+ # Delete a project
267
+ leanmcp projects delete <project-id>
268
+ leanmcp projects delete <project-id> --force # Skip confirmation
269
+ ```
270
+
271
+ ---
272
+
273
+ ## NPM Scripts
274
+
275
+ Generated projects include:
276
+
277
+ ```bash
278
+ npm run dev # Start with hot reload (tsx watch)
279
+ npm run build # Build for production
280
+ npm run start # Run production build
281
+ npm run clean # Remove build artifacts
282
+ ```
283
+
284
+ ## Configuration
285
+
286
+ ### Port
287
+
288
+ ```bash
289
+ PORT=4000 npm run dev
290
+ # Or in .env file
291
+ PORT=4000
292
+ ```
293
+
294
+ ### LeanMCP Config
295
+
296
+ Stored in `~/.leanmcp/config.json`:
297
+
298
+ ```json
299
+ {
300
+ "apiKey": "airtrain_...",
301
+ "apiUrl": "https://api.leanmcp.com",
302
+ "lastUpdated": "2024-01-15T10:30:00.000Z"
303
+ }
304
+ ```
305
+
306
+ ## Troubleshooting
307
+
308
+ ### Port Already in Use
309
+
310
+ Change the port in `.env`:
311
+
312
+ ```bash
313
+ PORT=3002
314
+ ```
315
+
316
+ ### Module Not Found Errors
317
+
318
+ Ensure dependencies are installed:
319
+
320
+ ```bash
321
+ npm install
322
+ ```
323
+
324
+ ### TypeScript Decorator Errors
325
+
326
+ Ensure your `tsconfig.json` has:
327
+
328
+ ```json
329
+ {
330
+ "compilerOptions": {
331
+ "experimentalDecorators": true,
332
+ "emitDecoratorMetadata": true
333
+ }
334
+ }
335
+ ```
336
+
337
+ ### Deploy: Not Logged In
338
+
339
+ Run `leanmcp login` first to authenticate with your API key.
340
+
341
+ ### Deploy: Subdomain Taken
342
+
343
+ Choose a different subdomain when prompted.
344
+
345
+ ## Requirements
346
+
347
+ - Node.js >= 18.0.0
348
+ - npm >= 9.0.0
349
+
350
+ ## Documentation
351
+
352
+ - [Full Documentation](https://docs.leanmcp.com/sdk/cli)
353
+
354
+ ## Related Packages
355
+
356
+ - [@leanmcp/core](https://www.npmjs.com/package/@leanmcp/core) — Core MCP server functionality
357
+ - [@leanmcp/auth](https://www.npmjs.com/package/@leanmcp/auth) — Authentication decorators
358
+ - [@leanmcp/ui](https://www.npmjs.com/package/@leanmcp/ui) — MCP App UI components
359
+
360
+ ## Links
361
+
362
+ - [GitHub Repository](https://github.com/LeanMCP/leanmcp-sdk)
363
+ - [NPM Package](https://www.npmjs.com/package/@leanmcp/cli)
364
+ - [LeanMCP Dashboard](https://ship.leanmcp.com)
365
+
366
+ ## License
367
+
368
+ MIT
package/bin/leanmcp.js CHANGED
@@ -1,4 +1,4 @@
1
1
  #!/usr/bin/env node
2
-
3
- // Always prefer ESM build
4
- import('../dist/index.js');
2
+
3
+ // Always prefer ESM build
4
+ import('../dist/index.js');
package/dist/index.js CHANGED
@@ -397,7 +397,7 @@ createRoot(document.getElementById('root')!).render(
397
397
  resolve: {
398
398
  alias: {
399
399
  // Resolve React from project or workspace root node_modules
400
- "react": reactPath,
400
+ react: reactPath,
401
401
  "react-dom": reactDomPath,
402
402
  "react/jsx-runtime": path2.join(reactPath, "jsx-runtime"),
403
403
  "react/jsx-dev-runtime": path2.join(reactPath, "jsx-dev-runtime")
@@ -1132,7 +1132,7 @@ async function loginCommand() {
1132
1132
  const response = await fetch(validateUrl, {
1133
1133
  method: "GET",
1134
1134
  headers: {
1135
- "Authorization": `Bearer ${apiKey.trim()}`,
1135
+ Authorization: `Bearer ${apiKey.trim()}`,
1136
1136
  "Content-Type": "application/json"
1137
1137
  }
1138
1138
  });
@@ -1219,7 +1219,7 @@ async function whoamiCommand() {
1219
1219
  const response = await fetch(whoamiUrl, {
1220
1220
  method: "GET",
1221
1221
  headers: {
1222
- "Authorization": `Bearer ${config.apiKey}`,
1222
+ Authorization: `Bearer ${config.apiKey}`,
1223
1223
  "Content-Type": "application/json"
1224
1224
  }
1225
1225
  });
@@ -1671,7 +1671,7 @@ async function waitForBuild(apiUrl, apiKey, buildId, spinner) {
1671
1671
  while (attempts < maxAttempts) {
1672
1672
  const response = await debugFetch(`${apiUrl}${API_ENDPOINTS.getBuild}/${buildId}`, {
1673
1673
  headers: {
1674
- "Authorization": `Bearer ${apiKey}`
1674
+ Authorization: `Bearer ${apiKey}`
1675
1675
  }
1676
1676
  });
1677
1677
  if (!response.ok) {
@@ -1700,7 +1700,7 @@ async function waitForDeployment(apiUrl, apiKey, deploymentId, spinner) {
1700
1700
  while (attempts < maxAttempts) {
1701
1701
  const response = await debugFetch(`${apiUrl}${API_ENDPOINTS.getDeployment}/${deploymentId}`, {
1702
1702
  headers: {
1703
- "Authorization": `Bearer ${apiKey}`
1703
+ Authorization: `Bearer ${apiKey}`
1704
1704
  }
1705
1705
  });
1706
1706
  if (!response.ok) {
@@ -1806,7 +1806,7 @@ Generated project name: ${chalk.bold(projectName)}
1806
1806
  try {
1807
1807
  const projectsResponse = await debugFetch(`${apiUrl}${API_ENDPOINTS.projects}`, {
1808
1808
  headers: {
1809
- "Authorization": `Bearer ${apiKey}`
1809
+ Authorization: `Bearer ${apiKey}`
1810
1810
  }
1811
1811
  });
1812
1812
  if (projectsResponse.ok) {
@@ -1892,7 +1892,7 @@ Generated project name: ${chalk.bold(projectName)}
1892
1892
  debug3("Checking subdomain:", subdomain);
1893
1893
  const checkResponse = await debugFetch(`${apiUrl}${API_ENDPOINTS.checkSubdomain}/${subdomain}`, {
1894
1894
  headers: {
1895
- "Authorization": `Bearer ${apiKey}`
1895
+ Authorization: `Bearer ${apiKey}`
1896
1896
  }
1897
1897
  });
1898
1898
  if (checkResponse.ok) {
@@ -1947,7 +1947,7 @@ This subdomain is associated with project: ${result.ownedByProject?.substring(0,
1947
1947
  const createResponse = await debugFetch(`${apiUrl}${API_ENDPOINTS.projects}`, {
1948
1948
  method: "POST",
1949
1949
  headers: {
1950
- "Authorization": `Bearer ${apiKey}`,
1950
+ Authorization: `Bearer ${apiKey}`,
1951
1951
  "Content-Type": "application/json"
1952
1952
  },
1953
1953
  body: JSON.stringify({
@@ -1977,7 +1977,7 @@ ${error instanceof Error ? error.message : String(error)}`);
1977
1977
  const uploadUrlResponse = await debugFetch(`${apiUrl}${API_ENDPOINTS.projects}/${projectId}/upload-url`, {
1978
1978
  method: "POST",
1979
1979
  headers: {
1980
- "Authorization": `Bearer ${apiKey}`,
1980
+ Authorization: `Bearer ${apiKey}`,
1981
1981
  "Content-Type": "application/json"
1982
1982
  },
1983
1983
  body: JSON.stringify({
@@ -2013,7 +2013,7 @@ ${error instanceof Error ? error.message : String(error)}`);
2013
2013
  await debugFetch(`${apiUrl}${API_ENDPOINTS.projects}/${projectId}`, {
2014
2014
  method: "PATCH",
2015
2015
  headers: {
2016
- "Authorization": `Bearer ${apiKey}`,
2016
+ Authorization: `Bearer ${apiKey}`,
2017
2017
  "Content-Type": "application/json"
2018
2018
  },
2019
2019
  body: JSON.stringify({
@@ -2037,7 +2037,7 @@ ${error instanceof Error ? error.message : String(error)}`);
2037
2037
  const buildResponse = await debugFetch(`${apiUrl}${API_ENDPOINTS.triggerBuild}/${projectId}`, {
2038
2038
  method: "POST",
2039
2039
  headers: {
2040
- "Authorization": `Bearer ${apiKey}`
2040
+ Authorization: `Bearer ${apiKey}`
2041
2041
  }
2042
2042
  });
2043
2043
  if (!buildResponse.ok) {
@@ -2064,7 +2064,7 @@ ${error instanceof Error ? error.message : String(error)}`);
2064
2064
  const deployResponse = await debugFetch(`${apiUrl}${API_ENDPOINTS.createDeployment}`, {
2065
2065
  method: "POST",
2066
2066
  headers: {
2067
- "Authorization": `Bearer ${apiKey}`,
2067
+ Authorization: `Bearer ${apiKey}`,
2068
2068
  "Content-Type": "application/json"
2069
2069
  },
2070
2070
  body: JSON.stringify({
@@ -2092,7 +2092,7 @@ ${error instanceof Error ? error.message : String(error)}`);
2092
2092
  const mappingResponse = await debugFetch(`${apiUrl}${API_ENDPOINTS.createMapping}`, {
2093
2093
  method: "POST",
2094
2094
  headers: {
2095
- "Authorization": `Bearer ${apiKey}`,
2095
+ Authorization: `Bearer ${apiKey}`,
2096
2096
  "Content-Type": "application/json"
2097
2097
  },
2098
2098
  body: JSON.stringify({
@@ -2165,7 +2165,7 @@ async function projectsListCommand() {
2165
2165
  const apiUrl = await getApiUrl();
2166
2166
  const response = await fetch(`${apiUrl}${API_ENDPOINT}`, {
2167
2167
  headers: {
2168
- "Authorization": `Bearer ${apiKey}`
2168
+ Authorization: `Bearer ${apiKey}`
2169
2169
  }
2170
2170
  });
2171
2171
  if (!response.ok) {
@@ -2210,7 +2210,7 @@ async function projectsGetCommand(projectId) {
2210
2210
  const apiUrl = await getApiUrl();
2211
2211
  const response = await fetch(`${apiUrl}${API_ENDPOINT}/${projectId}`, {
2212
2212
  headers: {
2213
- "Authorization": `Bearer ${apiKey}`
2213
+ Authorization: `Bearer ${apiKey}`
2214
2214
  }
2215
2215
  });
2216
2216
  if (!response.ok) {
@@ -2266,7 +2266,7 @@ async function projectsDeleteCommand(projectId, options = {}) {
2266
2266
  const response = await fetch(`${apiUrl}${API_ENDPOINT}/${projectId}`, {
2267
2267
  method: "DELETE",
2268
2268
  headers: {
2269
- "Authorization": `Bearer ${apiKey}`
2269
+ Authorization: `Bearer ${apiKey}`
2270
2270
  }
2271
2271
  });
2272
2272
  if (!response.ok) {
@@ -2375,7 +2375,7 @@ async function envListCommand(folderPath, options = {}) {
2375
2375
  const reveal = options.reveal ? "?reveal=true" : "";
2376
2376
  const response = await debugFetch2(`${apiUrl}/api/lambda-deploy/${config.deploymentId}/env${reveal}`, {
2377
2377
  headers: {
2378
- "Authorization": `Bearer ${apiKey}`
2378
+ Authorization: `Bearer ${apiKey}`
2379
2379
  }
2380
2380
  });
2381
2381
  if (!response.ok) {
@@ -2457,7 +2457,7 @@ ${error instanceof Error ? error.message : String(error)}`);
2457
2457
  const response = await debugFetch2(`${apiUrl}/api/lambda-deploy/${config.deploymentId}/env`, {
2458
2458
  method: "PUT",
2459
2459
  headers: {
2460
- "Authorization": `Bearer ${apiKey}`,
2460
+ Authorization: `Bearer ${apiKey}`,
2461
2461
  "Content-Type": "application/json"
2462
2462
  },
2463
2463
  body: JSON.stringify({
@@ -2491,7 +2491,7 @@ async function envGetCommand(key, folderPath, options = {}) {
2491
2491
  const reveal = options.reveal ? "?reveal=true" : "";
2492
2492
  const response = await debugFetch2(`${apiUrl}/api/lambda-deploy/${config.deploymentId}/env${reveal}`, {
2493
2493
  headers: {
2494
- "Authorization": `Bearer ${apiKey}`
2494
+ Authorization: `Bearer ${apiKey}`
2495
2495
  }
2496
2496
  });
2497
2497
  if (!response.ok) {
@@ -2542,7 +2542,7 @@ async function envRemoveCommand(key, folderPath, options = {}) {
2542
2542
  const response = await debugFetch2(`${apiUrl}/api/lambda-deploy/${config.deploymentId}/env/${key}`, {
2543
2543
  method: "DELETE",
2544
2544
  headers: {
2545
- "Authorization": `Bearer ${apiKey}`
2545
+ Authorization: `Bearer ${apiKey}`
2546
2546
  }
2547
2547
  });
2548
2548
  if (!response.ok) {
@@ -2570,7 +2570,7 @@ async function envPullCommand(folderPath, options = {}) {
2570
2570
  try {
2571
2571
  const response = await debugFetch2(`${apiUrl}/api/lambda-deploy/${config.deploymentId}/env?reveal=true`, {
2572
2572
  headers: {
2573
- "Authorization": `Bearer ${apiKey}`
2573
+ Authorization: `Bearer ${apiKey}`
2574
2574
  }
2575
2575
  });
2576
2576
  if (!response.ok) {
@@ -2637,7 +2637,7 @@ ${error instanceof Error ? error.message : String(error)}`);
2637
2637
  const response = await debugFetch2(`${apiUrl}/api/lambda-deploy/${config.deploymentId}/env`, {
2638
2638
  method: "PUT",
2639
2639
  headers: {
2640
- "Authorization": `Bearer ${apiKey}`,
2640
+ Authorization: `Bearer ${apiKey}`,
2641
2641
  "Content-Type": "application/json"
2642
2642
  },
2643
2643
  body: JSON.stringify({
@@ -3474,13 +3474,13 @@ PORT=3001
3474
3474
  "@leanmcp/core": "^0.3.14",
3475
3475
  "@leanmcp/ui": "^0.2.1",
3476
3476
  "@leanmcp/auth": "^0.4.0",
3477
- "dotenv": "^16.5.0"
3477
+ dotenv: "^16.5.0"
3478
3478
  },
3479
3479
  devDependencies: {
3480
3480
  "@leanmcp/cli": "^0.4.0",
3481
3481
  "@types/node": "^20.0.0",
3482
- "tsx": "^4.20.3",
3483
- "typescript": "^5.6.3"
3482
+ tsx: "^4.20.3",
3483
+ typescript: "^5.6.3"
3484
3484
  }
3485
3485
  };
3486
3486
  await fs10.writeJSON(path10.join(targetDir, "package.json"), pkg2, {
package/package.json CHANGED
@@ -1,73 +1,73 @@
1
- {
2
- "name": "@leanmcp/cli",
3
- "version": "0.5.1",
4
- "description": "Command-line interface for scaffolding LeanMCP projects",
5
- "bin": {
6
- "leanmcp": "bin/leanmcp.js"
7
- },
8
- "type": "module",
9
- "main": "dist/index.js",
10
- "types": "dist/index.d.ts",
11
- "exports": {
12
- ".": {
13
- "types": "./dist/index.d.ts",
14
- "import": "./dist/index.js"
15
- }
16
- },
17
- "files": [
18
- "bin",
19
- "dist",
20
- "README.md",
21
- "LICENSE"
22
- ],
23
- "scripts": {
24
- "build": "tsup src/index.ts --format esm --dts",
25
- "dev": "tsup src/index.ts --format esm --dts --watch",
26
- "test": "echo \"No tests yet\" && exit 0",
27
- "clean": "rimraf dist"
28
- },
29
- "dependencies": {
30
- "@inquirer/prompts": "^7.0.1",
31
- "@vitejs/plugin-react": "^4.3.0",
32
- "archiver": "^7.0.1",
33
- "autoprefixer": "^10.4.16",
34
- "chalk": "^5.3.0",
35
- "chokidar": "^4.0.0",
36
- "commander": "^12.0.0",
37
- "fs-extra": "^11.2.0",
38
- "glob": "^11.0.0",
39
- "ora": "^8.1.0",
40
- "postcss": "^8.4.32",
41
- "tailwindcss": "^3.4.0",
42
- "vite": "^5.4.0",
43
- "vite-plugin-singlefile": "^2.3.0"
44
- },
45
- "devDependencies": {
46
- "@types/archiver": "^6.0.3",
47
- "@types/fs-extra": "^11.0.4",
48
- "@types/node": "^25.0.2",
49
- "rimraf": "^6.1.2"
50
- },
51
- "repository": {
52
- "type": "git",
53
- "url": "git+https://github.com/LeanMCP/leanmcp-sdk.git",
54
- "directory": "packages/cli"
55
- },
56
- "homepage": "https://github.com/LeanMCP/leanmcp-sdk#readme",
57
- "bugs": {
58
- "url": "https://github.com/LeanMCP/leanmcp-sdk/issues"
59
- },
60
- "keywords": [
61
- "mcp",
62
- "model-context-protocol",
63
- "cli",
64
- "scaffolding",
65
- "generator",
66
- "typescript"
67
- ],
68
- "author": "LeanMCP <admin@leanmcp.com>",
69
- "license": "MIT",
70
- "publishConfig": {
71
- "access": "public"
72
- }
73
- }
1
+ {
2
+ "name": "@leanmcp/cli",
3
+ "version": "0.5.2-alpha.6.6dae082",
4
+ "description": "Command-line interface for scaffolding LeanMCP projects",
5
+ "bin": {
6
+ "leanmcp": "bin/leanmcp.js"
7
+ },
8
+ "type": "module",
9
+ "main": "dist/index.js",
10
+ "types": "dist/index.d.ts",
11
+ "exports": {
12
+ ".": {
13
+ "types": "./dist/index.d.ts",
14
+ "import": "./dist/index.js"
15
+ }
16
+ },
17
+ "files": [
18
+ "bin",
19
+ "dist",
20
+ "README.md",
21
+ "LICENSE"
22
+ ],
23
+ "scripts": {
24
+ "build": "tsup src/index.ts --format esm --dts",
25
+ "dev": "tsup src/index.ts --format esm --dts --watch",
26
+ "test": "echo \"No tests yet\" && exit 0",
27
+ "clean": "rimraf dist"
28
+ },
29
+ "dependencies": {
30
+ "@inquirer/prompts": "^7.0.1",
31
+ "@vitejs/plugin-react": "^4.3.0",
32
+ "archiver": "^7.0.1",
33
+ "autoprefixer": "^10.4.16",
34
+ "chalk": "^5.3.0",
35
+ "chokidar": "^4.0.0",
36
+ "commander": "^12.0.0",
37
+ "fs-extra": "^11.2.0",
38
+ "glob": "^11.0.0",
39
+ "ora": "^8.1.0",
40
+ "postcss": "^8.4.32",
41
+ "tailwindcss": "^3.4.0",
42
+ "vite": "^5.4.0",
43
+ "vite-plugin-singlefile": "^2.3.0"
44
+ },
45
+ "devDependencies": {
46
+ "@types/archiver": "^6.0.3",
47
+ "@types/fs-extra": "^11.0.4",
48
+ "@types/node": "^25.0.2",
49
+ "rimraf": "^6.1.2"
50
+ },
51
+ "repository": {
52
+ "type": "git",
53
+ "url": "git+https://github.com/LeanMCP/leanmcp-sdk.git",
54
+ "directory": "packages/cli"
55
+ },
56
+ "homepage": "https://github.com/LeanMCP/leanmcp-sdk#readme",
57
+ "bugs": {
58
+ "url": "https://github.com/LeanMCP/leanmcp-sdk/issues"
59
+ },
60
+ "keywords": [
61
+ "mcp",
62
+ "model-context-protocol",
63
+ "cli",
64
+ "scaffolding",
65
+ "generator",
66
+ "typescript"
67
+ ],
68
+ "author": "LeanMCP <admin@leanmcp.com>",
69
+ "license": "MIT",
70
+ "publishConfig": {
71
+ "access": "public"
72
+ }
73
+ }