@neural-tools/cli 0.1.5 → 0.1.6

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.md CHANGED
@@ -1,80 +1,21 @@
1
- # Neural Tools License
2
-
3
- Copyright (c) 2025 Luke Amy. All rights reserved.
4
-
5
- ## License Agreement
6
-
7
- This software is provided under a dual-license model:
8
-
9
- ### 1. Free Tier License (MIT)
10
-
11
- The following components are licensed under the MIT License:
12
-
13
- - Basic MCP generation functionality
14
- - Claude command generation
15
- - Core utilities and types
16
- - Basic templates
17
- - Documentation and examples
18
-
19
- Permission is hereby granted, free of charge, to any person obtaining a copy of the free tier components to use, copy, modify, merge, publish, and distribute, subject to the following conditions:
20
-
21
- The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
22
-
23
- ### 2. Pro/Enterprise License (Proprietary)
24
-
25
- The following features require a valid Pro or Enterprise license:
26
-
27
- **Pro Features:**
28
- - Vector database integration
29
- - Semantic caching
30
- - Fine-tuning workflows
31
- - Cloud deployment templates (AWS/GCP)
32
- - Premium templates and examples
33
- - GitHub automation features
34
-
35
- **Enterprise Features:**
36
- - White-label support
37
- - Custom integrations
38
- - Priority support
39
- - SLA guarantees
40
- - Team collaboration features
41
-
42
- These features are proprietary and may not be used without a valid license key purchased from neural-tools.dev.
43
-
44
- ### License Terms
45
-
46
- 1. **Free Tier**: You may use the free tier features for any purpose, including commercial use, under the MIT License terms.
47
-
48
- 2. **Pro/Enterprise**: You must purchase a license to access Pro or Enterprise features. Each license is:
49
- - Per-user for individual licenses
50
- - Per-organization for team/enterprise licenses
51
- - Non-transferable without written consent
52
- - Subject to the terms at neural-tools.dev/terms
53
-
54
- 3. **Source Code**: This repository is private. You may not:
55
- - Redistribute the source code
56
- - Create derivative works for redistribution
57
- - Reverse engineer Pro/Enterprise features
58
- - Remove or circumvent license checks
59
-
60
- 4. **Support**: Support is provided based on your license tier:
61
- - Free: Community support only
62
- - Pro: Email support (48-hour response)
63
- - Enterprise: Priority support with SLA
64
-
65
- ### Warranty Disclaimer
66
-
67
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
68
-
69
- IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
70
-
71
- ### Contact
72
-
73
- For licensing inquiries:
74
- - Email: licensing@neural-tools.dev
75
- - Website: https://neural-tools.dev/pricing
76
- - Support: support@neural-tools.dev
77
-
78
- ---
79
-
80
- **Last Updated:** January 2025
1
+ # MIT License
2
+
3
+ Copyright (c) 2025 Luke Amy
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,271 @@
1
+ # @neural-tools/cli
2
+
3
+ > CLI for Neural Tools - Generate MCPs, Claude commands, and AI workflows
4
+
5
+ [![npm version](https://img.shields.io/npm/v/@neural-tools/cli)](https://www.npmjs.com/package/@neural-tools/cli)
6
+ [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](../../LICENSE.md)
7
+
8
+ The main CLI tool for Neural Tools, providing commands to generate MCP servers, Claude commands, agents, and deploy AI-powered applications.
9
+
10
+ ## Installation
11
+
12
+ ### Global Installation (Recommended)
13
+
14
+ ```bash
15
+ npm install -g @neural-tools/cli
16
+ ```
17
+
18
+ ### Project-specific
19
+
20
+ ```bash
21
+ npm install --save-dev @neural-tools/cli
22
+ ```
23
+
24
+ ### Using npx (No installation)
25
+
26
+ ```bash
27
+ npx @neural-tools/cli <command>
28
+ ```
29
+
30
+ ## Usage
31
+
32
+ ```bash
33
+ neural-tools <command> [options]
34
+ ```
35
+
36
+ ## Available Commands
37
+
38
+ ### `generate mcp`
39
+
40
+ Generate a FastMCP server with Python templates.
41
+
42
+ ```bash
43
+ neural-tools generate mcp <name> [options]
44
+
45
+ Options:
46
+ -d, --description <desc> Description of the MCP server
47
+ -o, --output <dir> Output directory (default: ./apps)
48
+ --cicd <provider> CI/CD provider (github, harness, none)
49
+ --deployment <platform> Deployment platform (aws, gcp, none)
50
+ --dry-run Preview without creating files
51
+ ```
52
+
53
+ **Example:**
54
+
55
+ ```bash
56
+ neural-tools generate mcp github-integration \
57
+ --description "GitHub API integration server" \
58
+ --cicd github \
59
+ --deployment aws
60
+ ```
61
+
62
+ This creates:
63
+ - Complete FastMCP server with Python
64
+ - Docker configuration
65
+ - CI/CD workflow files
66
+ - Deployment templates (if specified)
67
+
68
+ ---
69
+
70
+ ### `generate command`
71
+
72
+ Generate a Claude Code slash command.
73
+
74
+ ```bash
75
+ neural-tools generate command <name> [options]
76
+
77
+ Options:
78
+ -d, --description <desc> Description of the command
79
+ -o, --output <dir> Output directory (default: ./claude/commands)
80
+ --args <arguments...> Command arguments
81
+ --tools <tools...> Allowed tools for Claude
82
+ --global Install globally to ~/.claude/commands
83
+ --dry-run Preview without creating files
84
+ ```
85
+
86
+ **Example:**
87
+
88
+ ```bash
89
+ neural-tools generate command search-docs \
90
+ --description "Search project documentation" \
91
+ --args query \
92
+ --tools "Read" "Grep" "Bash"
93
+ ```
94
+
95
+ This creates a slash command that can be used in Claude Code as `/search-docs <query>`.
96
+
97
+ ---
98
+
99
+ ### `generate agent`
100
+
101
+ Generate a specialized Claude agent.
102
+
103
+ ```bash
104
+ neural-tools generate agent <name> [options]
105
+
106
+ Options:
107
+ -d, --description <desc> Description of the agent
108
+ -o, --output <dir> Output directory (default: ./claude/agents)
109
+ --model <model> Model to use (sonnet, opus, haiku)
110
+ --tools <tools...> Available tools
111
+ --global Install globally to ~/.claude/agents
112
+ --dry-run Preview without creating files
113
+ ```
114
+
115
+ **Example:**
116
+
117
+ ```bash
118
+ neural-tools generate agent code-reviewer \
119
+ --description "Automated code review agent" \
120
+ --model opus \
121
+ --tools "Read" "Grep" "Edit"
122
+ ```
123
+
124
+ ---
125
+
126
+ ### `deploy`
127
+
128
+ Deploy an MCP server to AWS or GCP.
129
+
130
+ ```bash
131
+ neural-tools deploy <name> [options]
132
+
133
+ Options:
134
+ -p, --platform <platform> Deployment platform (aws, gcp)
135
+ --region <region> Cloud region
136
+ --env <env> Environment (dev, staging, prod)
137
+ ```
138
+
139
+ **Example:**
140
+
141
+ ```bash
142
+ neural-tools deploy github-integration \
143
+ --platform aws \
144
+ --region us-east-1 \
145
+ --env production
146
+ ```
147
+
148
+ ---
149
+
150
+ ### `login`
151
+
152
+ Manage your Neural Tools license (optional).
153
+
154
+ ```bash
155
+ neural-tools login [options]
156
+
157
+ Options:
158
+ --key <key> License key
159
+ ```
160
+
161
+ **Note:** All features are free and available without a license.
162
+
163
+ ---
164
+
165
+ ### `status`
166
+
167
+ View current status and available features.
168
+
169
+ ```bash
170
+ neural-tools status
171
+ ```
172
+
173
+ Shows:
174
+ - License information (if configured)
175
+ - Available features (all features are enabled)
176
+ - Quick start commands
177
+
178
+ ## Project Structure
179
+
180
+ When you use the CLI, it creates organized project structures:
181
+
182
+ ```
183
+ my-project/
184
+ ├── apps/ # Generated MCP servers
185
+ │ └── mcp-github/
186
+ │ ├── server.py
187
+ │ ├── Dockerfile
188
+ │ └── requirements.txt
189
+ ├── claude/
190
+ │ ├── commands/ # Slash commands
191
+ │ │ └── search-docs.md
192
+ │ └── agents/ # Specialized agents
193
+ │ └── code-reviewer.md
194
+ └── package.json
195
+ ```
196
+
197
+ ## Configuration
198
+
199
+ The CLI reads configuration from:
200
+ - `package.json` (workspace settings)
201
+ - `.env` (environment variables)
202
+ - `~/.ai-toolkit/` (user settings)
203
+
204
+ ## Development
205
+
206
+ ```bash
207
+ # Clone the repository
208
+ git clone https://github.com/MacLeanLuke/neural-tools.git
209
+ cd neural-tools/packages/cli
210
+
211
+ # Install dependencies
212
+ pnpm install
213
+
214
+ # Build
215
+ pnpm build
216
+
217
+ # Run locally
218
+ node dist/cli.js --help
219
+ ```
220
+
221
+ ## Examples
222
+
223
+ ### Create a GitHub MCP Server
224
+
225
+ ```bash
226
+ neural-tools generate mcp github \
227
+ --description "GitHub API integration" \
228
+ --cicd github \
229
+ --deployment aws
230
+ ```
231
+
232
+ ### Create a Knowledge Base Search Command
233
+
234
+ ```bash
235
+ neural-tools generate command search-kb \
236
+ --description "Search vector database" \
237
+ --args query \
238
+ --tools "Read" "Bash"
239
+ ```
240
+
241
+ ### Deploy to AWS
242
+
243
+ ```bash
244
+ neural-tools deploy github \
245
+ --platform aws \
246
+ --region us-east-1 \
247
+ --env prod
248
+ ```
249
+
250
+ ## Dependencies
251
+
252
+ - [@neural-tools/core](../core) - Core utilities and types
253
+ - commander - CLI framework
254
+ - inquirer - Interactive prompts
255
+ - execa - Process execution
256
+ - fs-extra - Enhanced file system operations
257
+
258
+ ## Contributing
259
+
260
+ Contributions are welcome! See the [main repository](https://github.com/MacLeanLuke/neural-tools) for guidelines.
261
+
262
+ ## License
263
+
264
+ MIT - See [LICENSE.md](../../LICENSE.md) for details.
265
+
266
+ ## Links
267
+
268
+ - [Documentation](https://neural-tools.com/docs/cli.html)
269
+ - [GitHub](https://github.com/MacLeanLuke/neural-tools)
270
+ - [npm](https://www.npmjs.com/package/@neural-tools/cli)
271
+ - [Issues](https://github.com/MacLeanLuke/neural-tools/issues)
package/dist/cli.js CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- "use strict";var K=Object.create;var O=Object.defineProperty;var z=Object.getOwnPropertyDescriptor;var V=Object.getOwnPropertyNames;var H=Object.getPrototypeOf,J=Object.prototype.hasOwnProperty;var Q=(e,t,o,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of V(t))!J.call(e,r)&&r!==o&&O(e,r,{get:()=>t[r],enumerable:!(n=z(t,r))||n.enumerable});return e};var u=(e,t,o)=>(o=e!=null?K(H(e)):{},Q(t||!e||!e.__esModule?O(o,"default",{value:e,enumerable:!0}):o,e));var W=require("commander"),B=require("@neural-tools/core");var m=u(require("path")),p=u(require("fs-extra")),d=require("@neural-tools/core"),E=u(require("inquirer"));async function T(e,t){d.logger.header(`Generating MCP: ${e}`),t.deployment!=="none"&&await(0,d.requireFeature)("cloud-deployment","Cloud Deployment");let o=t.description;o||(o=(await E.default.prompt([{type:"input",name:"description",message:"Description of your MCP:",default:`${e} MCP server`}])).description);let n=m.default.resolve(t.output||"./apps",e);if(t.dryRun){d.logger.info("Dry run mode - no files will be created"),d.logger.section("Configuration",[`Name: ${e}`,`Description: ${o}`,`Output: ${n}`,`Template: ${t.fastmcp?"FastMCP":"Standard"}`,`CI/CD: ${t.cicd}`,`Deployment: ${t.deployment}`]);return}if(await p.default.pathExists(n)){let{overwrite:r}=await E.default.prompt([{type:"confirm",name:"overwrite",message:`Directory ${n} already exists. Overwrite?`,default:!1}]);if(!r){d.logger.warn("Cancelled");return}await p.default.remove(n)}d.logger.startSpinner("Creating MCP structure...");try{await p.default.ensureDir(n);let r=`[project]
2
+ "use strict";var B=Object.create;var _=Object.defineProperty;var z=Object.getOwnPropertyDescriptor;var V=Object.getOwnPropertyNames;var H=Object.getPrototypeOf,J=Object.prototype.hasOwnProperty;var Q=(e,t,o,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of V(t))!J.call(e,r)&&r!==o&&_(e,r,{get:()=>t[r],enumerable:!(n=z(t,r))||n.enumerable});return e};var l=(e,t,o)=>(o=e!=null?B(H(e)):{},Q(t||!e||!e.__esModule?_(o,"default",{value:e,enumerable:!0}):o,e));var W=require("commander"),K=require("@neural-tools/core");var m=l(require("path")),p=l(require("fs-extra")),d=require("@neural-tools/core"),S=l(require("inquirer"));async function G(e,t){d.logger.header(`Generating MCP: ${e}`),t.deployment!=="none"&&await(0,d.requireFeature)("cloud-deployment","Cloud Deployment");let o=t.description;o||(o=(await S.default.prompt([{type:"input",name:"description",message:"Description of your MCP:",default:`${e} MCP server`}])).description);let n=m.default.resolve(t.output||"./apps",e);if(t.dryRun){d.logger.info("Dry run mode - no files will be created"),d.logger.section("Configuration",[`Name: ${e}`,`Description: ${o}`,`Output: ${n}`,`Template: ${t.fastmcp?"FastMCP":"Standard"}`,`CI/CD: ${t.cicd}`,`Deployment: ${t.deployment}`]);return}if(await p.default.pathExists(n)){let{overwrite:r}=await S.default.prompt([{type:"confirm",name:"overwrite",message:`Directory ${n} already exists. Overwrite?`,default:!1}]);if(!r){d.logger.warn("Cancelled");return}await p.default.remove(n)}d.logger.startSpinner("Creating MCP structure...");try{await p.default.ensureDir(n);let r=`[project]
3
3
  name = "mcp-${e}"
4
4
  version = "0.1.0"
5
5
  description = "${o}"
@@ -24,7 +24,7 @@ line-length = 100
24
24
 
25
25
  [tool.ruff]
26
26
  line-length = 100
27
- `;await p.default.writeFile(m.default.join(n,"pyproject.toml"),r,"utf-8");let a=`"""
27
+ `;await p.default.writeFile(m.default.join(n,"pyproject.toml"),r,"utf-8");let i=`"""
28
28
  ${e} MCP Server
29
29
 
30
30
  ${o}
@@ -83,7 +83,7 @@ def brainstorm_topic(topic: str) -> str:
83
83
 
84
84
  if __name__ == "__main__":
85
85
  mcp.run()
86
- `;await p.default.writeFile(m.default.join(n,"server.py"),a,"utf-8");let c=`# ${e} MCP Server
86
+ `;await p.default.writeFile(m.default.join(n,"server.py"),i,"utf-8");let s=`# ${e} MCP Server
87
87
 
88
88
  ${o}
89
89
 
@@ -190,7 +190,7 @@ ruff check .
190
190
  ## License
191
191
 
192
192
  MIT
193
- `;await p.default.writeFile(m.default.join(n,"README.md"),c,"utf-8"),await p.default.writeFile(m.default.join(n,"Dockerfile"),`FROM python:3.11-slim
193
+ `;await p.default.writeFile(m.default.join(n,"README.md"),s,"utf-8"),await p.default.writeFile(m.default.join(n,"Dockerfile"),`FROM python:3.11-slim
194
194
 
195
195
  WORKDIR /app
196
196
 
@@ -320,11 +320,11 @@ jobs:
320
320
  run: |
321
321
  gcloud builds submit --tag gcr.io/\${{ secrets.GCP_PROJECT_ID }}/mcp-${e}:latest
322
322
  `:""}
323
- `;await p.default.writeFile(m.default.join(n,".github","workflows","deploy.yml"),C,"utf-8")}d.logger.succeedSpinner("MCP created successfully!"),d.logger.section("Next steps",[`1. cd ${n}`,"2. docker-compose up # Start with Docker","","Or for local development:","2. uv pip install -e .","3. python server.py","","Or use MCP Inspector:","2. uv pip install -e .","3. fastmcp dev server.py","","Add to Claude Code settings to use this MCP"]),d.logger.success(`\u2728 MCP "${e}" ready to use!`)}catch(r){throw d.logger.failSpinner("Failed to create MCP"),r}}var $=u(require("path")),G=u(require("os")),b=u(require("fs-extra")),g=require("@neural-tools/core"),S=u(require("inquirer"));async function _(e,t){g.logger.header(`Generating Claude Command: /${e}`);let o=t.description;o||(o=(await S.default.prompt([{type:"input",name:"description",message:"Description of your command:",default:`Execute ${e}`}])).description);let n;t.global?n=$.default.join(G.default.homedir(),".claude","commands"):n=$.default.resolve(t.output||"./claude/commands");let r=$.default.join(n,`${e}.md`);if(t.dryRun){g.logger.info("Dry run mode - no files will be created"),g.logger.section("Configuration",[`Name: /${e}`,`Description: ${o}`,`Output: ${r}`,`Arguments: ${t.args?.join(", ")||"none"}`,`Allowed Tools: ${t.tools?.join(", ")||"all"}`,`Global: ${t.global?"Yes":"No"}`]);return}if(await b.default.pathExists(r)){let{overwrite:a}=await S.default.prompt([{type:"confirm",name:"overwrite",message:`Command /${e} already exists. Overwrite?`,default:!1}]);if(!a){g.logger.warn("Cancelled");return}}g.logger.startSpinner("Creating Claude command...");try{await b.default.ensureDir(n);let a=["---"];t.args&&t.args.length>0&&a.push(`argument-hint: ${t.args.join(" ")}`),a.push(`description: ${o}`),t.tools&&t.tools.length>0&&(a.push("allowed-tools:"),t.tools.forEach(C=>{a.push(` - ${C}`)})),a.push("---"),a.push("");let c=t.args||[],v=c.map((C,D)=>`$${D+1}`).join(" "),h=c.length>0?`
323
+ `;await p.default.writeFile(m.default.join(n,".github","workflows","deploy.yml"),C,"utf-8")}d.logger.succeedSpinner("MCP created successfully!"),d.logger.section("Next steps",[`1. cd ${n}`,"2. docker-compose up # Start with Docker","","Or for local development:","2. uv pip install -e .","3. python server.py","","Or use MCP Inspector:","2. uv pip install -e .","3. fastmcp dev server.py","","Add to Claude Code settings to use this MCP"]),d.logger.success(`\u2728 MCP "${e}" ready to use!`)}catch(r){throw d.logger.failSpinner("Failed to create MCP"),r}}var $=l(require("path")),O=l(require("os")),b=l(require("fs-extra")),g=require("@neural-tools/core"),R=l(require("inquirer"));async function T(e,t){g.logger.header(`Generating Claude Command: /${e}`);let o=t.description;o||(o=(await R.default.prompt([{type:"input",name:"description",message:"Description of your command:",default:`Execute ${e}`}])).description);let n;t.global?n=$.default.join(O.default.homedir(),".claude","commands"):n=$.default.resolve(t.output||"./claude/commands");let r=$.default.join(n,`${e}.md`);if(t.dryRun){g.logger.info("Dry run mode - no files will be created"),g.logger.section("Configuration",[`Name: /${e}`,`Description: ${o}`,`Output: ${r}`,`Arguments: ${t.args?.join(", ")||"none"}`,`Allowed Tools: ${t.tools?.join(", ")||"all"}`,`Global: ${t.global?"Yes":"No"}`]);return}if(await b.default.pathExists(r)){let{overwrite:i}=await R.default.prompt([{type:"confirm",name:"overwrite",message:`Command /${e} already exists. Overwrite?`,default:!1}]);if(!i){g.logger.warn("Cancelled");return}}g.logger.startSpinner("Creating Claude command...");try{await b.default.ensureDir(n);let i=["---"];t.args&&t.args.length>0&&i.push(`argument-hint: ${t.args.join(" ")}`),i.push(`description: ${o}`),t.tools&&t.tools.length>0&&(i.push("allowed-tools:"),t.tools.forEach(C=>{i.push(` - ${C}`)})),i.push("---"),i.push("");let s=t.args||[],v=s.map((C,D)=>`$${D+1}`).join(" "),h=s.length>0?`
324
324
 
325
325
  Arguments:
326
- ${c.map((C,D)=>`- $${D+1}: ${C}`).join(`
327
- `)}`:"",M=`${a.join(`
326
+ ${s.map((C,D)=>`- $${D+1}: ${C}`).join(`
327
+ `)}`:"",M=`${i.join(`
328
328
  `)}# ${e} Command
329
329
 
330
330
  Execute the ${e} operation${h?":"+h:"."}
@@ -332,7 +332,7 @@ Execute the ${e} operation${h?":"+h:"."}
332
332
  ${v?`Using arguments: ${v}`:""}
333
333
 
334
334
  Please proceed with the ${e} operation.
335
- `;await b.default.writeFile(r,M,"utf-8"),g.logger.succeedSpinner("Claude command created successfully!"),g.logger.section("Next steps",[t.global?`Command /${e} is now available globally in Claude Code`:`Add the command to your project by copying ${r}`,"","Usage:",c.length>0?` /${e} ${c.join(" ")}`:` /${e}`]),g.logger.success(`\u2728 Command "/${e}" ready to use!`)}catch(a){throw g.logger.failSpinner("Failed to create command"),a}}var P=u(require("path")),I=u(require("os")),k=u(require("fs-extra")),f=require("@neural-tools/core"),R=u(require("inquirer"));async function F(e,t){f.logger.header(`Generating Claude Agent: ${e}`);let o=t.description;o||(o=(await R.default.prompt([{type:"input",name:"description",message:"Description of your agent:",default:`${e} specialized agent`}])).description);let n;t.global?n=P.default.join(I.default.homedir(),".claude","agents"):n=P.default.resolve(t.output||"./claude/agents");let r=P.default.join(n,`${e}.md`),a=t.model||"sonnet";if(t.dryRun){f.logger.info("Dry run mode - no files will be created"),f.logger.section("Configuration",[`Name: ${e}`,`Description: ${o}`,`Output: ${r}`,`Model: ${a}`,`Tools: ${t.tools?.join(", ")||"all"}`,`Global: ${t.global?"Yes":"No"}`]);return}if(await k.default.pathExists(r)){let{overwrite:c}=await R.default.prompt([{type:"confirm",name:"overwrite",message:`Agent ${e} already exists. Overwrite?`,default:!1}]);if(!c){f.logger.warn("Cancelled");return}}f.logger.startSpinner("Creating Claude agent...");try{await k.default.ensureDir(n);let c=["---"];c.push(`model: claude-${a}-4-5`),t.tools&&t.tools.length>0&&(c.push("tools:"),t.tools.forEach(h=>{c.push(` - ${h}`)})),c.push("---"),c.push("");let v=`${c.join(`
335
+ `;await b.default.writeFile(r,M,"utf-8"),g.logger.succeedSpinner("Claude command created successfully!"),g.logger.section("Next steps",[t.global?`Command /${e} is now available globally in Claude Code`:`Add the command to your project by copying ${r}`,"","Usage:",s.length>0?` /${e} ${s.join(" ")}`:` /${e}`]),g.logger.success(`\u2728 Command "/${e}" ready to use!`)}catch(i){throw g.logger.failSpinner("Failed to create command"),i}}var P=l(require("path")),I=l(require("os")),k=l(require("fs-extra")),f=require("@neural-tools/core"),E=l(require("inquirer"));async function F(e,t){f.logger.header(`Generating Claude Agent: ${e}`);let o=t.description;o||(o=(await E.default.prompt([{type:"input",name:"description",message:"Description of your agent:",default:`${e} specialized agent`}])).description);let n;t.global?n=P.default.join(I.default.homedir(),".claude","agents"):n=P.default.resolve(t.output||"./claude/agents");let r=P.default.join(n,`${e}.md`),i=t.model||"sonnet";if(t.dryRun){f.logger.info("Dry run mode - no files will be created"),f.logger.section("Configuration",[`Name: ${e}`,`Description: ${o}`,`Output: ${r}`,`Model: ${i}`,`Tools: ${t.tools?.join(", ")||"all"}`,`Global: ${t.global?"Yes":"No"}`]);return}if(await k.default.pathExists(r)){let{overwrite:s}=await E.default.prompt([{type:"confirm",name:"overwrite",message:`Agent ${e} already exists. Overwrite?`,default:!1}]);if(!s){f.logger.warn("Cancelled");return}}f.logger.startSpinner("Creating Claude agent...");try{await k.default.ensureDir(n);let s=["---"];s.push(`model: claude-${i}-4-5`),t.tools&&t.tools.length>0&&(s.push("tools:"),t.tools.forEach(h=>{s.push(` - ${h}`)})),s.push("---"),s.push("");let v=`${s.join(`
336
336
  `)}# ${e} Agent
337
337
 
338
338
  ${o}
@@ -361,4 +361,4 @@ Provide clear, structured responses that:
361
361
  - [Output requirement 3]
362
362
 
363
363
  Focus on ${e} and deliver actionable results.
364
- `;await k.default.writeFile(r,v,"utf-8"),f.logger.succeedSpinner("Claude agent created successfully!"),f.logger.section("Next steps",[t.global?`Agent ${e} is now available globally in Claude Code`:`Add the agent to your project by copying ${r}`,"","Customize the agent by editing:",` ${r}`,"","Use the agent via the Task tool in Claude Code"]),f.logger.success(`\u2728 Agent "${e}" ready to use!`)}catch(c){throw f.logger.failSpinner("Failed to create agent"),c}}var s=require("@neural-tools/core"),j=require("execa"),x=u(require("path")),L=u(require("fs-extra"));async function N(e,t){s.logger.header(`Deploying MCP: ${e}`),await(0,s.requireFeature)("cloud-deployment","Cloud Deployment");let o=t.platform||"aws",n=t.env||"dev";s.logger.info(`Platform: ${o}`),s.logger.info(`Environment: ${n}`);let r=x.default.resolve("./apps",e);if(!await L.default.pathExists(r))throw new Error(`MCP "${e}" not found at ${r}`);s.logger.startSpinner("Building MCP...");try{await(0,j.execa)("npm",["run","build"],{cwd:r,stdio:"pipe"}),s.logger.succeedSpinner("MCP built successfully"),o==="aws"?await X(e,r,t):o==="gcp"&&await Z(e,r,t),s.logger.success(`\u2728 MCP "${e}" deployed successfully!`)}catch(a){throw s.logger.failSpinner("Deployment failed"),a}}async function X(e,t,o){s.logger.startSpinner("Deploying to AWS Lambda..."),s.logger.updateSpinner("Packaging Lambda function..."),await new Promise(n=>setTimeout(n,1e3)),s.logger.updateSpinner("Uploading to S3..."),await new Promise(n=>setTimeout(n,1e3)),s.logger.updateSpinner("Creating/updating Lambda function..."),await new Promise(n=>setTimeout(n,1e3)),s.logger.succeedSpinner("Deployed to AWS Lambda"),s.logger.section("Deployment Info",[`Function: ${e}-${o.env}`,`Region: ${o.region||"us-east-1"}`,`Environment: ${o.env}`,"","Configure in Claude Code:",JSON.stringify({mcpServers:{[e]:{command:"aws",args:["lambda","invoke","--function-name",`${e}-${o.env}`,"--payload","stdin","--output","stdout"]}}},null,2)])}async function Z(e,t,o){s.logger.startSpinner("Deploying to Google Cloud Functions..."),s.logger.updateSpinner("Packaging function..."),await new Promise(n=>setTimeout(n,1e3)),s.logger.updateSpinner("Uploading to Cloud Storage..."),await new Promise(n=>setTimeout(n,1e3)),s.logger.updateSpinner("Deploying Cloud Function..."),await new Promise(n=>setTimeout(n,1e3)),s.logger.succeedSpinner("Deployed to Google Cloud Functions"),s.logger.section("Deployment Info",[`Function: ${e}-${o.env}`,`Region: ${o.region||"us-central1"}`,`Environment: ${o.env}`])}var i=require("@neural-tools/core"),Y=u(require("inquirer"));async function U(e){i.logger.header("AI Toolkit License Management");let t=e.key;if(t||(t=(await Y.default.prompt([{type:"input",name:"licenseKey",message:"Enter your license key:",validate:n=>!n||n.trim().length===0?"License key is required":!0}])).licenseKey),!t){i.logger.error("License key is required");return}i.logger.startSpinner("Validating license...");try{let o=t.split("-");if(o.length<2)throw new Error("Invalid license key format");let n=o[0],r=o[1];if(!Object.values(i.LicenseTier).includes(n))throw new Error("Invalid license tier");await i.licenseManager.saveLicense({tier:n,email:r,key:t,features:[]}),i.logger.succeedSpinner("License activated successfully!");let a=await i.licenseManager.loadLicense();i.logger.section("License Details",[`Tier: ${a.tier.toUpperCase()}`,`Email: ${a.email||"N/A"}`,"Status: Active"]);let c=ee(n);i.logger.section("Available Features",c),n===i.LicenseTier.FREE&&(i.logger.newline(),i.logger.info("Upgrade to Pro for advanced features:"),i.logger.info("https://ai-toolkit.dev/pricing")),i.logger.success("\u2728 Ready to build!")}catch(o){i.logger.failSpinner("License validation failed"),i.logger.error(o.message||"Invalid license key"),i.logger.newline(),i.logger.info("Get a license at: https://ai-toolkit.dev/pricing"),i.logger.info("Or continue with free tier features")}}function ee(e){let t=["\u2713 MCP generation","\u2713 Claude commands","\u2713 Basic templates","\u2713 Local development"],o=[...t,"\u2713 Vector database integration","\u2713 Semantic caching","\u2713 Fine-tuning workflows","\u2713 Cloud deployment (AWS/GCP)","\u2713 Premium templates","\u2713 GitHub automation"],n=[...o,"\u2713 White-label support","\u2713 Custom integrations","\u2713 Priority support","\u2713 SLA guarantee","\u2713 Team collaboration features"];switch(e){case i.LicenseTier.FREE:return t;case i.LicenseTier.PRO:return o;case i.LicenseTier.ENTERPRISE:return n;default:return t}}var l=require("@neural-tools/core");async function q(){l.logger.header("AI Toolkit Status");try{let e=await l.licenseManager.loadLicense();l.logger.section("License Information",[`Tier: ${e.tier.toUpperCase()}`,`Email: ${e.email||"N/A"}`,`Status: ${e.expiresAt?te(e.expiresAt):"Active"}`]);let t=[{name:"MCP Generation",key:"mcp-generation"},{name:"Claude Commands",key:"claude-commands"},{name:"Vector Database",key:"vector-db"},{name:"Semantic Cache",key:"semantic-cache"},{name:"Fine-tuning",key:"fine-tuning"},{name:"Cloud Deployment",key:"cloud-deployment"},{name:"GitHub Automation",key:"github-automation"}],o=await Promise.all(t.map(async n=>`${await l.licenseManager.checkFeature(n.key)?"\u2713":"\u2717"} ${n.name}`));l.logger.section("Feature Availability",o),e.tier===l.LicenseTier.FREE&&(l.logger.newline(),l.logger.info("Unlock more features with Pro or Enterprise:"),l.logger.info("https://ai-toolkit.dev/pricing")),l.logger.newline(),l.logger.section("Quick Start",["Generate an MCP server:"," ai-toolkit generate mcp github","","Generate a Claude command:"," ai-toolkit generate command search-kb","","View all commands:"," ai-toolkit --help"])}catch{l.logger.error("Failed to load license information"),l.logger.newline(),l.logger.info('Run "ai-toolkit login" to activate your license'),l.logger.info("Or continue with free tier features")}}function te(e){let t=new Date(e),o=new Date;if(t<o)return"Expired";let n=Math.ceil((t.getTime()-o.getTime())/(1e3*60*60*24));return n<=30?`Active (expires in ${n} days)`:"Active"}var y=new W.Command;y.name("neural-tools").description("Neural Tools - Build MCPs, Claude commands, and AI workflows").version("0.1.0");var A=y.command("generate").alias("g").description("Generate new components (MCP, command, agent, etc.)");A.command("mcp").description("Generate a new MCP server").argument("<name>","Name of the MCP server").option("-d, --description <desc>","Description of the MCP").option("-o, --output <dir>","Output directory","./apps").option("--fastmcp","Use FastMCP template",!0).option("--cicd <provider>","CI/CD provider (github, harness, none)","github").option("--deployment <platform>","Deployment platform (aws, gcp, none)","aws").option("--dry-run","Preview without creating files",!1).action(T);A.command("command").description("Generate a new Claude command").argument("<name>","Name of the command (without /)").option("-d, --description <desc>","Description of the command").option("-o, --output <dir>","Output directory","./claude/commands").option("--args <arguments...>","Command arguments").option("--tools <tools...>","Allowed tools").option("--global","Install globally to ~/.claude/commands",!1).option("--dry-run","Preview without creating files",!1).action(_);A.command("agent").description("Generate a new Claude agent").argument("<name>","Name of the agent").option("-d, --description <desc>","Description of the agent").option("-o, --output <dir>","Output directory","./claude/agents").option("--model <model>","Model to use (sonnet, opus, haiku)","sonnet").option("--tools <tools...>","Available tools").option("--global","Install globally to ~/.claude/agents",!1).option("--dry-run","Preview without creating files",!1).action(F);y.command("deploy").description("Deploy an MCP server").argument("<name>","Name of the MCP to deploy").option("-p, --platform <platform>","Deployment platform (aws, gcp)","aws").option("--region <region>","AWS/GCP region").option("--env <env>","Environment (dev, staging, prod)","dev").action(N);y.command("login").description("Authenticate and manage your license").option("--key <key>","License key").action(U);y.command("status").description("Show license status and available features").action(q);y.exitOverride();try{y.parse(process.argv)}catch(e){e.code!=="commander.help"&&e.code!=="commander.version"&&(B.logger.error(e.message||"An unexpected error occurred"),process.exit(1))}
364
+ `;await k.default.writeFile(r,v,"utf-8"),f.logger.succeedSpinner("Claude agent created successfully!"),f.logger.section("Next steps",[t.global?`Agent ${e} is now available globally in Claude Code`:`Add the agent to your project by copying ${r}`,"","Customize the agent by editing:",` ${r}`,"","Use the agent via the Task tool in Claude Code"]),f.logger.success(`\u2728 Agent "${e}" ready to use!`)}catch(s){throw f.logger.failSpinner("Failed to create agent"),s}}var a=require("@neural-tools/core"),j=require("execa"),x=l(require("path")),L=l(require("fs-extra"));async function N(e,t){a.logger.header(`Deploying MCP: ${e}`),await(0,a.requireFeature)("cloud-deployment","Cloud Deployment");let o=t.platform||"aws",n=t.env||"dev";a.logger.info(`Platform: ${o}`),a.logger.info(`Environment: ${n}`);let r=x.default.resolve("./apps",e);if(!await L.default.pathExists(r))throw new Error(`MCP "${e}" not found at ${r}`);a.logger.startSpinner("Building MCP...");try{await(0,j.execa)("npm",["run","build"],{cwd:r,stdio:"pipe"}),a.logger.succeedSpinner("MCP built successfully"),o==="aws"?await X(e,r,t):o==="gcp"&&await Z(e,r,t),a.logger.success(`\u2728 MCP "${e}" deployed successfully!`)}catch(i){throw a.logger.failSpinner("Deployment failed"),i}}async function X(e,t,o){a.logger.startSpinner("Deploying to AWS Lambda..."),a.logger.updateSpinner("Packaging Lambda function..."),await new Promise(n=>setTimeout(n,1e3)),a.logger.updateSpinner("Uploading to S3..."),await new Promise(n=>setTimeout(n,1e3)),a.logger.updateSpinner("Creating/updating Lambda function..."),await new Promise(n=>setTimeout(n,1e3)),a.logger.succeedSpinner("Deployed to AWS Lambda"),a.logger.section("Deployment Info",[`Function: ${e}-${o.env}`,`Region: ${o.region||"us-east-1"}`,`Environment: ${o.env}`,"","Configure in Claude Code:",JSON.stringify({mcpServers:{[e]:{command:"aws",args:["lambda","invoke","--function-name",`${e}-${o.env}`,"--payload","stdin","--output","stdout"]}}},null,2)])}async function Z(e,t,o){a.logger.startSpinner("Deploying to Google Cloud Functions..."),a.logger.updateSpinner("Packaging function..."),await new Promise(n=>setTimeout(n,1e3)),a.logger.updateSpinner("Uploading to Cloud Storage..."),await new Promise(n=>setTimeout(n,1e3)),a.logger.updateSpinner("Deploying Cloud Function..."),await new Promise(n=>setTimeout(n,1e3)),a.logger.succeedSpinner("Deployed to Google Cloud Functions"),a.logger.section("Deployment Info",[`Function: ${e}-${o.env}`,`Region: ${o.region||"us-central1"}`,`Environment: ${o.env}`])}var c=require("@neural-tools/core"),Y=l(require("inquirer"));async function q(e){c.logger.header("AI Toolkit License Management");let t=e.key;if(t||(t=(await Y.default.prompt([{type:"input",name:"licenseKey",message:"Enter your license key:",validate:n=>!n||n.trim().length===0?"License key is required":!0}])).licenseKey),!t){c.logger.error("License key is required");return}c.logger.startSpinner("Validating license...");try{let o=t.split("-");if(o.length<2)throw new Error("Invalid license key format");let n=o[0],r=o[1];if(!Object.values(c.LicenseTier).includes(n))throw new Error("Invalid license tier");await c.licenseManager.saveLicense({tier:n,email:r,key:t,features:[]}),c.logger.succeedSpinner("License activated successfully!");let i=await c.licenseManager.loadLicense();c.logger.section("License Details",[`Tier: ${i.tier.toUpperCase()}`,`Email: ${i.email||"N/A"}`,"Status: Active"]);let s=ee();c.logger.section("Available Features",s),c.logger.success("\u2728 Ready to build!")}catch(o){c.logger.failSpinner("License validation failed"),c.logger.error(o.message||"Invalid license key"),c.logger.newline(),c.logger.info("All features are available for free - no license required!")}}function ee(){return["\u2713 MCP generation","\u2713 Claude commands","\u2713 Claude agents","\u2713 Vector database integration","\u2713 Semantic caching","\u2713 Fine-tuning workflows","\u2713 Cloud deployment (AWS/GCP)","\u2713 GitHub automation","\u2713 All templates"]}var u=require("@neural-tools/core");async function U(){u.logger.header("AI Toolkit Status");try{let e=await u.licenseManager.loadLicense();u.logger.section("License Information",[`Tier: ${e.tier.toUpperCase()}`,`Email: ${e.email||"N/A"}`,`Status: ${e.expiresAt?te(e.expiresAt):"Active"}`]);let t=[{name:"MCP Generation",key:"mcp-generation"},{name:"Claude Commands",key:"claude-commands"},{name:"Vector Database",key:"vector-db"},{name:"Semantic Cache",key:"semantic-cache"},{name:"Fine-tuning",key:"fine-tuning"},{name:"Cloud Deployment",key:"cloud-deployment"},{name:"GitHub Automation",key:"github-automation"}],o=await Promise.all(t.map(async n=>`${await u.licenseManager.checkFeature(n.key)?"\u2713":"\u2717"} ${n.name}`));u.logger.section("Feature Availability",o),u.logger.newline(),u.logger.section("Quick Start",["Generate an MCP server:"," ai-toolkit generate mcp github","","Generate a Claude command:"," ai-toolkit generate command search-kb","","View all commands:"," ai-toolkit --help"])}catch{u.logger.error("Failed to load license information"),u.logger.newline(),u.logger.info("All features are available - no license required!"),u.logger.info('Run "ai-toolkit --help" to get started')}}function te(e){let t=new Date(e),o=new Date;if(t<o)return"Expired";let n=Math.ceil((t.getTime()-o.getTime())/(1e3*60*60*24));return n<=30?`Active (expires in ${n} days)`:"Active"}var y=new W.Command;y.name("neural-tools").description("Neural Tools - Build MCPs, Claude commands, and AI workflows").version("0.1.0");var A=y.command("generate").alias("g").description("Generate new components (MCP, command, agent, etc.)");A.command("mcp").description("Generate a new MCP server").argument("<name>","Name of the MCP server").option("-d, --description <desc>","Description of the MCP").option("-o, --output <dir>","Output directory","./apps").option("--fastmcp","Use FastMCP template",!0).option("--cicd <provider>","CI/CD provider (github, harness, none)","github").option("--deployment <platform>","Deployment platform (aws, gcp, none)","aws").option("--dry-run","Preview without creating files",!1).action(G);A.command("command").description("Generate a new Claude command").argument("<name>","Name of the command (without /)").option("-d, --description <desc>","Description of the command").option("-o, --output <dir>","Output directory","./claude/commands").option("--args <arguments...>","Command arguments").option("--tools <tools...>","Allowed tools").option("--global","Install globally to ~/.claude/commands",!1).option("--dry-run","Preview without creating files",!1).action(T);A.command("agent").description("Generate a new Claude agent").argument("<name>","Name of the agent").option("-d, --description <desc>","Description of the agent").option("-o, --output <dir>","Output directory","./claude/agents").option("--model <model>","Model to use (sonnet, opus, haiku)","sonnet").option("--tools <tools...>","Available tools").option("--global","Install globally to ~/.claude/agents",!1).option("--dry-run","Preview without creating files",!1).action(F);y.command("deploy").description("Deploy an MCP server").argument("<name>","Name of the MCP to deploy").option("-p, --platform <platform>","Deployment platform (aws, gcp)","aws").option("--region <region>","AWS/GCP region").option("--env <env>","Environment (dev, staging, prod)","dev").action(N);y.command("login").description("Authenticate and manage your license").option("--key <key>","License key").action(q);y.command("status").description("Show license status and available features").action(U);y.exitOverride();try{y.parse(process.argv)}catch(e){e.code!=="commander.help"&&e.code!=="commander.version"&&(K.logger.error(e.message||"An unexpected error occurred"),process.exit(1))}
package/dist/cli.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{Command as Z}from"commander";import{logger as ee}from"@neural-tools/core";import p from"path";import u from"fs-extra";import{logger as d,requireFeature as N}from"@neural-tools/core";import A from"inquirer";async function M(e,t){d.header(`Generating MCP: ${e}`),t.deployment!=="none"&&await N("cloud-deployment","Cloud Deployment");let o=t.description;o||(o=(await A.prompt([{type:"input",name:"description",message:"Description of your MCP:",default:`${e} MCP server`}])).description);let n=p.resolve(t.output||"./apps",e);if(t.dryRun){d.info("Dry run mode - no files will be created"),d.section("Configuration",[`Name: ${e}`,`Description: ${o}`,`Output: ${n}`,`Template: ${t.fastmcp?"FastMCP":"Standard"}`,`CI/CD: ${t.cicd}`,`Deployment: ${t.deployment}`]);return}if(await u.pathExists(n)){let{overwrite:r}=await A.prompt([{type:"confirm",name:"overwrite",message:`Directory ${n} already exists. Overwrite?`,default:!1}]);if(!r){d.warn("Cancelled");return}await u.remove(n)}d.startSpinner("Creating MCP structure...");try{await u.ensureDir(n);let r=`[project]
2
+ import{Command as X}from"commander";import{logger as Z}from"@neural-tools/core";import u from"path";import c from"fs-extra";import{logger as p,requireFeature as L}from"@neural-tools/core";import E from"inquirer";async function A(e,t){p.header(`Generating MCP: ${e}`),t.deployment!=="none"&&await L("cloud-deployment","Cloud Deployment");let o=t.description;o||(o=(await E.prompt([{type:"input",name:"description",message:"Description of your MCP:",default:`${e} MCP server`}])).description);let n=u.resolve(t.output||"./apps",e);if(t.dryRun){p.info("Dry run mode - no files will be created"),p.section("Configuration",[`Name: ${e}`,`Description: ${o}`,`Output: ${n}`,`Template: ${t.fastmcp?"FastMCP":"Standard"}`,`CI/CD: ${t.cicd}`,`Deployment: ${t.deployment}`]);return}if(await c.pathExists(n)){let{overwrite:r}=await E.prompt([{type:"confirm",name:"overwrite",message:`Directory ${n} already exists. Overwrite?`,default:!1}]);if(!r){p.warn("Cancelled");return}await c.remove(n)}p.startSpinner("Creating MCP structure...");try{await c.ensureDir(n);let r=`[project]
3
3
  name = "mcp-${e}"
4
4
  version = "0.1.0"
5
5
  description = "${o}"
@@ -24,7 +24,7 @@ line-length = 100
24
24
 
25
25
  [tool.ruff]
26
26
  line-length = 100
27
- `;await u.writeFile(p.join(n,"pyproject.toml"),r,"utf-8");let i=`"""
27
+ `;await c.writeFile(u.join(n,"pyproject.toml"),r,"utf-8");let i=`"""
28
28
  ${e} MCP Server
29
29
 
30
30
  ${o}
@@ -83,7 +83,7 @@ def brainstorm_topic(topic: str) -> str:
83
83
 
84
84
  if __name__ == "__main__":
85
85
  mcp.run()
86
- `;await u.writeFile(p.join(n,"server.py"),i,"utf-8");let a=`# ${e} MCP Server
86
+ `;await c.writeFile(u.join(n,"server.py"),i,"utf-8");let a=`# ${e} MCP Server
87
87
 
88
88
  ${o}
89
89
 
@@ -190,7 +190,7 @@ ruff check .
190
190
  ## License
191
191
 
192
192
  MIT
193
- `;await u.writeFile(p.join(n,"README.md"),a,"utf-8"),await u.writeFile(p.join(n,"Dockerfile"),`FROM python:3.11-slim
193
+ `;await c.writeFile(u.join(n,"README.md"),a,"utf-8"),await c.writeFile(u.join(n,"Dockerfile"),`FROM python:3.11-slim
194
194
 
195
195
  WORKDIR /app
196
196
 
@@ -219,7 +219,7 @@ services:
219
219
  - .:/app
220
220
  environment:
221
221
  - PYTHONUNBUFFERED=1
222
- `;if(await u.writeFile(p.join(n,"docker-compose.yml"),y,"utf-8"),await u.writeFile(p.join(n,".dockerignore"),`__pycache__
222
+ `;if(await c.writeFile(u.join(n,"docker-compose.yml"),y,"utf-8"),await c.writeFile(u.join(n,".dockerignore"),`__pycache__
223
223
  *.pyc
224
224
  *.pyo
225
225
  *.pyd
@@ -236,7 +236,7 @@ venv
236
236
  .git
237
237
  .github
238
238
  README.md
239
- `,"utf-8"),t.cicd==="github"){await u.ensureDir(p.join(n,".github","workflows"));let h=`name: Deploy MCP
239
+ `,"utf-8"),t.cicd==="github"){await c.ensureDir(u.join(n,".github","workflows"));let h=`name: Deploy MCP
240
240
 
241
241
  on:
242
242
  push:
@@ -320,10 +320,10 @@ jobs:
320
320
  run: |
321
321
  gcloud builds submit --tag gcr.io/\${{ secrets.GCP_PROJECT_ID }}/mcp-${e}:latest
322
322
  `:""}
323
- `;await u.writeFile(p.join(n,".github","workflows","deploy.yml"),h,"utf-8")}d.succeedSpinner("MCP created successfully!"),d.section("Next steps",[`1. cd ${n}`,"2. docker-compose up # Start with Docker","","Or for local development:","2. uv pip install -e .","3. python server.py","","Or use MCP Inspector:","2. uv pip install -e .","3. fastmcp dev server.py","","Add to Claude Code settings to use this MCP"]),d.success(`\u2728 MCP "${e}" ready to use!`)}catch(r){throw d.failSpinner("Failed to create MCP"),r}}import P from"path";import Y from"os";import k from"fs-extra";import{logger as m}from"@neural-tools/core";import O from"inquirer";async function T(e,t){m.header(`Generating Claude Command: /${e}`);let o=t.description;o||(o=(await O.prompt([{type:"input",name:"description",message:"Description of your command:",default:`Execute ${e}`}])).description);let n;t.global?n=P.join(Y.homedir(),".claude","commands"):n=P.resolve(t.output||"./claude/commands");let r=P.join(n,`${e}.md`);if(t.dryRun){m.info("Dry run mode - no files will be created"),m.section("Configuration",[`Name: /${e}`,`Description: ${o}`,`Output: ${r}`,`Arguments: ${t.args?.join(", ")||"none"}`,`Allowed Tools: ${t.tools?.join(", ")||"all"}`,`Global: ${t.global?"Yes":"No"}`]);return}if(await k.pathExists(r)){let{overwrite:i}=await O.prompt([{type:"confirm",name:"overwrite",message:`Command /${e} already exists. Overwrite?`,default:!1}]);if(!i){m.warn("Cancelled");return}}m.startSpinner("Creating Claude command...");try{await k.ensureDir(n);let i=["---"];t.args&&t.args.length>0&&i.push(`argument-hint: ${t.args.join(" ")}`),i.push(`description: ${o}`),t.tools&&t.tools.length>0&&(i.push("allowed-tools:"),t.tools.forEach(h=>{i.push(` - ${h}`)})),i.push("---"),i.push("");let a=t.args||[],v=a.map((h,b)=>`$${b+1}`).join(" "),y=a.length>0?`
323
+ `;await c.writeFile(u.join(n,".github","workflows","deploy.yml"),h,"utf-8")}p.succeedSpinner("MCP created successfully!"),p.section("Next steps",[`1. cd ${n}`,"2. docker-compose up # Start with Docker","","Or for local development:","2. uv pip install -e .","3. python server.py","","Or use MCP Inspector:","2. uv pip install -e .","3. fastmcp dev server.py","","Add to Claude Code settings to use this MCP"]),p.success(`\u2728 MCP "${e}" ready to use!`)}catch(r){throw p.failSpinner("Failed to create MCP"),r}}import b from"path";import N from"os";import P from"fs-extra";import{logger as d}from"@neural-tools/core";import M from"inquirer";async function _(e,t){d.header(`Generating Claude Command: /${e}`);let o=t.description;o||(o=(await M.prompt([{type:"input",name:"description",message:"Description of your command:",default:`Execute ${e}`}])).description);let n;t.global?n=b.join(N.homedir(),".claude","commands"):n=b.resolve(t.output||"./claude/commands");let r=b.join(n,`${e}.md`);if(t.dryRun){d.info("Dry run mode - no files will be created"),d.section("Configuration",[`Name: /${e}`,`Description: ${o}`,`Output: ${r}`,`Arguments: ${t.args?.join(", ")||"none"}`,`Allowed Tools: ${t.tools?.join(", ")||"all"}`,`Global: ${t.global?"Yes":"No"}`]);return}if(await P.pathExists(r)){let{overwrite:i}=await M.prompt([{type:"confirm",name:"overwrite",message:`Command /${e} already exists. Overwrite?`,default:!1}]);if(!i){d.warn("Cancelled");return}}d.startSpinner("Creating Claude command...");try{await P.ensureDir(n);let i=["---"];t.args&&t.args.length>0&&i.push(`argument-hint: ${t.args.join(" ")}`),i.push(`description: ${o}`),t.tools&&t.tools.length>0&&(i.push("allowed-tools:"),t.tools.forEach(h=>{i.push(` - ${h}`)})),i.push("---"),i.push("");let a=t.args||[],v=a.map((h,$)=>`$${$+1}`).join(" "),y=a.length>0?`
324
324
 
325
325
  Arguments:
326
- ${a.map((h,b)=>`- $${b+1}: ${h}`).join(`
326
+ ${a.map((h,$)=>`- $${$+1}: ${h}`).join(`
327
327
  `)}`:"",R=`${i.join(`
328
328
  `)}# ${e} Command
329
329
 
@@ -332,7 +332,7 @@ Execute the ${e} operation${y?":"+y:"."}
332
332
  ${v?`Using arguments: ${v}`:""}
333
333
 
334
334
  Please proceed with the ${e} operation.
335
- `;await k.writeFile(r,R,"utf-8"),m.succeedSpinner("Claude command created successfully!"),m.section("Next steps",[t.global?`Command /${e} is now available globally in Claude Code`:`Add the command to your project by copying ${r}`,"","Usage:",a.length>0?` /${e} ${a.join(" ")}`:` /${e}`]),m.success(`\u2728 Command "/${e}" ready to use!`)}catch(i){throw m.failSpinner("Failed to create command"),i}}import D from"path";import U from"os";import E from"fs-extra";import{logger as g}from"@neural-tools/core";import G from"inquirer";async function _(e,t){g.header(`Generating Claude Agent: ${e}`);let o=t.description;o||(o=(await G.prompt([{type:"input",name:"description",message:"Description of your agent:",default:`${e} specialized agent`}])).description);let n;t.global?n=D.join(U.homedir(),".claude","agents"):n=D.resolve(t.output||"./claude/agents");let r=D.join(n,`${e}.md`),i=t.model||"sonnet";if(t.dryRun){g.info("Dry run mode - no files will be created"),g.section("Configuration",[`Name: ${e}`,`Description: ${o}`,`Output: ${r}`,`Model: ${i}`,`Tools: ${t.tools?.join(", ")||"all"}`,`Global: ${t.global?"Yes":"No"}`]);return}if(await E.pathExists(r)){let{overwrite:a}=await G.prompt([{type:"confirm",name:"overwrite",message:`Agent ${e} already exists. Overwrite?`,default:!1}]);if(!a){g.warn("Cancelled");return}}g.startSpinner("Creating Claude agent...");try{await E.ensureDir(n);let a=["---"];a.push(`model: claude-${i}-4-5`),t.tools&&t.tools.length>0&&(a.push("tools:"),t.tools.forEach(y=>{a.push(` - ${y}`)})),a.push("---"),a.push("");let v=`${a.join(`
335
+ `;await P.writeFile(r,R,"utf-8"),d.succeedSpinner("Claude command created successfully!"),d.section("Next steps",[t.global?`Command /${e} is now available globally in Claude Code`:`Add the command to your project by copying ${r}`,"","Usage:",a.length>0?` /${e} ${a.join(" ")}`:` /${e}`]),d.success(`\u2728 Command "/${e}" ready to use!`)}catch(i){throw d.failSpinner("Failed to create command"),i}}import k from"path";import Y from"os";import D from"fs-extra";import{logger as m}from"@neural-tools/core";import G from"inquirer";async function O(e,t){m.header(`Generating Claude Agent: ${e}`);let o=t.description;o||(o=(await G.prompt([{type:"input",name:"description",message:"Description of your agent:",default:`${e} specialized agent`}])).description);let n;t.global?n=k.join(Y.homedir(),".claude","agents"):n=k.resolve(t.output||"./claude/agents");let r=k.join(n,`${e}.md`),i=t.model||"sonnet";if(t.dryRun){m.info("Dry run mode - no files will be created"),m.section("Configuration",[`Name: ${e}`,`Description: ${o}`,`Output: ${r}`,`Model: ${i}`,`Tools: ${t.tools?.join(", ")||"all"}`,`Global: ${t.global?"Yes":"No"}`]);return}if(await D.pathExists(r)){let{overwrite:a}=await G.prompt([{type:"confirm",name:"overwrite",message:`Agent ${e} already exists. Overwrite?`,default:!1}]);if(!a){m.warn("Cancelled");return}}m.startSpinner("Creating Claude agent...");try{await D.ensureDir(n);let a=["---"];a.push(`model: claude-${i}-4-5`),t.tools&&t.tools.length>0&&(a.push("tools:"),t.tools.forEach(y=>{a.push(` - ${y}`)})),a.push("---"),a.push("");let v=`${a.join(`
336
336
  `)}# ${e} Agent
337
337
 
338
338
  ${o}
@@ -361,4 +361,4 @@ Provide clear, structured responses that:
361
361
  - [Output requirement 3]
362
362
 
363
363
  Focus on ${e} and deliver actionable results.
364
- `;await E.writeFile(r,v,"utf-8"),g.succeedSpinner("Claude agent created successfully!"),g.section("Next steps",[t.global?`Agent ${e} is now available globally in Claude Code`:`Add the agent to your project by copying ${r}`,"","Customize the agent by editing:",` ${r}`,"","Use the agent via the Task tool in Claude Code"]),g.success(`\u2728 Agent "${e}" ready to use!`)}catch(a){throw g.failSpinner("Failed to create agent"),a}}import{logger as s,requireFeature as q}from"@neural-tools/core";import{execa as W}from"execa";import B from"path";import K from"fs-extra";async function I(e,t){s.header(`Deploying MCP: ${e}`),await q("cloud-deployment","Cloud Deployment");let o=t.platform||"aws",n=t.env||"dev";s.info(`Platform: ${o}`),s.info(`Environment: ${n}`);let r=B.resolve("./apps",e);if(!await K.pathExists(r))throw new Error(`MCP "${e}" not found at ${r}`);s.startSpinner("Building MCP...");try{await W("npm",["run","build"],{cwd:r,stdio:"pipe"}),s.succeedSpinner("MCP built successfully"),o==="aws"?await z(e,r,t):o==="gcp"&&await V(e,r,t),s.success(`\u2728 MCP "${e}" deployed successfully!`)}catch(i){throw s.failSpinner("Deployment failed"),i}}async function z(e,t,o){s.startSpinner("Deploying to AWS Lambda..."),s.updateSpinner("Packaging Lambda function..."),await new Promise(n=>setTimeout(n,1e3)),s.updateSpinner("Uploading to S3..."),await new Promise(n=>setTimeout(n,1e3)),s.updateSpinner("Creating/updating Lambda function..."),await new Promise(n=>setTimeout(n,1e3)),s.succeedSpinner("Deployed to AWS Lambda"),s.section("Deployment Info",[`Function: ${e}-${o.env}`,`Region: ${o.region||"us-east-1"}`,`Environment: ${o.env}`,"","Configure in Claude Code:",JSON.stringify({mcpServers:{[e]:{command:"aws",args:["lambda","invoke","--function-name",`${e}-${o.env}`,"--payload","stdin","--output","stdout"]}}},null,2)])}async function V(e,t,o){s.startSpinner("Deploying to Google Cloud Functions..."),s.updateSpinner("Packaging function..."),await new Promise(n=>setTimeout(n,1e3)),s.updateSpinner("Uploading to Cloud Storage..."),await new Promise(n=>setTimeout(n,1e3)),s.updateSpinner("Deploying Cloud Function..."),await new Promise(n=>setTimeout(n,1e3)),s.succeedSpinner("Deployed to Google Cloud Functions"),s.section("Deployment Info",[`Function: ${e}-${o.env}`,`Region: ${o.region||"us-central1"}`,`Environment: ${o.env}`])}import{logger as c,licenseManager as F,LicenseTier as $}from"@neural-tools/core";import H from"inquirer";async function j(e){c.header("AI Toolkit License Management");let t=e.key;if(t||(t=(await H.prompt([{type:"input",name:"licenseKey",message:"Enter your license key:",validate:n=>!n||n.trim().length===0?"License key is required":!0}])).licenseKey),!t){c.error("License key is required");return}c.startSpinner("Validating license...");try{let o=t.split("-");if(o.length<2)throw new Error("Invalid license key format");let n=o[0],r=o[1];if(!Object.values($).includes(n))throw new Error("Invalid license tier");await F.saveLicense({tier:n,email:r,key:t,features:[]}),c.succeedSpinner("License activated successfully!");let i=await F.loadLicense();c.section("License Details",[`Tier: ${i.tier.toUpperCase()}`,`Email: ${i.email||"N/A"}`,"Status: Active"]);let a=J(n);c.section("Available Features",a),n===$.FREE&&(c.newline(),c.info("Upgrade to Pro for advanced features:"),c.info("https://ai-toolkit.dev/pricing")),c.success("\u2728 Ready to build!")}catch(o){c.failSpinner("License validation failed"),c.error(o.message||"Invalid license key"),c.newline(),c.info("Get a license at: https://ai-toolkit.dev/pricing"),c.info("Or continue with free tier features")}}function J(e){let t=["\u2713 MCP generation","\u2713 Claude commands","\u2713 Basic templates","\u2713 Local development"],o=[...t,"\u2713 Vector database integration","\u2713 Semantic caching","\u2713 Fine-tuning workflows","\u2713 Cloud deployment (AWS/GCP)","\u2713 Premium templates","\u2713 GitHub automation"],n=[...o,"\u2713 White-label support","\u2713 Custom integrations","\u2713 Priority support","\u2713 SLA guarantee","\u2713 Team collaboration features"];switch(e){case $.FREE:return t;case $.PRO:return o;case $.ENTERPRISE:return n;default:return t}}import{logger as l,licenseManager as x,LicenseTier as Q}from"@neural-tools/core";async function L(){l.header("AI Toolkit Status");try{let e=await x.loadLicense();l.section("License Information",[`Tier: ${e.tier.toUpperCase()}`,`Email: ${e.email||"N/A"}`,`Status: ${e.expiresAt?X(e.expiresAt):"Active"}`]);let t=[{name:"MCP Generation",key:"mcp-generation"},{name:"Claude Commands",key:"claude-commands"},{name:"Vector Database",key:"vector-db"},{name:"Semantic Cache",key:"semantic-cache"},{name:"Fine-tuning",key:"fine-tuning"},{name:"Cloud Deployment",key:"cloud-deployment"},{name:"GitHub Automation",key:"github-automation"}],o=await Promise.all(t.map(async n=>`${await x.checkFeature(n.key)?"\u2713":"\u2717"} ${n.name}`));l.section("Feature Availability",o),e.tier===Q.FREE&&(l.newline(),l.info("Unlock more features with Pro or Enterprise:"),l.info("https://ai-toolkit.dev/pricing")),l.newline(),l.section("Quick Start",["Generate an MCP server:"," ai-toolkit generate mcp github","","Generate a Claude command:"," ai-toolkit generate command search-kb","","View all commands:"," ai-toolkit --help"])}catch{l.error("Failed to load license information"),l.newline(),l.info('Run "ai-toolkit login" to activate your license'),l.info("Or continue with free tier features")}}function X(e){let t=new Date(e),o=new Date;if(t<o)return"Expired";let n=Math.ceil((t.getTime()-o.getTime())/(1e3*60*60*24));return n<=30?`Active (expires in ${n} days)`:"Active"}var f=new Z;f.name("neural-tools").description("Neural Tools - Build MCPs, Claude commands, and AI workflows").version("0.1.0");var S=f.command("generate").alias("g").description("Generate new components (MCP, command, agent, etc.)");S.command("mcp").description("Generate a new MCP server").argument("<name>","Name of the MCP server").option("-d, --description <desc>","Description of the MCP").option("-o, --output <dir>","Output directory","./apps").option("--fastmcp","Use FastMCP template",!0).option("--cicd <provider>","CI/CD provider (github, harness, none)","github").option("--deployment <platform>","Deployment platform (aws, gcp, none)","aws").option("--dry-run","Preview without creating files",!1).action(M);S.command("command").description("Generate a new Claude command").argument("<name>","Name of the command (without /)").option("-d, --description <desc>","Description of the command").option("-o, --output <dir>","Output directory","./claude/commands").option("--args <arguments...>","Command arguments").option("--tools <tools...>","Allowed tools").option("--global","Install globally to ~/.claude/commands",!1).option("--dry-run","Preview without creating files",!1).action(T);S.command("agent").description("Generate a new Claude agent").argument("<name>","Name of the agent").option("-d, --description <desc>","Description of the agent").option("-o, --output <dir>","Output directory","./claude/agents").option("--model <model>","Model to use (sonnet, opus, haiku)","sonnet").option("--tools <tools...>","Available tools").option("--global","Install globally to ~/.claude/agents",!1).option("--dry-run","Preview without creating files",!1).action(_);f.command("deploy").description("Deploy an MCP server").argument("<name>","Name of the MCP to deploy").option("-p, --platform <platform>","Deployment platform (aws, gcp)","aws").option("--region <region>","AWS/GCP region").option("--env <env>","Environment (dev, staging, prod)","dev").action(I);f.command("login").description("Authenticate and manage your license").option("--key <key>","License key").action(j);f.command("status").description("Show license status and available features").action(L);f.exitOverride();try{f.parse(process.argv)}catch(e){e.code!=="commander.help"&&e.code!=="commander.version"&&(ee.error(e.message||"An unexpected error occurred"),process.exit(1))}
364
+ `;await D.writeFile(r,v,"utf-8"),m.succeedSpinner("Claude agent created successfully!"),m.section("Next steps",[t.global?`Agent ${e} is now available globally in Claude Code`:`Add the agent to your project by copying ${r}`,"","Customize the agent by editing:",` ${r}`,"","Use the agent via the Task tool in Claude Code"]),m.success(`\u2728 Agent "${e}" ready to use!`)}catch(a){throw m.failSpinner("Failed to create agent"),a}}import{logger as s,requireFeature as q}from"@neural-tools/core";import{execa as U}from"execa";import W from"path";import K from"fs-extra";async function T(e,t){s.header(`Deploying MCP: ${e}`),await q("cloud-deployment","Cloud Deployment");let o=t.platform||"aws",n=t.env||"dev";s.info(`Platform: ${o}`),s.info(`Environment: ${n}`);let r=W.resolve("./apps",e);if(!await K.pathExists(r))throw new Error(`MCP "${e}" not found at ${r}`);s.startSpinner("Building MCP...");try{await U("npm",["run","build"],{cwd:r,stdio:"pipe"}),s.succeedSpinner("MCP built successfully"),o==="aws"?await B(e,r,t):o==="gcp"&&await z(e,r,t),s.success(`\u2728 MCP "${e}" deployed successfully!`)}catch(i){throw s.failSpinner("Deployment failed"),i}}async function B(e,t,o){s.startSpinner("Deploying to AWS Lambda..."),s.updateSpinner("Packaging Lambda function..."),await new Promise(n=>setTimeout(n,1e3)),s.updateSpinner("Uploading to S3..."),await new Promise(n=>setTimeout(n,1e3)),s.updateSpinner("Creating/updating Lambda function..."),await new Promise(n=>setTimeout(n,1e3)),s.succeedSpinner("Deployed to AWS Lambda"),s.section("Deployment Info",[`Function: ${e}-${o.env}`,`Region: ${o.region||"us-east-1"}`,`Environment: ${o.env}`,"","Configure in Claude Code:",JSON.stringify({mcpServers:{[e]:{command:"aws",args:["lambda","invoke","--function-name",`${e}-${o.env}`,"--payload","stdin","--output","stdout"]}}},null,2)])}async function z(e,t,o){s.startSpinner("Deploying to Google Cloud Functions..."),s.updateSpinner("Packaging function..."),await new Promise(n=>setTimeout(n,1e3)),s.updateSpinner("Uploading to Cloud Storage..."),await new Promise(n=>setTimeout(n,1e3)),s.updateSpinner("Deploying Cloud Function..."),await new Promise(n=>setTimeout(n,1e3)),s.succeedSpinner("Deployed to Google Cloud Functions"),s.section("Deployment Info",[`Function: ${e}-${o.env}`,`Region: ${o.region||"us-central1"}`,`Environment: ${o.env}`])}import{logger as l,licenseManager as I,LicenseTier as V}from"@neural-tools/core";import H from"inquirer";async function F(e){l.header("AI Toolkit License Management");let t=e.key;if(t||(t=(await H.prompt([{type:"input",name:"licenseKey",message:"Enter your license key:",validate:n=>!n||n.trim().length===0?"License key is required":!0}])).licenseKey),!t){l.error("License key is required");return}l.startSpinner("Validating license...");try{let o=t.split("-");if(o.length<2)throw new Error("Invalid license key format");let n=o[0],r=o[1];if(!Object.values(V).includes(n))throw new Error("Invalid license tier");await I.saveLicense({tier:n,email:r,key:t,features:[]}),l.succeedSpinner("License activated successfully!");let i=await I.loadLicense();l.section("License Details",[`Tier: ${i.tier.toUpperCase()}`,`Email: ${i.email||"N/A"}`,"Status: Active"]);let a=J();l.section("Available Features",a),l.success("\u2728 Ready to build!")}catch(o){l.failSpinner("License validation failed"),l.error(o.message||"Invalid license key"),l.newline(),l.info("All features are available for free - no license required!")}}function J(){return["\u2713 MCP generation","\u2713 Claude commands","\u2713 Claude agents","\u2713 Vector database integration","\u2713 Semantic caching","\u2713 Fine-tuning workflows","\u2713 Cloud deployment (AWS/GCP)","\u2713 GitHub automation","\u2713 All templates"]}import{logger as g,licenseManager as j}from"@neural-tools/core";async function x(){g.header("AI Toolkit Status");try{let e=await j.loadLicense();g.section("License Information",[`Tier: ${e.tier.toUpperCase()}`,`Email: ${e.email||"N/A"}`,`Status: ${e.expiresAt?Q(e.expiresAt):"Active"}`]);let t=[{name:"MCP Generation",key:"mcp-generation"},{name:"Claude Commands",key:"claude-commands"},{name:"Vector Database",key:"vector-db"},{name:"Semantic Cache",key:"semantic-cache"},{name:"Fine-tuning",key:"fine-tuning"},{name:"Cloud Deployment",key:"cloud-deployment"},{name:"GitHub Automation",key:"github-automation"}],o=await Promise.all(t.map(async n=>`${await j.checkFeature(n.key)?"\u2713":"\u2717"} ${n.name}`));g.section("Feature Availability",o),g.newline(),g.section("Quick Start",["Generate an MCP server:"," ai-toolkit generate mcp github","","Generate a Claude command:"," ai-toolkit generate command search-kb","","View all commands:"," ai-toolkit --help"])}catch{g.error("Failed to load license information"),g.newline(),g.info("All features are available - no license required!"),g.info('Run "ai-toolkit --help" to get started')}}function Q(e){let t=new Date(e),o=new Date;if(t<o)return"Expired";let n=Math.ceil((t.getTime()-o.getTime())/(1e3*60*60*24));return n<=30?`Active (expires in ${n} days)`:"Active"}var f=new X;f.name("neural-tools").description("Neural Tools - Build MCPs, Claude commands, and AI workflows").version("0.1.0");var S=f.command("generate").alias("g").description("Generate new components (MCP, command, agent, etc.)");S.command("mcp").description("Generate a new MCP server").argument("<name>","Name of the MCP server").option("-d, --description <desc>","Description of the MCP").option("-o, --output <dir>","Output directory","./apps").option("--fastmcp","Use FastMCP template",!0).option("--cicd <provider>","CI/CD provider (github, harness, none)","github").option("--deployment <platform>","Deployment platform (aws, gcp, none)","aws").option("--dry-run","Preview without creating files",!1).action(A);S.command("command").description("Generate a new Claude command").argument("<name>","Name of the command (without /)").option("-d, --description <desc>","Description of the command").option("-o, --output <dir>","Output directory","./claude/commands").option("--args <arguments...>","Command arguments").option("--tools <tools...>","Allowed tools").option("--global","Install globally to ~/.claude/commands",!1).option("--dry-run","Preview without creating files",!1).action(_);S.command("agent").description("Generate a new Claude agent").argument("<name>","Name of the agent").option("-d, --description <desc>","Description of the agent").option("-o, --output <dir>","Output directory","./claude/agents").option("--model <model>","Model to use (sonnet, opus, haiku)","sonnet").option("--tools <tools...>","Available tools").option("--global","Install globally to ~/.claude/agents",!1).option("--dry-run","Preview without creating files",!1).action(O);f.command("deploy").description("Deploy an MCP server").argument("<name>","Name of the MCP to deploy").option("-p, --platform <platform>","Deployment platform (aws, gcp)","aws").option("--region <region>","AWS/GCP region").option("--env <env>","Environment (dev, staging, prod)","dev").action(T);f.command("login").description("Authenticate and manage your license").option("--key <key>","License key").action(F);f.command("status").description("Show license status and available features").action(x);f.exitOverride();try{f.parse(process.argv)}catch(e){e.code!=="commander.help"&&e.code!=="commander.version"&&(Z.error(e.message||"An unexpected error occurred"),process.exit(1))}
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- "use strict";var U=Object.create;var v=Object.defineProperty;var W=Object.getOwnPropertyDescriptor;var B=Object.getOwnPropertyNames;var K=Object.getPrototypeOf,z=Object.prototype.hasOwnProperty;var V=(e,t)=>{for(var r in t)v(e,r,{get:t[r],enumerable:!0})},T=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of B(t))!z.call(e,i)&&i!==r&&v(e,i,{get:()=>t[i],enumerable:!(n=W(t,i))||n.enumerable});return e};var u=(e,t,r)=>(r=e!=null?U(K(e)):{},T(t||!e||!e.__esModule?v(r,"default",{value:e,enumerable:!0}):r,e)),H=e=>T(v({},"__esModule",{value:!0}),e);var ee={};V(ee,{deployMCP:()=>L,generateAgent:()=>I,generateCommand:()=>O,generateMCP:()=>_,loginCommand:()=>N,statusCommand:()=>q});module.exports=H(ee);var m=u(require("path")),p=u(require("fs-extra")),d=require("@neural-tools/core"),S=u(require("inquirer"));async function _(e,t){d.logger.header(`Generating MCP: ${e}`),t.deployment!=="none"&&await(0,d.requireFeature)("cloud-deployment","Cloud Deployment");let r=t.description;r||(r=(await S.default.prompt([{type:"input",name:"description",message:"Description of your MCP:",default:`${e} MCP server`}])).description);let n=m.default.resolve(t.output||"./apps",e);if(t.dryRun){d.logger.info("Dry run mode - no files will be created"),d.logger.section("Configuration",[`Name: ${e}`,`Description: ${r}`,`Output: ${n}`,`Template: ${t.fastmcp?"FastMCP":"Standard"}`,`CI/CD: ${t.cicd}`,`Deployment: ${t.deployment}`]);return}if(await p.default.pathExists(n)){let{overwrite:i}=await S.default.prompt([{type:"confirm",name:"overwrite",message:`Directory ${n} already exists. Overwrite?`,default:!1}]);if(!i){d.logger.warn("Cancelled");return}await p.default.remove(n)}d.logger.startSpinner("Creating MCP structure...");try{await p.default.ensureDir(n);let i=`[project]
1
+ "use strict";var U=Object.create;var v=Object.defineProperty;var W=Object.getOwnPropertyDescriptor;var K=Object.getOwnPropertyNames;var B=Object.getPrototypeOf,z=Object.prototype.hasOwnProperty;var V=(e,t)=>{for(var r in t)v(e,r,{get:t[r],enumerable:!0})},_=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of K(t))!z.call(e,i)&&i!==r&&v(e,i,{get:()=>t[i],enumerable:!(n=W(t,i))||n.enumerable});return e};var l=(e,t,r)=>(r=e!=null?U(B(e)):{},_(t||!e||!e.__esModule?v(r,"default",{value:e,enumerable:!0}):r,e)),H=e=>_(v({},"__esModule",{value:!0}),e);var ee={};V(ee,{deployMCP:()=>L,generateAgent:()=>I,generateCommand:()=>G,generateMCP:()=>M,loginCommand:()=>q,statusCommand:()=>N});module.exports=H(ee);var m=l(require("path")),p=l(require("fs-extra")),d=require("@neural-tools/core"),D=l(require("inquirer"));async function M(e,t){d.logger.header(`Generating MCP: ${e}`),t.deployment!=="none"&&await(0,d.requireFeature)("cloud-deployment","Cloud Deployment");let r=t.description;r||(r=(await D.default.prompt([{type:"input",name:"description",message:"Description of your MCP:",default:`${e} MCP server`}])).description);let n=m.default.resolve(t.output||"./apps",e);if(t.dryRun){d.logger.info("Dry run mode - no files will be created"),d.logger.section("Configuration",[`Name: ${e}`,`Description: ${r}`,`Output: ${n}`,`Template: ${t.fastmcp?"FastMCP":"Standard"}`,`CI/CD: ${t.cicd}`,`Deployment: ${t.deployment}`]);return}if(await p.default.pathExists(n)){let{overwrite:i}=await D.default.prompt([{type:"confirm",name:"overwrite",message:`Directory ${n} already exists. Overwrite?`,default:!1}]);if(!i){d.logger.warn("Cancelled");return}await p.default.remove(n)}d.logger.startSpinner("Creating MCP structure...");try{await p.default.ensureDir(n);let i=`[project]
2
2
  name = "mcp-${e}"
3
3
  version = "0.1.0"
4
4
  description = "${r}"
@@ -23,7 +23,7 @@ line-length = 100
23
23
 
24
24
  [tool.ruff]
25
25
  line-length = 100
26
- `;await p.default.writeFile(m.default.join(n,"pyproject.toml"),i,"utf-8");let s=`"""
26
+ `;await p.default.writeFile(m.default.join(n,"pyproject.toml"),i,"utf-8");let o=`"""
27
27
  ${e} MCP Server
28
28
 
29
29
  ${r}
@@ -82,7 +82,7 @@ def brainstorm_topic(topic: str) -> str:
82
82
 
83
83
  if __name__ == "__main__":
84
84
  mcp.run()
85
- `;await p.default.writeFile(m.default.join(n,"server.py"),s,"utf-8");let c=`# ${e} MCP Server
85
+ `;await p.default.writeFile(m.default.join(n,"server.py"),o,"utf-8");let a=`# ${e} MCP Server
86
86
 
87
87
  ${r}
88
88
 
@@ -189,7 +189,7 @@ ruff check .
189
189
  ## License
190
190
 
191
191
  MIT
192
- `;await p.default.writeFile(m.default.join(n,"README.md"),c,"utf-8"),await p.default.writeFile(m.default.join(n,"Dockerfile"),`FROM python:3.11-slim
192
+ `;await p.default.writeFile(m.default.join(n,"README.md"),a,"utf-8"),await p.default.writeFile(m.default.join(n,"Dockerfile"),`FROM python:3.11-slim
193
193
 
194
194
  WORKDIR /app
195
195
 
@@ -319,11 +319,11 @@ jobs:
319
319
  run: |
320
320
  gcloud builds submit --tag gcr.io/\${{ secrets.GCP_PROJECT_ID }}/mcp-${e}:latest
321
321
  `:""}
322
- `;await p.default.writeFile(m.default.join(n,".github","workflows","deploy.yml"),h,"utf-8")}d.logger.succeedSpinner("MCP created successfully!"),d.logger.section("Next steps",[`1. cd ${n}`,"2. docker-compose up # Start with Docker","","Or for local development:","2. uv pip install -e .","3. python server.py","","Or use MCP Inspector:","2. uv pip install -e .","3. fastmcp dev server.py","","Add to Claude Code settings to use this MCP"]),d.logger.success(`\u2728 MCP "${e}" ready to use!`)}catch(i){throw d.logger.failSpinner("Failed to create MCP"),i}}var $=u(require("path")),M=u(require("os")),b=u(require("fs-extra")),g=require("@neural-tools/core"),R=u(require("inquirer"));async function O(e,t){g.logger.header(`Generating Claude Command: /${e}`);let r=t.description;r||(r=(await R.default.prompt([{type:"input",name:"description",message:"Description of your command:",default:`Execute ${e}`}])).description);let n;t.global?n=$.default.join(M.default.homedir(),".claude","commands"):n=$.default.resolve(t.output||"./claude/commands");let i=$.default.join(n,`${e}.md`);if(t.dryRun){g.logger.info("Dry run mode - no files will be created"),g.logger.section("Configuration",[`Name: /${e}`,`Description: ${r}`,`Output: ${i}`,`Arguments: ${t.args?.join(", ")||"none"}`,`Allowed Tools: ${t.tools?.join(", ")||"all"}`,`Global: ${t.global?"Yes":"No"}`]);return}if(await b.default.pathExists(i)){let{overwrite:s}=await R.default.prompt([{type:"confirm",name:"overwrite",message:`Command /${e} already exists. Overwrite?`,default:!1}]);if(!s){g.logger.warn("Cancelled");return}}g.logger.startSpinner("Creating Claude command...");try{await b.default.ensureDir(n);let s=["---"];t.args&&t.args.length>0&&s.push(`argument-hint: ${t.args.join(" ")}`),s.push(`description: ${r}`),t.tools&&t.tools.length>0&&(s.push("allowed-tools:"),t.tools.forEach(h=>{s.push(` - ${h}`)})),s.push("---"),s.push("");let c=t.args||[],w=c.map((h,E)=>`$${E+1}`).join(" "),y=c.length>0?`
322
+ `;await p.default.writeFile(m.default.join(n,".github","workflows","deploy.yml"),h,"utf-8")}d.logger.succeedSpinner("MCP created successfully!"),d.logger.section("Next steps",[`1. cd ${n}`,"2. docker-compose up # Start with Docker","","Or for local development:","2. uv pip install -e .","3. python server.py","","Or use MCP Inspector:","2. uv pip install -e .","3. fastmcp dev server.py","","Add to Claude Code settings to use this MCP"]),d.logger.success(`\u2728 MCP "${e}" ready to use!`)}catch(i){throw d.logger.failSpinner("Failed to create MCP"),i}}var $=l(require("path")),O=l(require("os")),b=l(require("fs-extra")),g=require("@neural-tools/core"),R=l(require("inquirer"));async function G(e,t){g.logger.header(`Generating Claude Command: /${e}`);let r=t.description;r||(r=(await R.default.prompt([{type:"input",name:"description",message:"Description of your command:",default:`Execute ${e}`}])).description);let n;t.global?n=$.default.join(O.default.homedir(),".claude","commands"):n=$.default.resolve(t.output||"./claude/commands");let i=$.default.join(n,`${e}.md`);if(t.dryRun){g.logger.info("Dry run mode - no files will be created"),g.logger.section("Configuration",[`Name: /${e}`,`Description: ${r}`,`Output: ${i}`,`Arguments: ${t.args?.join(", ")||"none"}`,`Allowed Tools: ${t.tools?.join(", ")||"all"}`,`Global: ${t.global?"Yes":"No"}`]);return}if(await b.default.pathExists(i)){let{overwrite:o}=await R.default.prompt([{type:"confirm",name:"overwrite",message:`Command /${e} already exists. Overwrite?`,default:!1}]);if(!o){g.logger.warn("Cancelled");return}}g.logger.startSpinner("Creating Claude command...");try{await b.default.ensureDir(n);let o=["---"];t.args&&t.args.length>0&&o.push(`argument-hint: ${t.args.join(" ")}`),o.push(`description: ${r}`),t.tools&&t.tools.length>0&&(o.push("allowed-tools:"),t.tools.forEach(h=>{o.push(` - ${h}`)})),o.push("---"),o.push("");let a=t.args||[],w=a.map((h,S)=>`$${S+1}`).join(" "),y=a.length>0?`
323
323
 
324
324
  Arguments:
325
- ${c.map((h,E)=>`- $${E+1}: ${h}`).join(`
326
- `)}`:"",A=`${s.join(`
325
+ ${a.map((h,S)=>`- $${S+1}: ${h}`).join(`
326
+ `)}`:"",A=`${o.join(`
327
327
  `)}# ${e} Command
328
328
 
329
329
  Execute the ${e} operation${y?":"+y:"."}
@@ -331,7 +331,7 @@ Execute the ${e} operation${y?":"+y:"."}
331
331
  ${w?`Using arguments: ${w}`:""}
332
332
 
333
333
  Please proceed with the ${e} operation.
334
- `;await b.default.writeFile(i,A,"utf-8"),g.logger.succeedSpinner("Claude command created successfully!"),g.logger.section("Next steps",[t.global?`Command /${e} is now available globally in Claude Code`:`Add the command to your project by copying ${i}`,"","Usage:",c.length>0?` /${e} ${c.join(" ")}`:` /${e}`]),g.logger.success(`\u2728 Command "/${e}" ready to use!`)}catch(s){throw g.logger.failSpinner("Failed to create command"),s}}var k=u(require("path")),G=u(require("os")),P=u(require("fs-extra")),f=require("@neural-tools/core"),D=u(require("inquirer"));async function I(e,t){f.logger.header(`Generating Claude Agent: ${e}`);let r=t.description;r||(r=(await D.default.prompt([{type:"input",name:"description",message:"Description of your agent:",default:`${e} specialized agent`}])).description);let n;t.global?n=k.default.join(G.default.homedir(),".claude","agents"):n=k.default.resolve(t.output||"./claude/agents");let i=k.default.join(n,`${e}.md`),s=t.model||"sonnet";if(t.dryRun){f.logger.info("Dry run mode - no files will be created"),f.logger.section("Configuration",[`Name: ${e}`,`Description: ${r}`,`Output: ${i}`,`Model: ${s}`,`Tools: ${t.tools?.join(", ")||"all"}`,`Global: ${t.global?"Yes":"No"}`]);return}if(await P.default.pathExists(i)){let{overwrite:c}=await D.default.prompt([{type:"confirm",name:"overwrite",message:`Agent ${e} already exists. Overwrite?`,default:!1}]);if(!c){f.logger.warn("Cancelled");return}}f.logger.startSpinner("Creating Claude agent...");try{await P.default.ensureDir(n);let c=["---"];c.push(`model: claude-${s}-4-5`),t.tools&&t.tools.length>0&&(c.push("tools:"),t.tools.forEach(y=>{c.push(` - ${y}`)})),c.push("---"),c.push("");let w=`${c.join(`
334
+ `;await b.default.writeFile(i,A,"utf-8"),g.logger.succeedSpinner("Claude command created successfully!"),g.logger.section("Next steps",[t.global?`Command /${e} is now available globally in Claude Code`:`Add the command to your project by copying ${i}`,"","Usage:",a.length>0?` /${e} ${a.join(" ")}`:` /${e}`]),g.logger.success(`\u2728 Command "/${e}" ready to use!`)}catch(o){throw g.logger.failSpinner("Failed to create command"),o}}var k=l(require("path")),T=l(require("os")),P=l(require("fs-extra")),f=require("@neural-tools/core"),E=l(require("inquirer"));async function I(e,t){f.logger.header(`Generating Claude Agent: ${e}`);let r=t.description;r||(r=(await E.default.prompt([{type:"input",name:"description",message:"Description of your agent:",default:`${e} specialized agent`}])).description);let n;t.global?n=k.default.join(T.default.homedir(),".claude","agents"):n=k.default.resolve(t.output||"./claude/agents");let i=k.default.join(n,`${e}.md`),o=t.model||"sonnet";if(t.dryRun){f.logger.info("Dry run mode - no files will be created"),f.logger.section("Configuration",[`Name: ${e}`,`Description: ${r}`,`Output: ${i}`,`Model: ${o}`,`Tools: ${t.tools?.join(", ")||"all"}`,`Global: ${t.global?"Yes":"No"}`]);return}if(await P.default.pathExists(i)){let{overwrite:a}=await E.default.prompt([{type:"confirm",name:"overwrite",message:`Agent ${e} already exists. Overwrite?`,default:!1}]);if(!a){f.logger.warn("Cancelled");return}}f.logger.startSpinner("Creating Claude agent...");try{await P.default.ensureDir(n);let a=["---"];a.push(`model: claude-${o}-4-5`),t.tools&&t.tools.length>0&&(a.push("tools:"),t.tools.forEach(y=>{a.push(` - ${y}`)})),a.push("---"),a.push("");let w=`${a.join(`
335
335
  `)}# ${e} Agent
336
336
 
337
337
  ${r}
@@ -360,4 +360,4 @@ Provide clear, structured responses that:
360
360
  - [Output requirement 3]
361
361
 
362
362
  Focus on ${e} and deliver actionable results.
363
- `;await P.default.writeFile(i,w,"utf-8"),f.logger.succeedSpinner("Claude agent created successfully!"),f.logger.section("Next steps",[t.global?`Agent ${e} is now available globally in Claude Code`:`Add the agent to your project by copying ${i}`,"","Customize the agent by editing:",` ${i}`,"","Use the agent via the Task tool in Claude Code"]),f.logger.success(`\u2728 Agent "${e}" ready to use!`)}catch(c){throw f.logger.failSpinner("Failed to create agent"),c}}var a=require("@neural-tools/core"),F=require("execa"),j=u(require("path")),x=u(require("fs-extra"));async function L(e,t){a.logger.header(`Deploying MCP: ${e}`),await(0,a.requireFeature)("cloud-deployment","Cloud Deployment");let r=t.platform||"aws",n=t.env||"dev";a.logger.info(`Platform: ${r}`),a.logger.info(`Environment: ${n}`);let i=j.default.resolve("./apps",e);if(!await x.default.pathExists(i))throw new Error(`MCP "${e}" not found at ${i}`);a.logger.startSpinner("Building MCP...");try{await(0,F.execa)("npm",["run","build"],{cwd:i,stdio:"pipe"}),a.logger.succeedSpinner("MCP built successfully"),r==="aws"?await J(e,i,t):r==="gcp"&&await Q(e,i,t),a.logger.success(`\u2728 MCP "${e}" deployed successfully!`)}catch(s){throw a.logger.failSpinner("Deployment failed"),s}}async function J(e,t,r){a.logger.startSpinner("Deploying to AWS Lambda..."),a.logger.updateSpinner("Packaging Lambda function..."),await new Promise(n=>setTimeout(n,1e3)),a.logger.updateSpinner("Uploading to S3..."),await new Promise(n=>setTimeout(n,1e3)),a.logger.updateSpinner("Creating/updating Lambda function..."),await new Promise(n=>setTimeout(n,1e3)),a.logger.succeedSpinner("Deployed to AWS Lambda"),a.logger.section("Deployment Info",[`Function: ${e}-${r.env}`,`Region: ${r.region||"us-east-1"}`,`Environment: ${r.env}`,"","Configure in Claude Code:",JSON.stringify({mcpServers:{[e]:{command:"aws",args:["lambda","invoke","--function-name",`${e}-${r.env}`,"--payload","stdin","--output","stdout"]}}},null,2)])}async function Q(e,t,r){a.logger.startSpinner("Deploying to Google Cloud Functions..."),a.logger.updateSpinner("Packaging function..."),await new Promise(n=>setTimeout(n,1e3)),a.logger.updateSpinner("Uploading to Cloud Storage..."),await new Promise(n=>setTimeout(n,1e3)),a.logger.updateSpinner("Deploying Cloud Function..."),await new Promise(n=>setTimeout(n,1e3)),a.logger.succeedSpinner("Deployed to Google Cloud Functions"),a.logger.section("Deployment Info",[`Function: ${e}-${r.env}`,`Region: ${r.region||"us-central1"}`,`Environment: ${r.env}`])}var o=require("@neural-tools/core"),Y=u(require("inquirer"));async function N(e){o.logger.header("AI Toolkit License Management");let t=e.key;if(t||(t=(await Y.default.prompt([{type:"input",name:"licenseKey",message:"Enter your license key:",validate:n=>!n||n.trim().length===0?"License key is required":!0}])).licenseKey),!t){o.logger.error("License key is required");return}o.logger.startSpinner("Validating license...");try{let r=t.split("-");if(r.length<2)throw new Error("Invalid license key format");let n=r[0],i=r[1];if(!Object.values(o.LicenseTier).includes(n))throw new Error("Invalid license tier");await o.licenseManager.saveLicense({tier:n,email:i,key:t,features:[]}),o.logger.succeedSpinner("License activated successfully!");let s=await o.licenseManager.loadLicense();o.logger.section("License Details",[`Tier: ${s.tier.toUpperCase()}`,`Email: ${s.email||"N/A"}`,"Status: Active"]);let c=X(n);o.logger.section("Available Features",c),n===o.LicenseTier.FREE&&(o.logger.newline(),o.logger.info("Upgrade to Pro for advanced features:"),o.logger.info("https://ai-toolkit.dev/pricing")),o.logger.success("\u2728 Ready to build!")}catch(r){o.logger.failSpinner("License validation failed"),o.logger.error(r.message||"Invalid license key"),o.logger.newline(),o.logger.info("Get a license at: https://ai-toolkit.dev/pricing"),o.logger.info("Or continue with free tier features")}}function X(e){let t=["\u2713 MCP generation","\u2713 Claude commands","\u2713 Basic templates","\u2713 Local development"],r=[...t,"\u2713 Vector database integration","\u2713 Semantic caching","\u2713 Fine-tuning workflows","\u2713 Cloud deployment (AWS/GCP)","\u2713 Premium templates","\u2713 GitHub automation"],n=[...r,"\u2713 White-label support","\u2713 Custom integrations","\u2713 Priority support","\u2713 SLA guarantee","\u2713 Team collaboration features"];switch(e){case o.LicenseTier.FREE:return t;case o.LicenseTier.PRO:return r;case o.LicenseTier.ENTERPRISE:return n;default:return t}}var l=require("@neural-tools/core");async function q(){l.logger.header("AI Toolkit Status");try{let e=await l.licenseManager.loadLicense();l.logger.section("License Information",[`Tier: ${e.tier.toUpperCase()}`,`Email: ${e.email||"N/A"}`,`Status: ${e.expiresAt?Z(e.expiresAt):"Active"}`]);let t=[{name:"MCP Generation",key:"mcp-generation"},{name:"Claude Commands",key:"claude-commands"},{name:"Vector Database",key:"vector-db"},{name:"Semantic Cache",key:"semantic-cache"},{name:"Fine-tuning",key:"fine-tuning"},{name:"Cloud Deployment",key:"cloud-deployment"},{name:"GitHub Automation",key:"github-automation"}],r=await Promise.all(t.map(async n=>`${await l.licenseManager.checkFeature(n.key)?"\u2713":"\u2717"} ${n.name}`));l.logger.section("Feature Availability",r),e.tier===l.LicenseTier.FREE&&(l.logger.newline(),l.logger.info("Unlock more features with Pro or Enterprise:"),l.logger.info("https://ai-toolkit.dev/pricing")),l.logger.newline(),l.logger.section("Quick Start",["Generate an MCP server:"," ai-toolkit generate mcp github","","Generate a Claude command:"," ai-toolkit generate command search-kb","","View all commands:"," ai-toolkit --help"])}catch{l.logger.error("Failed to load license information"),l.logger.newline(),l.logger.info('Run "ai-toolkit login" to activate your license'),l.logger.info("Or continue with free tier features")}}function Z(e){let t=new Date(e),r=new Date;if(t<r)return"Expired";let n=Math.ceil((t.getTime()-r.getTime())/(1e3*60*60*24));return n<=30?`Active (expires in ${n} days)`:"Active"}0&&(module.exports={deployMCP,generateAgent,generateCommand,generateMCP,loginCommand,statusCommand});
363
+ `;await P.default.writeFile(i,w,"utf-8"),f.logger.succeedSpinner("Claude agent created successfully!"),f.logger.section("Next steps",[t.global?`Agent ${e} is now available globally in Claude Code`:`Add the agent to your project by copying ${i}`,"","Customize the agent by editing:",` ${i}`,"","Use the agent via the Task tool in Claude Code"]),f.logger.success(`\u2728 Agent "${e}" ready to use!`)}catch(a){throw f.logger.failSpinner("Failed to create agent"),a}}var s=require("@neural-tools/core"),j=require("execa"),F=l(require("path")),x=l(require("fs-extra"));async function L(e,t){s.logger.header(`Deploying MCP: ${e}`),await(0,s.requireFeature)("cloud-deployment","Cloud Deployment");let r=t.platform||"aws",n=t.env||"dev";s.logger.info(`Platform: ${r}`),s.logger.info(`Environment: ${n}`);let i=F.default.resolve("./apps",e);if(!await x.default.pathExists(i))throw new Error(`MCP "${e}" not found at ${i}`);s.logger.startSpinner("Building MCP...");try{await(0,j.execa)("npm",["run","build"],{cwd:i,stdio:"pipe"}),s.logger.succeedSpinner("MCP built successfully"),r==="aws"?await J(e,i,t):r==="gcp"&&await Q(e,i,t),s.logger.success(`\u2728 MCP "${e}" deployed successfully!`)}catch(o){throw s.logger.failSpinner("Deployment failed"),o}}async function J(e,t,r){s.logger.startSpinner("Deploying to AWS Lambda..."),s.logger.updateSpinner("Packaging Lambda function..."),await new Promise(n=>setTimeout(n,1e3)),s.logger.updateSpinner("Uploading to S3..."),await new Promise(n=>setTimeout(n,1e3)),s.logger.updateSpinner("Creating/updating Lambda function..."),await new Promise(n=>setTimeout(n,1e3)),s.logger.succeedSpinner("Deployed to AWS Lambda"),s.logger.section("Deployment Info",[`Function: ${e}-${r.env}`,`Region: ${r.region||"us-east-1"}`,`Environment: ${r.env}`,"","Configure in Claude Code:",JSON.stringify({mcpServers:{[e]:{command:"aws",args:["lambda","invoke","--function-name",`${e}-${r.env}`,"--payload","stdin","--output","stdout"]}}},null,2)])}async function Q(e,t,r){s.logger.startSpinner("Deploying to Google Cloud Functions..."),s.logger.updateSpinner("Packaging function..."),await new Promise(n=>setTimeout(n,1e3)),s.logger.updateSpinner("Uploading to Cloud Storage..."),await new Promise(n=>setTimeout(n,1e3)),s.logger.updateSpinner("Deploying Cloud Function..."),await new Promise(n=>setTimeout(n,1e3)),s.logger.succeedSpinner("Deployed to Google Cloud Functions"),s.logger.section("Deployment Info",[`Function: ${e}-${r.env}`,`Region: ${r.region||"us-central1"}`,`Environment: ${r.env}`])}var c=require("@neural-tools/core"),Y=l(require("inquirer"));async function q(e){c.logger.header("AI Toolkit License Management");let t=e.key;if(t||(t=(await Y.default.prompt([{type:"input",name:"licenseKey",message:"Enter your license key:",validate:n=>!n||n.trim().length===0?"License key is required":!0}])).licenseKey),!t){c.logger.error("License key is required");return}c.logger.startSpinner("Validating license...");try{let r=t.split("-");if(r.length<2)throw new Error("Invalid license key format");let n=r[0],i=r[1];if(!Object.values(c.LicenseTier).includes(n))throw new Error("Invalid license tier");await c.licenseManager.saveLicense({tier:n,email:i,key:t,features:[]}),c.logger.succeedSpinner("License activated successfully!");let o=await c.licenseManager.loadLicense();c.logger.section("License Details",[`Tier: ${o.tier.toUpperCase()}`,`Email: ${o.email||"N/A"}`,"Status: Active"]);let a=X();c.logger.section("Available Features",a),c.logger.success("\u2728 Ready to build!")}catch(r){c.logger.failSpinner("License validation failed"),c.logger.error(r.message||"Invalid license key"),c.logger.newline(),c.logger.info("All features are available for free - no license required!")}}function X(){return["\u2713 MCP generation","\u2713 Claude commands","\u2713 Claude agents","\u2713 Vector database integration","\u2713 Semantic caching","\u2713 Fine-tuning workflows","\u2713 Cloud deployment (AWS/GCP)","\u2713 GitHub automation","\u2713 All templates"]}var u=require("@neural-tools/core");async function N(){u.logger.header("AI Toolkit Status");try{let e=await u.licenseManager.loadLicense();u.logger.section("License Information",[`Tier: ${e.tier.toUpperCase()}`,`Email: ${e.email||"N/A"}`,`Status: ${e.expiresAt?Z(e.expiresAt):"Active"}`]);let t=[{name:"MCP Generation",key:"mcp-generation"},{name:"Claude Commands",key:"claude-commands"},{name:"Vector Database",key:"vector-db"},{name:"Semantic Cache",key:"semantic-cache"},{name:"Fine-tuning",key:"fine-tuning"},{name:"Cloud Deployment",key:"cloud-deployment"},{name:"GitHub Automation",key:"github-automation"}],r=await Promise.all(t.map(async n=>`${await u.licenseManager.checkFeature(n.key)?"\u2713":"\u2717"} ${n.name}`));u.logger.section("Feature Availability",r),u.logger.newline(),u.logger.section("Quick Start",["Generate an MCP server:"," ai-toolkit generate mcp github","","Generate a Claude command:"," ai-toolkit generate command search-kb","","View all commands:"," ai-toolkit --help"])}catch{u.logger.error("Failed to load license information"),u.logger.newline(),u.logger.info("All features are available - no license required!"),u.logger.info('Run "ai-toolkit --help" to get started')}}function Z(e){let t=new Date(e),r=new Date;if(t<r)return"Expired";let n=Math.ceil((t.getTime()-r.getTime())/(1e3*60*60*24));return n<=30?`Active (expires in ${n} days)`:"Active"}0&&(module.exports={deployMCP,generateAgent,generateCommand,generateMCP,loginCommand,statusCommand});
package/dist/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import p from"path";import u from"fs-extra";import{logger as d,requireFeature as M}from"@neural-tools/core";import R from"inquirer";async function O(e,t){d.header(`Generating MCP: ${e}`),t.deployment!=="none"&&await M("cloud-deployment","Cloud Deployment");let r=t.description;r||(r=(await R.prompt([{type:"input",name:"description",message:"Description of your MCP:",default:`${e} MCP server`}])).description);let n=p.resolve(t.output||"./apps",e);if(t.dryRun){d.info("Dry run mode - no files will be created"),d.section("Configuration",[`Name: ${e}`,`Description: ${r}`,`Output: ${n}`,`Template: ${t.fastmcp?"FastMCP":"Standard"}`,`CI/CD: ${t.cicd}`,`Deployment: ${t.deployment}`]);return}if(await u.pathExists(n)){let{overwrite:i}=await R.prompt([{type:"confirm",name:"overwrite",message:`Directory ${n} already exists. Overwrite?`,default:!1}]);if(!i){d.warn("Cancelled");return}await u.remove(n)}d.startSpinner("Creating MCP structure...");try{await u.ensureDir(n);let i=`[project]
1
+ import u from"path";import c from"fs-extra";import{logger as p,requireFeature as M}from"@neural-tools/core";import D from"inquirer";async function O(e,t){p.header(`Generating MCP: ${e}`),t.deployment!=="none"&&await M("cloud-deployment","Cloud Deployment");let r=t.description;r||(r=(await D.prompt([{type:"input",name:"description",message:"Description of your MCP:",default:`${e} MCP server`}])).description);let n=u.resolve(t.output||"./apps",e);if(t.dryRun){p.info("Dry run mode - no files will be created"),p.section("Configuration",[`Name: ${e}`,`Description: ${r}`,`Output: ${n}`,`Template: ${t.fastmcp?"FastMCP":"Standard"}`,`CI/CD: ${t.cicd}`,`Deployment: ${t.deployment}`]);return}if(await c.pathExists(n)){let{overwrite:i}=await D.prompt([{type:"confirm",name:"overwrite",message:`Directory ${n} already exists. Overwrite?`,default:!1}]);if(!i){p.warn("Cancelled");return}await c.remove(n)}p.startSpinner("Creating MCP structure...");try{await c.ensureDir(n);let i=`[project]
2
2
  name = "mcp-${e}"
3
3
  version = "0.1.0"
4
4
  description = "${r}"
@@ -23,7 +23,7 @@ line-length = 100
23
23
 
24
24
  [tool.ruff]
25
25
  line-length = 100
26
- `;await u.writeFile(p.join(n,"pyproject.toml"),i,"utf-8");let o=`"""
26
+ `;await c.writeFile(u.join(n,"pyproject.toml"),i,"utf-8");let o=`"""
27
27
  ${e} MCP Server
28
28
 
29
29
  ${r}
@@ -82,7 +82,7 @@ def brainstorm_topic(topic: str) -> str:
82
82
 
83
83
  if __name__ == "__main__":
84
84
  mcp.run()
85
- `;await u.writeFile(p.join(n,"server.py"),o,"utf-8");let s=`# ${e} MCP Server
85
+ `;await c.writeFile(u.join(n,"server.py"),o,"utf-8");let s=`# ${e} MCP Server
86
86
 
87
87
  ${r}
88
88
 
@@ -189,7 +189,7 @@ ruff check .
189
189
  ## License
190
190
 
191
191
  MIT
192
- `;await u.writeFile(p.join(n,"README.md"),s,"utf-8"),await u.writeFile(p.join(n,"Dockerfile"),`FROM python:3.11-slim
192
+ `;await c.writeFile(u.join(n,"README.md"),s,"utf-8"),await c.writeFile(u.join(n,"Dockerfile"),`FROM python:3.11-slim
193
193
 
194
194
  WORKDIR /app
195
195
 
@@ -218,7 +218,7 @@ services:
218
218
  - .:/app
219
219
  environment:
220
220
  - PYTHONUNBUFFERED=1
221
- `;if(await u.writeFile(p.join(n,"docker-compose.yml"),f,"utf-8"),await u.writeFile(p.join(n,".dockerignore"),`__pycache__
221
+ `;if(await c.writeFile(u.join(n,"docker-compose.yml"),f,"utf-8"),await c.writeFile(u.join(n,".dockerignore"),`__pycache__
222
222
  *.pyc
223
223
  *.pyo
224
224
  *.pyd
@@ -235,7 +235,7 @@ venv
235
235
  .git
236
236
  .github
237
237
  README.md
238
- `,"utf-8"),t.cicd==="github"){await u.ensureDir(p.join(n,".github","workflows"));let y=`name: Deploy MCP
238
+ `,"utf-8"),t.cicd==="github"){await c.ensureDir(u.join(n,".github","workflows"));let y=`name: Deploy MCP
239
239
 
240
240
  on:
241
241
  push:
@@ -319,10 +319,10 @@ jobs:
319
319
  run: |
320
320
  gcloud builds submit --tag gcr.io/\${{ secrets.GCP_PROJECT_ID }}/mcp-${e}:latest
321
321
  `:""}
322
- `;await u.writeFile(p.join(n,".github","workflows","deploy.yml"),y,"utf-8")}d.succeedSpinner("MCP created successfully!"),d.section("Next steps",[`1. cd ${n}`,"2. docker-compose up # Start with Docker","","Or for local development:","2. uv pip install -e .","3. python server.py","","Or use MCP Inspector:","2. uv pip install -e .","3. fastmcp dev server.py","","Add to Claude Code settings to use this MCP"]),d.success(`\u2728 MCP "${e}" ready to use!`)}catch(i){throw d.failSpinner("Failed to create MCP"),i}}import b from"path";import G from"os";import k from"fs-extra";import{logger as m}from"@neural-tools/core";import D from"inquirer";async function I(e,t){m.header(`Generating Claude Command: /${e}`);let r=t.description;r||(r=(await D.prompt([{type:"input",name:"description",message:"Description of your command:",default:`Execute ${e}`}])).description);let n;t.global?n=b.join(G.homedir(),".claude","commands"):n=b.resolve(t.output||"./claude/commands");let i=b.join(n,`${e}.md`);if(t.dryRun){m.info("Dry run mode - no files will be created"),m.section("Configuration",[`Name: /${e}`,`Description: ${r}`,`Output: ${i}`,`Arguments: ${t.args?.join(", ")||"none"}`,`Allowed Tools: ${t.tools?.join(", ")||"all"}`,`Global: ${t.global?"Yes":"No"}`]);return}if(await k.pathExists(i)){let{overwrite:o}=await D.prompt([{type:"confirm",name:"overwrite",message:`Command /${e} already exists. Overwrite?`,default:!1}]);if(!o){m.warn("Cancelled");return}}m.startSpinner("Creating Claude command...");try{await k.ensureDir(n);let o=["---"];t.args&&t.args.length>0&&o.push(`argument-hint: ${t.args.join(" ")}`),o.push(`description: ${r}`),t.tools&&t.tools.length>0&&(o.push("allowed-tools:"),t.tools.forEach(y=>{o.push(` - ${y}`)})),o.push("---"),o.push("");let s=t.args||[],w=s.map((y,$)=>`$${$+1}`).join(" "),f=s.length>0?`
322
+ `;await c.writeFile(u.join(n,".github","workflows","deploy.yml"),y,"utf-8")}p.succeedSpinner("MCP created successfully!"),p.section("Next steps",[`1. cd ${n}`,"2. docker-compose up # Start with Docker","","Or for local development:","2. uv pip install -e .","3. python server.py","","Or use MCP Inspector:","2. uv pip install -e .","3. fastmcp dev server.py","","Add to Claude Code settings to use this MCP"]),p.success(`\u2728 MCP "${e}" ready to use!`)}catch(i){throw p.failSpinner("Failed to create MCP"),i}}import $ from"path";import G from"os";import b from"fs-extra";import{logger as d}from"@neural-tools/core";import R from"inquirer";async function T(e,t){d.header(`Generating Claude Command: /${e}`);let r=t.description;r||(r=(await R.prompt([{type:"input",name:"description",message:"Description of your command:",default:`Execute ${e}`}])).description);let n;t.global?n=$.join(G.homedir(),".claude","commands"):n=$.resolve(t.output||"./claude/commands");let i=$.join(n,`${e}.md`);if(t.dryRun){d.info("Dry run mode - no files will be created"),d.section("Configuration",[`Name: /${e}`,`Description: ${r}`,`Output: ${i}`,`Arguments: ${t.args?.join(", ")||"none"}`,`Allowed Tools: ${t.tools?.join(", ")||"all"}`,`Global: ${t.global?"Yes":"No"}`]);return}if(await b.pathExists(i)){let{overwrite:o}=await R.prompt([{type:"confirm",name:"overwrite",message:`Command /${e} already exists. Overwrite?`,default:!1}]);if(!o){d.warn("Cancelled");return}}d.startSpinner("Creating Claude command...");try{await b.ensureDir(n);let o=["---"];t.args&&t.args.length>0&&o.push(`argument-hint: ${t.args.join(" ")}`),o.push(`description: ${r}`),t.tools&&t.tools.length>0&&(o.push("allowed-tools:"),t.tools.forEach(y=>{o.push(` - ${y}`)})),o.push("---"),o.push("");let s=t.args||[],w=s.map((y,v)=>`$${v+1}`).join(" "),f=s.length>0?`
323
323
 
324
324
  Arguments:
325
- ${s.map((y,$)=>`- $${$+1}: ${y}`).join(`
325
+ ${s.map((y,v)=>`- $${v+1}: ${y}`).join(`
326
326
  `)}`:"",S=`${o.join(`
327
327
  `)}# ${e} Command
328
328
 
@@ -331,7 +331,7 @@ Execute the ${e} operation${f?":"+f:"."}
331
331
  ${w?`Using arguments: ${w}`:""}
332
332
 
333
333
  Please proceed with the ${e} operation.
334
- `;await k.writeFile(i,S,"utf-8"),m.succeedSpinner("Claude command created successfully!"),m.section("Next steps",[t.global?`Command /${e} is now available globally in Claude Code`:`Add the command to your project by copying ${i}`,"","Usage:",s.length>0?` /${e} ${s.join(" ")}`:` /${e}`]),m.success(`\u2728 Command "/${e}" ready to use!`)}catch(o){throw m.failSpinner("Failed to create command"),o}}import P from"path";import F from"os";import E from"fs-extra";import{logger as g}from"@neural-tools/core";import A from"inquirer";async function j(e,t){g.header(`Generating Claude Agent: ${e}`);let r=t.description;r||(r=(await A.prompt([{type:"input",name:"description",message:"Description of your agent:",default:`${e} specialized agent`}])).description);let n;t.global?n=P.join(F.homedir(),".claude","agents"):n=P.resolve(t.output||"./claude/agents");let i=P.join(n,`${e}.md`),o=t.model||"sonnet";if(t.dryRun){g.info("Dry run mode - no files will be created"),g.section("Configuration",[`Name: ${e}`,`Description: ${r}`,`Output: ${i}`,`Model: ${o}`,`Tools: ${t.tools?.join(", ")||"all"}`,`Global: ${t.global?"Yes":"No"}`]);return}if(await E.pathExists(i)){let{overwrite:s}=await A.prompt([{type:"confirm",name:"overwrite",message:`Agent ${e} already exists. Overwrite?`,default:!1}]);if(!s){g.warn("Cancelled");return}}g.startSpinner("Creating Claude agent...");try{await E.ensureDir(n);let s=["---"];s.push(`model: claude-${o}-4-5`),t.tools&&t.tools.length>0&&(s.push("tools:"),t.tools.forEach(f=>{s.push(` - ${f}`)})),s.push("---"),s.push("");let w=`${s.join(`
334
+ `;await b.writeFile(i,S,"utf-8"),d.succeedSpinner("Claude command created successfully!"),d.section("Next steps",[t.global?`Command /${e} is now available globally in Claude Code`:`Add the command to your project by copying ${i}`,"","Usage:",s.length>0?` /${e} ${s.join(" ")}`:` /${e}`]),d.success(`\u2728 Command "/${e}" ready to use!`)}catch(o){throw d.failSpinner("Failed to create command"),o}}import k from"path";import I from"os";import P from"fs-extra";import{logger as m}from"@neural-tools/core";import E from"inquirer";async function j(e,t){m.header(`Generating Claude Agent: ${e}`);let r=t.description;r||(r=(await E.prompt([{type:"input",name:"description",message:"Description of your agent:",default:`${e} specialized agent`}])).description);let n;t.global?n=k.join(I.homedir(),".claude","agents"):n=k.resolve(t.output||"./claude/agents");let i=k.join(n,`${e}.md`),o=t.model||"sonnet";if(t.dryRun){m.info("Dry run mode - no files will be created"),m.section("Configuration",[`Name: ${e}`,`Description: ${r}`,`Output: ${i}`,`Model: ${o}`,`Tools: ${t.tools?.join(", ")||"all"}`,`Global: ${t.global?"Yes":"No"}`]);return}if(await P.pathExists(i)){let{overwrite:s}=await E.prompt([{type:"confirm",name:"overwrite",message:`Agent ${e} already exists. Overwrite?`,default:!1}]);if(!s){m.warn("Cancelled");return}}m.startSpinner("Creating Claude agent...");try{await P.ensureDir(n);let s=["---"];s.push(`model: claude-${o}-4-5`),t.tools&&t.tools.length>0&&(s.push("tools:"),t.tools.forEach(f=>{s.push(` - ${f}`)})),s.push("---"),s.push("");let w=`${s.join(`
335
335
  `)}# ${e} Agent
336
336
 
337
337
  ${r}
@@ -360,4 +360,4 @@ Provide clear, structured responses that:
360
360
  - [Output requirement 3]
361
361
 
362
362
  Focus on ${e} and deliver actionable results.
363
- `;await E.writeFile(i,w,"utf-8"),g.succeedSpinner("Claude agent created successfully!"),g.section("Next steps",[t.global?`Agent ${e} is now available globally in Claude Code`:`Add the agent to your project by copying ${i}`,"","Customize the agent by editing:",` ${i}`,"","Use the agent via the Task tool in Claude Code"]),g.success(`\u2728 Agent "${e}" ready to use!`)}catch(s){throw g.failSpinner("Failed to create agent"),s}}import{logger as a,requireFeature as x}from"@neural-tools/core";import{execa as L}from"execa";import Y from"path";import N from"fs-extra";async function q(e,t){a.header(`Deploying MCP: ${e}`),await x("cloud-deployment","Cloud Deployment");let r=t.platform||"aws",n=t.env||"dev";a.info(`Platform: ${r}`),a.info(`Environment: ${n}`);let i=Y.resolve("./apps",e);if(!await N.pathExists(i))throw new Error(`MCP "${e}" not found at ${i}`);a.startSpinner("Building MCP...");try{await L("npm",["run","build"],{cwd:i,stdio:"pipe"}),a.succeedSpinner("MCP built successfully"),r==="aws"?await U(e,i,t):r==="gcp"&&await W(e,i,t),a.success(`\u2728 MCP "${e}" deployed successfully!`)}catch(o){throw a.failSpinner("Deployment failed"),o}}async function U(e,t,r){a.startSpinner("Deploying to AWS Lambda..."),a.updateSpinner("Packaging Lambda function..."),await new Promise(n=>setTimeout(n,1e3)),a.updateSpinner("Uploading to S3..."),await new Promise(n=>setTimeout(n,1e3)),a.updateSpinner("Creating/updating Lambda function..."),await new Promise(n=>setTimeout(n,1e3)),a.succeedSpinner("Deployed to AWS Lambda"),a.section("Deployment Info",[`Function: ${e}-${r.env}`,`Region: ${r.region||"us-east-1"}`,`Environment: ${r.env}`,"","Configure in Claude Code:",JSON.stringify({mcpServers:{[e]:{command:"aws",args:["lambda","invoke","--function-name",`${e}-${r.env}`,"--payload","stdin","--output","stdout"]}}},null,2)])}async function W(e,t,r){a.startSpinner("Deploying to Google Cloud Functions..."),a.updateSpinner("Packaging function..."),await new Promise(n=>setTimeout(n,1e3)),a.updateSpinner("Uploading to Cloud Storage..."),await new Promise(n=>setTimeout(n,1e3)),a.updateSpinner("Deploying Cloud Function..."),await new Promise(n=>setTimeout(n,1e3)),a.succeedSpinner("Deployed to Google Cloud Functions"),a.section("Deployment Info",[`Function: ${e}-${r.env}`,`Region: ${r.region||"us-central1"}`,`Environment: ${r.env}`])}import{logger as c,licenseManager as T,LicenseTier as v}from"@neural-tools/core";import B from"inquirer";async function K(e){c.header("AI Toolkit License Management");let t=e.key;if(t||(t=(await B.prompt([{type:"input",name:"licenseKey",message:"Enter your license key:",validate:n=>!n||n.trim().length===0?"License key is required":!0}])).licenseKey),!t){c.error("License key is required");return}c.startSpinner("Validating license...");try{let r=t.split("-");if(r.length<2)throw new Error("Invalid license key format");let n=r[0],i=r[1];if(!Object.values(v).includes(n))throw new Error("Invalid license tier");await T.saveLicense({tier:n,email:i,key:t,features:[]}),c.succeedSpinner("License activated successfully!");let o=await T.loadLicense();c.section("License Details",[`Tier: ${o.tier.toUpperCase()}`,`Email: ${o.email||"N/A"}`,"Status: Active"]);let s=z(n);c.section("Available Features",s),n===v.FREE&&(c.newline(),c.info("Upgrade to Pro for advanced features:"),c.info("https://ai-toolkit.dev/pricing")),c.success("\u2728 Ready to build!")}catch(r){c.failSpinner("License validation failed"),c.error(r.message||"Invalid license key"),c.newline(),c.info("Get a license at: https://ai-toolkit.dev/pricing"),c.info("Or continue with free tier features")}}function z(e){let t=["\u2713 MCP generation","\u2713 Claude commands","\u2713 Basic templates","\u2713 Local development"],r=[...t,"\u2713 Vector database integration","\u2713 Semantic caching","\u2713 Fine-tuning workflows","\u2713 Cloud deployment (AWS/GCP)","\u2713 Premium templates","\u2713 GitHub automation"],n=[...r,"\u2713 White-label support","\u2713 Custom integrations","\u2713 Priority support","\u2713 SLA guarantee","\u2713 Team collaboration features"];switch(e){case v.FREE:return t;case v.PRO:return r;case v.ENTERPRISE:return n;default:return t}}import{logger as l,licenseManager as _,LicenseTier as V}from"@neural-tools/core";async function H(){l.header("AI Toolkit Status");try{let e=await _.loadLicense();l.section("License Information",[`Tier: ${e.tier.toUpperCase()}`,`Email: ${e.email||"N/A"}`,`Status: ${e.expiresAt?J(e.expiresAt):"Active"}`]);let t=[{name:"MCP Generation",key:"mcp-generation"},{name:"Claude Commands",key:"claude-commands"},{name:"Vector Database",key:"vector-db"},{name:"Semantic Cache",key:"semantic-cache"},{name:"Fine-tuning",key:"fine-tuning"},{name:"Cloud Deployment",key:"cloud-deployment"},{name:"GitHub Automation",key:"github-automation"}],r=await Promise.all(t.map(async n=>`${await _.checkFeature(n.key)?"\u2713":"\u2717"} ${n.name}`));l.section("Feature Availability",r),e.tier===V.FREE&&(l.newline(),l.info("Unlock more features with Pro or Enterprise:"),l.info("https://ai-toolkit.dev/pricing")),l.newline(),l.section("Quick Start",["Generate an MCP server:"," ai-toolkit generate mcp github","","Generate a Claude command:"," ai-toolkit generate command search-kb","","View all commands:"," ai-toolkit --help"])}catch{l.error("Failed to load license information"),l.newline(),l.info('Run "ai-toolkit login" to activate your license'),l.info("Or continue with free tier features")}}function J(e){let t=new Date(e),r=new Date;if(t<r)return"Expired";let n=Math.ceil((t.getTime()-r.getTime())/(1e3*60*60*24));return n<=30?`Active (expires in ${n} days)`:"Active"}export{q as deployMCP,j as generateAgent,I as generateCommand,O as generateMCP,K as loginCommand,H as statusCommand};
363
+ `;await P.writeFile(i,w,"utf-8"),m.succeedSpinner("Claude agent created successfully!"),m.section("Next steps",[t.global?`Agent ${e} is now available globally in Claude Code`:`Add the agent to your project by copying ${i}`,"","Customize the agent by editing:",` ${i}`,"","Use the agent via the Task tool in Claude Code"]),m.success(`\u2728 Agent "${e}" ready to use!`)}catch(s){throw m.failSpinner("Failed to create agent"),s}}import{logger as a,requireFeature as F}from"@neural-tools/core";import{execa as x}from"execa";import L from"path";import Y from"fs-extra";async function q(e,t){a.header(`Deploying MCP: ${e}`),await F("cloud-deployment","Cloud Deployment");let r=t.platform||"aws",n=t.env||"dev";a.info(`Platform: ${r}`),a.info(`Environment: ${n}`);let i=L.resolve("./apps",e);if(!await Y.pathExists(i))throw new Error(`MCP "${e}" not found at ${i}`);a.startSpinner("Building MCP...");try{await x("npm",["run","build"],{cwd:i,stdio:"pipe"}),a.succeedSpinner("MCP built successfully"),r==="aws"?await N(e,i,t):r==="gcp"&&await U(e,i,t),a.success(`\u2728 MCP "${e}" deployed successfully!`)}catch(o){throw a.failSpinner("Deployment failed"),o}}async function N(e,t,r){a.startSpinner("Deploying to AWS Lambda..."),a.updateSpinner("Packaging Lambda function..."),await new Promise(n=>setTimeout(n,1e3)),a.updateSpinner("Uploading to S3..."),await new Promise(n=>setTimeout(n,1e3)),a.updateSpinner("Creating/updating Lambda function..."),await new Promise(n=>setTimeout(n,1e3)),a.succeedSpinner("Deployed to AWS Lambda"),a.section("Deployment Info",[`Function: ${e}-${r.env}`,`Region: ${r.region||"us-east-1"}`,`Environment: ${r.env}`,"","Configure in Claude Code:",JSON.stringify({mcpServers:{[e]:{command:"aws",args:["lambda","invoke","--function-name",`${e}-${r.env}`,"--payload","stdin","--output","stdout"]}}},null,2)])}async function U(e,t,r){a.startSpinner("Deploying to Google Cloud Functions..."),a.updateSpinner("Packaging function..."),await new Promise(n=>setTimeout(n,1e3)),a.updateSpinner("Uploading to Cloud Storage..."),await new Promise(n=>setTimeout(n,1e3)),a.updateSpinner("Deploying Cloud Function..."),await new Promise(n=>setTimeout(n,1e3)),a.succeedSpinner("Deployed to Google Cloud Functions"),a.section("Deployment Info",[`Function: ${e}-${r.env}`,`Region: ${r.region||"us-central1"}`,`Environment: ${r.env}`])}import{logger as l,licenseManager as A,LicenseTier as W}from"@neural-tools/core";import K from"inquirer";async function B(e){l.header("AI Toolkit License Management");let t=e.key;if(t||(t=(await K.prompt([{type:"input",name:"licenseKey",message:"Enter your license key:",validate:n=>!n||n.trim().length===0?"License key is required":!0}])).licenseKey),!t){l.error("License key is required");return}l.startSpinner("Validating license...");try{let r=t.split("-");if(r.length<2)throw new Error("Invalid license key format");let n=r[0],i=r[1];if(!Object.values(W).includes(n))throw new Error("Invalid license tier");await A.saveLicense({tier:n,email:i,key:t,features:[]}),l.succeedSpinner("License activated successfully!");let o=await A.loadLicense();l.section("License Details",[`Tier: ${o.tier.toUpperCase()}`,`Email: ${o.email||"N/A"}`,"Status: Active"]);let s=z();l.section("Available Features",s),l.success("\u2728 Ready to build!")}catch(r){l.failSpinner("License validation failed"),l.error(r.message||"Invalid license key"),l.newline(),l.info("All features are available for free - no license required!")}}function z(){return["\u2713 MCP generation","\u2713 Claude commands","\u2713 Claude agents","\u2713 Vector database integration","\u2713 Semantic caching","\u2713 Fine-tuning workflows","\u2713 Cloud deployment (AWS/GCP)","\u2713 GitHub automation","\u2713 All templates"]}import{logger as g,licenseManager as _}from"@neural-tools/core";async function V(){g.header("AI Toolkit Status");try{let e=await _.loadLicense();g.section("License Information",[`Tier: ${e.tier.toUpperCase()}`,`Email: ${e.email||"N/A"}`,`Status: ${e.expiresAt?H(e.expiresAt):"Active"}`]);let t=[{name:"MCP Generation",key:"mcp-generation"},{name:"Claude Commands",key:"claude-commands"},{name:"Vector Database",key:"vector-db"},{name:"Semantic Cache",key:"semantic-cache"},{name:"Fine-tuning",key:"fine-tuning"},{name:"Cloud Deployment",key:"cloud-deployment"},{name:"GitHub Automation",key:"github-automation"}],r=await Promise.all(t.map(async n=>`${await _.checkFeature(n.key)?"\u2713":"\u2717"} ${n.name}`));g.section("Feature Availability",r),g.newline(),g.section("Quick Start",["Generate an MCP server:"," ai-toolkit generate mcp github","","Generate a Claude command:"," ai-toolkit generate command search-kb","","View all commands:"," ai-toolkit --help"])}catch{g.error("Failed to load license information"),g.newline(),g.info("All features are available - no license required!"),g.info('Run "ai-toolkit --help" to get started')}}function H(e){let t=new Date(e),r=new Date;if(t<r)return"Expired";let n=Math.ceil((t.getTime()-r.getTime())/(1e3*60*60*24));return n<=30?`Active (expires in ${n} days)`:"Active"}export{q as deployMCP,j as generateAgent,T as generateCommand,O as generateMCP,B as loginCommand,V as statusCommand};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@neural-tools/cli",
3
- "version": "0.1.5",
3
+ "version": "0.1.6",
4
4
  "description": "CLI for Neural Tools - Generate MCPs, Claude commands, and AI workflows",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -36,7 +36,7 @@
36
36
  "fs-extra": "^11.2.0",
37
37
  "globby": "^14.0.0",
38
38
  "picocolors": "^1.0.0",
39
- "@neural-tools/core": "0.1.5"
39
+ "@neural-tools/core": "0.1.6"
40
40
  },
41
41
  "devDependencies": {
42
42
  "@types/fs-extra": "^11.0.4",