@neural-tools/create 0.1.3
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 +80 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +274 -0
- package/package.json +43 -0
package/LICENSE.md
ADDED
|
@@ -0,0 +1,80 @@
|
|
|
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
|
package/dist/index.d.ts
ADDED
package/dist/index.js
ADDED
|
@@ -0,0 +1,274 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
"use strict";
|
|
3
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
4
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
5
|
+
};
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
const path_1 = __importDefault(require("path"));
|
|
8
|
+
const fs_extra_1 = __importDefault(require("fs-extra"));
|
|
9
|
+
const commander_1 = require("commander");
|
|
10
|
+
const inquirer_1 = __importDefault(require("inquirer"));
|
|
11
|
+
const execa_1 = require("execa");
|
|
12
|
+
const picocolors_1 = __importDefault(require("picocolors"));
|
|
13
|
+
const program = new commander_1.Command();
|
|
14
|
+
program
|
|
15
|
+
.name('create-neural-tools')
|
|
16
|
+
.description('Create a new Neural Tools workspace')
|
|
17
|
+
.argument('[project-name]', 'Name of your project')
|
|
18
|
+
.option('-t, --template <template>', 'Template to use (full, minimal)', 'full')
|
|
19
|
+
.option('-p, --package-manager <pm>', 'Package manager (npm, pnpm, yarn)', 'pnpm')
|
|
20
|
+
.option('--skip-install', 'Skip dependency installation', false)
|
|
21
|
+
.action(async (projectName, options) => {
|
|
22
|
+
await createProject(projectName, options);
|
|
23
|
+
});
|
|
24
|
+
async function createProject(projectName, options) {
|
|
25
|
+
console.log(picocolors_1.default.cyan(picocolors_1.default.bold('\n✨ Neural Tools Project Generator\n')));
|
|
26
|
+
// Prompt for project name if not provided
|
|
27
|
+
let name = projectName;
|
|
28
|
+
if (!name) {
|
|
29
|
+
const answers = await inquirer_1.default.prompt([
|
|
30
|
+
{
|
|
31
|
+
type: 'input',
|
|
32
|
+
name: 'projectName',
|
|
33
|
+
message: 'Project name:',
|
|
34
|
+
default: 'my-ai-toolkit',
|
|
35
|
+
validate: (input) => {
|
|
36
|
+
if (!input || input.trim().length === 0) {
|
|
37
|
+
return 'Project name is required';
|
|
38
|
+
}
|
|
39
|
+
if (!/^[a-z0-9-]+$/.test(input)) {
|
|
40
|
+
return 'Project name must be lowercase, alphanumeric with hyphens';
|
|
41
|
+
}
|
|
42
|
+
return true;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
]);
|
|
46
|
+
name = answers.projectName;
|
|
47
|
+
}
|
|
48
|
+
if (!name) {
|
|
49
|
+
console.log(picocolors_1.default.red('\n✗ Project name is required\n'));
|
|
50
|
+
process.exit(1);
|
|
51
|
+
}
|
|
52
|
+
const projectDir = path_1.default.resolve(process.cwd(), name);
|
|
53
|
+
// Check if directory exists
|
|
54
|
+
if (await fs_extra_1.default.pathExists(projectDir)) {
|
|
55
|
+
const { overwrite } = await inquirer_1.default.prompt([
|
|
56
|
+
{
|
|
57
|
+
type: 'confirm',
|
|
58
|
+
name: 'overwrite',
|
|
59
|
+
message: `Directory ${name} already exists. Overwrite?`,
|
|
60
|
+
default: false
|
|
61
|
+
}
|
|
62
|
+
]);
|
|
63
|
+
if (!overwrite) {
|
|
64
|
+
console.log(picocolors_1.default.yellow('\n⚠ Cancelled\n'));
|
|
65
|
+
process.exit(0);
|
|
66
|
+
}
|
|
67
|
+
await fs_extra_1.default.remove(projectDir);
|
|
68
|
+
}
|
|
69
|
+
// Prompt for template and package manager if not provided
|
|
70
|
+
const config = await inquirer_1.default.prompt([
|
|
71
|
+
{
|
|
72
|
+
type: 'list',
|
|
73
|
+
name: 'template',
|
|
74
|
+
message: 'Choose a template:',
|
|
75
|
+
default: options.template,
|
|
76
|
+
when: !options.template,
|
|
77
|
+
choices: [
|
|
78
|
+
{
|
|
79
|
+
name: 'Full - Complete toolkit with examples',
|
|
80
|
+
value: 'full'
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
name: 'Minimal - Basic structure only',
|
|
84
|
+
value: 'minimal'
|
|
85
|
+
}
|
|
86
|
+
]
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
type: 'list',
|
|
90
|
+
name: 'packageManager',
|
|
91
|
+
message: 'Package manager:',
|
|
92
|
+
default: options.packageManager,
|
|
93
|
+
when: !options.packageManager,
|
|
94
|
+
choices: ['pnpm', 'npm', 'yarn']
|
|
95
|
+
}
|
|
96
|
+
]);
|
|
97
|
+
const template = config.template || options.template || 'full';
|
|
98
|
+
const packageManager = config.packageManager || options.packageManager || 'pnpm';
|
|
99
|
+
console.log(picocolors_1.default.blue('\n→ Creating project structure...\n'));
|
|
100
|
+
// Create project directory
|
|
101
|
+
await fs_extra_1.default.ensureDir(projectDir);
|
|
102
|
+
// Create workspace structure
|
|
103
|
+
await createWorkspaceStructure(projectDir, template, name);
|
|
104
|
+
console.log(picocolors_1.default.green('✓ Project structure created\n'));
|
|
105
|
+
// Install dependencies
|
|
106
|
+
if (!options.skipInstall) {
|
|
107
|
+
console.log(picocolors_1.default.blue('→ Installing dependencies...\n'));
|
|
108
|
+
try {
|
|
109
|
+
await (0, execa_1.execa)(packageManager, ['install'], {
|
|
110
|
+
cwd: projectDir,
|
|
111
|
+
stdio: 'inherit'
|
|
112
|
+
});
|
|
113
|
+
console.log(picocolors_1.default.green('\n✓ Dependencies installed\n'));
|
|
114
|
+
}
|
|
115
|
+
catch (error) {
|
|
116
|
+
console.log(picocolors_1.default.yellow('\n⚠ Failed to install dependencies\n'));
|
|
117
|
+
console.log(picocolors_1.default.dim(`Run "cd ${name} && ${packageManager} install" manually\n`));
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
// Print next steps
|
|
121
|
+
printNextSteps(name, packageManager);
|
|
122
|
+
}
|
|
123
|
+
async function createWorkspaceStructure(projectDir, template, projectName) {
|
|
124
|
+
// Create directories
|
|
125
|
+
await fs_extra_1.default.ensureDir(path_1.default.join(projectDir, 'apps'));
|
|
126
|
+
await fs_extra_1.default.ensureDir(path_1.default.join(projectDir, 'packages'));
|
|
127
|
+
await fs_extra_1.default.ensureDir(path_1.default.join(projectDir, 'claude', 'commands'));
|
|
128
|
+
await fs_extra_1.default.ensureDir(path_1.default.join(projectDir, 'claude', 'rules'));
|
|
129
|
+
await fs_extra_1.default.ensureDir(path_1.default.join(projectDir, 'claude', 'hooks'));
|
|
130
|
+
await fs_extra_1.default.ensureDir(path_1.default.join(projectDir, 'claude', 'agents'));
|
|
131
|
+
await fs_extra_1.default.ensureDir(path_1.default.join(projectDir, 'scripts'));
|
|
132
|
+
await fs_extra_1.default.ensureDir(path_1.default.join(projectDir, '.github', 'workflows'));
|
|
133
|
+
// Create package.json
|
|
134
|
+
const packageJson = {
|
|
135
|
+
name: projectName,
|
|
136
|
+
version: '0.1.0',
|
|
137
|
+
private: true,
|
|
138
|
+
description: 'Neural Tools workspace',
|
|
139
|
+
scripts: {
|
|
140
|
+
build: 'pnpm -r build',
|
|
141
|
+
dev: 'pnpm -r --parallel dev',
|
|
142
|
+
test: 'pnpm -r test',
|
|
143
|
+
'generate:mcp': 'neural-tools generate mcp',
|
|
144
|
+
'generate:command': 'neural-tools generate command',
|
|
145
|
+
'generate:agent': 'neural-tools generate agent'
|
|
146
|
+
},
|
|
147
|
+
devDependencies: {
|
|
148
|
+
'@neural-tools/cli': '^0.1.0',
|
|
149
|
+
typescript: '^5.3.3'
|
|
150
|
+
},
|
|
151
|
+
packageManager: 'pnpm@8.15.1'
|
|
152
|
+
};
|
|
153
|
+
await fs_extra_1.default.writeJSON(path_1.default.join(projectDir, 'package.json'), packageJson, { spaces: 2 });
|
|
154
|
+
// Create pnpm-workspace.yaml
|
|
155
|
+
const workspaceConfig = `packages:
|
|
156
|
+
- 'apps/*'
|
|
157
|
+
- 'packages/*'
|
|
158
|
+
`;
|
|
159
|
+
await fs_extra_1.default.writeFile(path_1.default.join(projectDir, 'pnpm-workspace.yaml'), workspaceConfig, 'utf-8');
|
|
160
|
+
// Create CLAUDE.md
|
|
161
|
+
const claudeMd = `# ${projectName}
|
|
162
|
+
|
|
163
|
+
AI Toolkit workspace for building MCPs, Claude commands, and AI workflows.
|
|
164
|
+
|
|
165
|
+
## Project Structure
|
|
166
|
+
|
|
167
|
+
- \`apps/\` - MCP servers and deployable applications
|
|
168
|
+
- \`packages/\` - Reusable libraries and shared code
|
|
169
|
+
- \`claude/\` - Claude Code customizations (commands, rules, agents, hooks)
|
|
170
|
+
- \`scripts/\` - Utility scripts
|
|
171
|
+
|
|
172
|
+
## Coding Standards
|
|
173
|
+
|
|
174
|
+
- Use TypeScript for all code
|
|
175
|
+
- Follow ESM module format
|
|
176
|
+
- Write tests for all public APIs
|
|
177
|
+
- Document complex logic with comments
|
|
178
|
+
|
|
179
|
+
## AI Workflow
|
|
180
|
+
|
|
181
|
+
This project uses AI Toolkit to accelerate development:
|
|
182
|
+
- Generate MCPs: \`npm run generate:mcp <name>\`
|
|
183
|
+
- Generate commands: \`npm run generate:command <name>\`
|
|
184
|
+
- Generate agents: \`npm run generate:agent <name>\`
|
|
185
|
+
|
|
186
|
+
## Getting Started
|
|
187
|
+
|
|
188
|
+
1. Install dependencies: \`pnpm install\`
|
|
189
|
+
2. Generate your first MCP: \`pnpm generate:mcp github\`
|
|
190
|
+
3. Build all packages: \`pnpm build\`
|
|
191
|
+
4. Start development: \`pnpm dev\`
|
|
192
|
+
`;
|
|
193
|
+
await fs_extra_1.default.writeFile(path_1.default.join(projectDir, 'CLAUDE.md'), claudeMd, 'utf-8');
|
|
194
|
+
// Create README.md
|
|
195
|
+
const readme = `# ${projectName}
|
|
196
|
+
|
|
197
|
+
AI Toolkit workspace for building intelligent productivity tools.
|
|
198
|
+
|
|
199
|
+
## Quick Start
|
|
200
|
+
|
|
201
|
+
\`\`\`bash
|
|
202
|
+
# Install dependencies
|
|
203
|
+
pnpm install
|
|
204
|
+
|
|
205
|
+
# Generate a new MCP server
|
|
206
|
+
pnpm generate:mcp my-integration
|
|
207
|
+
|
|
208
|
+
# Generate a Claude command
|
|
209
|
+
pnpm generate:command my-command
|
|
210
|
+
|
|
211
|
+
# Build all packages
|
|
212
|
+
pnpm build
|
|
213
|
+
\`\`\`
|
|
214
|
+
|
|
215
|
+
## What's Included
|
|
216
|
+
|
|
217
|
+
- **MCP Generation**: Create FastMCP servers with one command
|
|
218
|
+
- **Claude Commands**: Custom slash commands for Claude Code
|
|
219
|
+
- **Claude Agents**: Specialized AI agents for your workflows
|
|
220
|
+
- **Vector DB**: Semantic search and caching (Pro)
|
|
221
|
+
- **Cloud Deployment**: AWS/GCP deployment templates (Pro)
|
|
222
|
+
|
|
223
|
+
## Documentation
|
|
224
|
+
|
|
225
|
+
- [AI Toolkit Documentation](https://ai-toolkit.dev/docs)
|
|
226
|
+
- [MCP Documentation](https://modelcontextprotocol.io)
|
|
227
|
+
- [Claude Code Documentation](https://docs.anthropic.com/claude-code)
|
|
228
|
+
|
|
229
|
+
## License
|
|
230
|
+
|
|
231
|
+
MIT
|
|
232
|
+
`;
|
|
233
|
+
await fs_extra_1.default.writeFile(path_1.default.join(projectDir, 'README.md'), readme, 'utf-8');
|
|
234
|
+
// Create .gitignore
|
|
235
|
+
const gitignore = `node_modules
|
|
236
|
+
dist
|
|
237
|
+
.DS_Store
|
|
238
|
+
*.log
|
|
239
|
+
.env
|
|
240
|
+
.env.local
|
|
241
|
+
CLAUDE.local.md
|
|
242
|
+
.ai-toolkit
|
|
243
|
+
`;
|
|
244
|
+
await fs_extra_1.default.writeFile(path_1.default.join(projectDir, '.gitignore'), gitignore, 'utf-8');
|
|
245
|
+
// Create example command if full template
|
|
246
|
+
if (template === 'full') {
|
|
247
|
+
const exampleCommand = `---
|
|
248
|
+
description: Search the knowledge base
|
|
249
|
+
argument-hint: query
|
|
250
|
+
---
|
|
251
|
+
|
|
252
|
+
# Search Knowledge Base
|
|
253
|
+
|
|
254
|
+
Search your vector database for relevant information.
|
|
255
|
+
|
|
256
|
+
Query: $1
|
|
257
|
+
|
|
258
|
+
Use semantic search to find the most relevant documents and context.
|
|
259
|
+
`;
|
|
260
|
+
await fs_extra_1.default.writeFile(path_1.default.join(projectDir, 'claude', 'commands', 'search-kb.md'), exampleCommand, 'utf-8');
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
function printNextSteps(projectName, packageManager) {
|
|
264
|
+
console.log(picocolors_1.default.green(picocolors_1.default.bold('🎉 Project created successfully!\n')));
|
|
265
|
+
console.log(picocolors_1.default.cyan('Next steps:\n'));
|
|
266
|
+
console.log(picocolors_1.default.dim(` cd ${projectName}`));
|
|
267
|
+
console.log(picocolors_1.default.dim(` ${packageManager} generate:mcp github`));
|
|
268
|
+
console.log(picocolors_1.default.dim(` ${packageManager} generate:command search-kb`));
|
|
269
|
+
console.log(picocolors_1.default.dim(` ${packageManager} build\n`));
|
|
270
|
+
console.log(picocolors_1.default.cyan('Documentation:\n'));
|
|
271
|
+
console.log(picocolors_1.default.dim(' https://ai-toolkit.dev/docs\n'));
|
|
272
|
+
console.log(picocolors_1.default.green('Happy building! ✨\n'));
|
|
273
|
+
}
|
|
274
|
+
program.parse();
|
package/package.json
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@neural-tools/create",
|
|
3
|
+
"version": "0.1.3",
|
|
4
|
+
"description": "Scaffold a new Neural Tools workspace",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"types": "dist/index.d.ts",
|
|
7
|
+
"bin": {
|
|
8
|
+
"create-neural-tools": "./dist/index.js"
|
|
9
|
+
},
|
|
10
|
+
"license": "SEE LICENSE IN ../../LICENSE.md",
|
|
11
|
+
"publishConfig": {
|
|
12
|
+
"access": "public"
|
|
13
|
+
},
|
|
14
|
+
"repository": {
|
|
15
|
+
"type": "git",
|
|
16
|
+
"url": "https://github.com/yourusername/ai-toolkit.git",
|
|
17
|
+
"directory": "packages/create-ai-toolkit"
|
|
18
|
+
},
|
|
19
|
+
"dependencies": {
|
|
20
|
+
"commander": "^12.0.0",
|
|
21
|
+
"inquirer": "^9.2.12",
|
|
22
|
+
"execa": "^8.0.1",
|
|
23
|
+
"fs-extra": "^11.2.0",
|
|
24
|
+
"picocolors": "^1.0.0",
|
|
25
|
+
"degit": "^2.8.4",
|
|
26
|
+
"@neural-tools/core": "0.1.3"
|
|
27
|
+
},
|
|
28
|
+
"devDependencies": {
|
|
29
|
+
"@types/fs-extra": "^11.0.4",
|
|
30
|
+
"@types/inquirer": "^9.0.7",
|
|
31
|
+
"@types/node": "^20.11.5",
|
|
32
|
+
"typescript": "^5.3.3"
|
|
33
|
+
},
|
|
34
|
+
"files": [
|
|
35
|
+
"dist"
|
|
36
|
+
],
|
|
37
|
+
"scripts": {
|
|
38
|
+
"build": "tsc && chmod +x dist/index.js",
|
|
39
|
+
"dev": "tsc --watch",
|
|
40
|
+
"clean": "rm -rf dist",
|
|
41
|
+
"test": "echo 'Tests coming soon'"
|
|
42
|
+
}
|
|
43
|
+
}
|