@neural-tools/create 0.1.4 → 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 +21 -80
- package/README.md +247 -0
- package/dist/index.d.mts +1 -0
- package/dist/index.d.ts +0 -1
- package/dist/index.js +27 -187
- package/dist/index.mjs +114 -0
- package/package.json +5 -5
package/LICENSE.md
CHANGED
|
@@ -1,80 +1,21 @@
|
|
|
1
|
-
#
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2025 Luke Amy
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
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,247 @@
|
|
|
1
|
+
# @neural-tools/create
|
|
2
|
+
|
|
3
|
+
> Scaffold a new Neural Tools workspace
|
|
4
|
+
|
|
5
|
+
[](https://www.npmjs.com/package/@neural-tools/create)
|
|
6
|
+
[](../../LICENSE.md)
|
|
7
|
+
|
|
8
|
+
Quick project scaffolding for Neural Tools. Creates a new workspace with all necessary configuration and structure.
|
|
9
|
+
|
|
10
|
+
## Usage
|
|
11
|
+
|
|
12
|
+
### Using npx (Recommended)
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
npx @neural-tools/create my-workspace
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
### Using npm
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
npm create @neural-tools my-workspace
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
### Interactive Mode
|
|
25
|
+
|
|
26
|
+
Run without arguments for an interactive setup:
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
npx @neural-tools/create
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
You'll be prompted for:
|
|
33
|
+
- Project name
|
|
34
|
+
- Description
|
|
35
|
+
- Template selection
|
|
36
|
+
- Package manager preference
|
|
37
|
+
|
|
38
|
+
## What Gets Created
|
|
39
|
+
|
|
40
|
+
```
|
|
41
|
+
my-workspace/
|
|
42
|
+
├── .gitignore
|
|
43
|
+
├── package.json
|
|
44
|
+
├── pnpm-workspace.yaml # If using pnpm
|
|
45
|
+
├── README.md
|
|
46
|
+
├── apps/ # MCP servers go here
|
|
47
|
+
│ └── .gitkeep
|
|
48
|
+
├── claude/
|
|
49
|
+
│ ├── commands/ # Slash commands
|
|
50
|
+
│ │ └── README.md
|
|
51
|
+
│ └── agents/ # Specialized agents
|
|
52
|
+
│ └── README.md
|
|
53
|
+
└── src/ # Your application code
|
|
54
|
+
└── index.ts
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
## Templates
|
|
58
|
+
|
|
59
|
+
Choose from pre-configured templates:
|
|
60
|
+
|
|
61
|
+
### Basic (Default)
|
|
62
|
+
Minimal setup with essential configuration.
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
npx @neural-tools/create my-workspace --template basic
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
### Full
|
|
69
|
+
Complete setup with examples and all features configured.
|
|
70
|
+
|
|
71
|
+
```bash
|
|
72
|
+
npx @neural-tools/create my-workspace --template full
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
### MCP
|
|
76
|
+
Optimized for MCP server development.
|
|
77
|
+
|
|
78
|
+
```bash
|
|
79
|
+
npx @neural-tools/create my-workspace --template mcp
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
### Monorepo
|
|
83
|
+
Pnpm workspace with multiple packages.
|
|
84
|
+
|
|
85
|
+
```bash
|
|
86
|
+
npx @neural-tools/create my-workspace --template monorepo
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
## Command Options
|
|
90
|
+
|
|
91
|
+
```bash
|
|
92
|
+
npx @neural-tools/create <project-name> [options]
|
|
93
|
+
|
|
94
|
+
Options:
|
|
95
|
+
-t, --template <name> Template to use (basic, full, mcp, monorepo)
|
|
96
|
+
-p, --package-manager <pm> Package manager (npm, pnpm, yarn)
|
|
97
|
+
--skip-install Skip dependency installation
|
|
98
|
+
--skip-git Skip git initialization
|
|
99
|
+
-h, --help Display help
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
## Examples
|
|
103
|
+
|
|
104
|
+
### Create with specific template
|
|
105
|
+
|
|
106
|
+
```bash
|
|
107
|
+
npx @neural-tools/create my-ai-tools --template full
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
### Use pnpm
|
|
111
|
+
|
|
112
|
+
```bash
|
|
113
|
+
npx @neural-tools/create my-workspace -p pnpm
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
### Skip installation
|
|
117
|
+
|
|
118
|
+
```bash
|
|
119
|
+
npx @neural-tools/create my-workspace --skip-install
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
### Complete custom setup
|
|
123
|
+
|
|
124
|
+
```bash
|
|
125
|
+
npx @neural-tools/create my-workspace \
|
|
126
|
+
--template monorepo \
|
|
127
|
+
--package-manager pnpm \
|
|
128
|
+
--skip-git
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
## After Creation
|
|
132
|
+
|
|
133
|
+
Once your workspace is created:
|
|
134
|
+
|
|
135
|
+
### 1. Navigate to project
|
|
136
|
+
|
|
137
|
+
```bash
|
|
138
|
+
cd my-workspace
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
### 2. Generate an MCP server
|
|
142
|
+
|
|
143
|
+
```bash
|
|
144
|
+
npx neural-tools generate mcp github \
|
|
145
|
+
--description "GitHub integration"
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
### 3. Generate a Claude command
|
|
149
|
+
|
|
150
|
+
```bash
|
|
151
|
+
npx neural-tools generate command search \
|
|
152
|
+
--description "Search project files"
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
### 4. Start developing
|
|
156
|
+
|
|
157
|
+
```bash
|
|
158
|
+
npm run dev
|
|
159
|
+
# or
|
|
160
|
+
pnpm dev
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
## Project Structure Details
|
|
164
|
+
|
|
165
|
+
### `/apps`
|
|
166
|
+
Contains generated MCP servers. Each server is a standalone application with its own dependencies and configuration.
|
|
167
|
+
|
|
168
|
+
### `/claude/commands`
|
|
169
|
+
Slash commands for Claude Code. These are markdown files that define custom commands you can use in Claude.
|
|
170
|
+
|
|
171
|
+
### `/claude/agents`
|
|
172
|
+
Specialized Claude agents with specific capabilities and system prompts.
|
|
173
|
+
|
|
174
|
+
### `/src`
|
|
175
|
+
Your application source code. The template includes a basic TypeScript setup.
|
|
176
|
+
|
|
177
|
+
## Configuration
|
|
178
|
+
|
|
179
|
+
The created project includes:
|
|
180
|
+
|
|
181
|
+
- **TypeScript** configuration
|
|
182
|
+
- **ESLint** setup (optional)
|
|
183
|
+
- **Prettier** configuration (optional)
|
|
184
|
+
- **Git** initialization
|
|
185
|
+
- **Package scripts** for common tasks
|
|
186
|
+
- **.gitignore** with sensible defaults
|
|
187
|
+
|
|
188
|
+
## Package Scripts
|
|
189
|
+
|
|
190
|
+
The generated `package.json` includes useful scripts:
|
|
191
|
+
|
|
192
|
+
```json
|
|
193
|
+
{
|
|
194
|
+
"scripts": {
|
|
195
|
+
"dev": "tsc --watch",
|
|
196
|
+
"build": "tsc",
|
|
197
|
+
"clean": "rm -rf dist",
|
|
198
|
+
"generate:mcp": "neural-tools generate mcp",
|
|
199
|
+
"generate:command": "neural-tools generate command"
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
## Requirements
|
|
205
|
+
|
|
206
|
+
- Node.js 18+
|
|
207
|
+
- npm, pnpm, or yarn
|
|
208
|
+
|
|
209
|
+
## Development
|
|
210
|
+
|
|
211
|
+
```bash
|
|
212
|
+
# Clone repository
|
|
213
|
+
git clone https://github.com/MacLeanLuke/neural-tools.git
|
|
214
|
+
cd neural-tools/packages/create-ai-toolkit
|
|
215
|
+
|
|
216
|
+
# Install dependencies
|
|
217
|
+
pnpm install
|
|
218
|
+
|
|
219
|
+
# Build
|
|
220
|
+
pnpm build
|
|
221
|
+
|
|
222
|
+
# Test locally
|
|
223
|
+
node dist/index.js my-test-project
|
|
224
|
+
```
|
|
225
|
+
|
|
226
|
+
## Dependencies
|
|
227
|
+
|
|
228
|
+
- [@neural-tools/core](../core) - Core utilities
|
|
229
|
+
- commander - CLI framework
|
|
230
|
+
- inquirer - Interactive prompts
|
|
231
|
+
- execa - Process execution
|
|
232
|
+
- fs-extra - File operations
|
|
233
|
+
- degit - Template cloning
|
|
234
|
+
|
|
235
|
+
## Contributing
|
|
236
|
+
|
|
237
|
+
Contributions are welcome! See the [main repository](https://github.com/MacLeanLuke/neural-tools) for guidelines.
|
|
238
|
+
|
|
239
|
+
## License
|
|
240
|
+
|
|
241
|
+
MIT - See [LICENSE.md](../../LICENSE.md) for details.
|
|
242
|
+
|
|
243
|
+
## Links
|
|
244
|
+
|
|
245
|
+
- [Documentation](https://neural-tools.com/docs/create.html)
|
|
246
|
+
- [GitHub](https://github.com/MacLeanLuke/neural-tools)
|
|
247
|
+
- [npm](https://www.npmjs.com/package/@neural-tools/create)
|
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -1,164 +1,23 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
"use strict";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
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:
|
|
2
|
+
"use strict";var h=Object.create;var g=Object.defineProperty;var y=Object.getOwnPropertyDescriptor;var C=Object.getOwnPropertyNames;var v=Object.getPrototypeOf,b=Object.prototype.hasOwnProperty;var P=(e,a,t,s)=>{if(a&&typeof a=="object"||typeof a=="function")for(let i of C(a))!b.call(e,i)&&i!==t&&g(e,i,{get:()=>a[i],enumerable:!(s=y(a,i))||s.enumerable});return e};var p=(e,a,t)=>(t=e!=null?h(v(e)):{},P(a||!e||!e.__esModule?g(t,"default",{value:e,enumerable:!0}):t,e));var l=p(require("path")),o=p(require("fs-extra")),w=require("commander"),d=p(require("inquirer")),f=require("execa"),n=p(require("picocolors")),k=new w.Command;k.name("create-neural-tools").description("Create a new Neural Tools workspace").argument("[project-name]","Name of your project").option("-t, --template <template>","Template to use (full, minimal)","full").option("-p, --package-manager <pm>","Package manager (npm, pnpm, yarn)","pnpm").option("--skip-install","Skip dependency installation",!1).action(async(e,a)=>{await S(e,a)});async function S(e,a){console.log(n.default.cyan(n.default.bold(`
|
|
3
|
+
\u2728 Neural Tools Project Generator
|
|
4
|
+
`)));let t=e;t||(t=(await d.default.prompt([{type:"input",name:"projectName",message:"Project name:",default:"my-ai-toolkit",validate:m=>!m||m.trim().length===0?"Project name is required":/^[a-z0-9-]+$/.test(m)?!0:"Project name must be lowercase, alphanumeric with hyphens"}])).projectName),t||(console.log(n.default.red(`
|
|
5
|
+
\u2717 Project name is required
|
|
6
|
+
`)),process.exit(1));let s=l.default.resolve(process.cwd(),t);if(await o.default.pathExists(s)){let{overwrite:c}=await d.default.prompt([{type:"confirm",name:"overwrite",message:`Directory ${t} already exists. Overwrite?`,default:!1}]);c||(console.log(n.default.yellow(`
|
|
7
|
+
\u26A0 Cancelled
|
|
8
|
+
`)),process.exit(0)),await o.default.remove(s)}let i=await d.default.prompt([{type:"list",name:"template",message:"Choose a template:",default:a.template,when:!a.template,choices:[{name:"Full - Complete toolkit with examples",value:"full"},{name:"Minimal - Basic structure only",value:"minimal"}]},{type:"list",name:"packageManager",message:"Package manager:",default:a.packageManager,when:!a.packageManager,choices:["pnpm","npm","yarn"]}]),u=i.template||a.template||"full",r=i.packageManager||a.packageManager||"pnpm";if(console.log(n.default.blue(`
|
|
9
|
+
\u2192 Creating project structure...
|
|
10
|
+
`)),await o.default.ensureDir(s),await M(s,u,t),console.log(n.default.green(`\u2713 Project structure created
|
|
11
|
+
`)),!a.skipInstall){console.log(n.default.blue(`\u2192 Installing dependencies...
|
|
12
|
+
`));try{await(0,f.execa)(r,["install"],{cwd:s,stdio:"inherit"}),console.log(n.default.green(`
|
|
13
|
+
\u2713 Dependencies installed
|
|
14
|
+
`))}catch{console.log(n.default.yellow(`
|
|
15
|
+
\u26A0 Failed to install dependencies
|
|
16
|
+
`)),console.log(n.default.dim(`Run "cd ${t} && ${r} install" manually
|
|
17
|
+
`))}}j(t,r)}async function M(e,a,t){await o.default.ensureDir(l.default.join(e,"apps")),await o.default.ensureDir(l.default.join(e,"packages")),await o.default.ensureDir(l.default.join(e,"claude","commands")),await o.default.ensureDir(l.default.join(e,"claude","rules")),await o.default.ensureDir(l.default.join(e,"claude","hooks")),await o.default.ensureDir(l.default.join(e,"claude","agents")),await o.default.ensureDir(l.default.join(e,"scripts")),await o.default.ensureDir(l.default.join(e,".github","workflows"));let s={name:t,version:"0.1.0",private:!0,description:"Neural Tools workspace",scripts:{build:"pnpm -r build",dev:"pnpm -r --parallel dev",test:"pnpm -r test","generate:mcp":"neural-tools generate mcp","generate:command":"neural-tools generate command","generate:agent":"neural-tools generate agent"},devDependencies:{"@neural-tools/cli":"^0.1.0",typescript:"^5.3.3"},packageManager:"pnpm@8.15.1"};await o.default.writeJSON(l.default.join(e,"package.json"),s,{spaces:2}),await o.default.writeFile(l.default.join(e,"pnpm-workspace.yaml"),`packages:
|
|
156
18
|
- 'apps/*'
|
|
157
19
|
- '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}
|
|
20
|
+
`,"utf-8");let u=`# ${t}
|
|
162
21
|
|
|
163
22
|
AI Toolkit workspace for building MCPs, Claude commands, and AI workflows.
|
|
164
23
|
|
|
@@ -189,10 +48,7 @@ This project uses AI Toolkit to accelerate development:
|
|
|
189
48
|
2. Generate your first MCP: \`pnpm generate:mcp github\`
|
|
190
49
|
3. Build all packages: \`pnpm build\`
|
|
191
50
|
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}
|
|
51
|
+
`;await o.default.writeFile(l.default.join(e,"CLAUDE.md"),u,"utf-8");let r=`# ${t}
|
|
196
52
|
|
|
197
53
|
AI Toolkit workspace for building intelligent productivity tools.
|
|
198
54
|
|
|
@@ -229,10 +85,7 @@ pnpm build
|
|
|
229
85
|
## License
|
|
230
86
|
|
|
231
87
|
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
|
|
88
|
+
`;await o.default.writeFile(l.default.join(e,"README.md"),r,"utf-8"),await o.default.writeFile(l.default.join(e,".gitignore"),`node_modules
|
|
236
89
|
dist
|
|
237
90
|
.DS_Store
|
|
238
91
|
*.log
|
|
@@ -240,11 +93,7 @@ dist
|
|
|
240
93
|
.env.local
|
|
241
94
|
CLAUDE.local.md
|
|
242
95
|
.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 = `---
|
|
96
|
+
`,"utf-8"),a==="full"&&await o.default.writeFile(l.default.join(e,"claude","commands","search-kb.md"),`---
|
|
248
97
|
description: Search the knowledge base
|
|
249
98
|
argument-hint: query
|
|
250
99
|
---
|
|
@@ -256,19 +105,10 @@ Search your vector database for relevant information.
|
|
|
256
105
|
Query: $1
|
|
257
106
|
|
|
258
107
|
Use semantic search to find the most relevant documents and context.
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
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();
|
|
108
|
+
`,"utf-8")}function j(e,a){console.log(n.default.green(n.default.bold(`\u{1F389} Project created successfully!
|
|
109
|
+
`))),console.log(n.default.cyan(`Next steps:
|
|
110
|
+
`)),console.log(n.default.dim(` cd ${e}`)),console.log(n.default.dim(` ${a} generate:mcp github`)),console.log(n.default.dim(` ${a} generate:command search-kb`)),console.log(n.default.dim(` ${a} build
|
|
111
|
+
`)),console.log(n.default.cyan(`Documentation:
|
|
112
|
+
`)),console.log(n.default.dim(` https://ai-toolkit.dev/docs
|
|
113
|
+
`)),console.log(n.default.green(`Happy building! \u2728
|
|
114
|
+
`))}k.parse();
|
package/dist/index.mjs
ADDED
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import o from"path";import n from"fs-extra";import{Command as g}from"commander";import d from"inquirer";import{execa as w}from"execa";import a from"picocolors";var u=new g;u.name("create-neural-tools").description("Create a new Neural Tools workspace").argument("[project-name]","Name of your project").option("-t, --template <template>","Template to use (full, minimal)","full").option("-p, --package-manager <pm>","Package manager (npm, pnpm, yarn)","pnpm").option("--skip-install","Skip dependency installation",!1).action(async(e,t)=>{await f(e,t)});async function f(e,t){console.log(a.cyan(a.bold(`
|
|
3
|
+
\u2728 Neural Tools Project Generator
|
|
4
|
+
`)));let l=e;l||(l=(await d.prompt([{type:"input",name:"projectName",message:"Project name:",default:"my-ai-toolkit",validate:c=>!c||c.trim().length===0?"Project name is required":/^[a-z0-9-]+$/.test(c)?!0:"Project name must be lowercase, alphanumeric with hyphens"}])).projectName),l||(console.log(a.red(`
|
|
5
|
+
\u2717 Project name is required
|
|
6
|
+
`)),process.exit(1));let s=o.resolve(process.cwd(),l);if(await n.pathExists(s)){let{overwrite:r}=await d.prompt([{type:"confirm",name:"overwrite",message:`Directory ${l} already exists. Overwrite?`,default:!1}]);r||(console.log(a.yellow(`
|
|
7
|
+
\u26A0 Cancelled
|
|
8
|
+
`)),process.exit(0)),await n.remove(s)}let m=await d.prompt([{type:"list",name:"template",message:"Choose a template:",default:t.template,when:!t.template,choices:[{name:"Full - Complete toolkit with examples",value:"full"},{name:"Minimal - Basic structure only",value:"minimal"}]},{type:"list",name:"packageManager",message:"Package manager:",default:t.packageManager,when:!t.packageManager,choices:["pnpm","npm","yarn"]}]),p=m.template||t.template||"full",i=m.packageManager||t.packageManager||"pnpm";if(console.log(a.blue(`
|
|
9
|
+
\u2192 Creating project structure...
|
|
10
|
+
`)),await n.ensureDir(s),await k(s,p,l),console.log(a.green(`\u2713 Project structure created
|
|
11
|
+
`)),!t.skipInstall){console.log(a.blue(`\u2192 Installing dependencies...
|
|
12
|
+
`));try{await w(i,["install"],{cwd:s,stdio:"inherit"}),console.log(a.green(`
|
|
13
|
+
\u2713 Dependencies installed
|
|
14
|
+
`))}catch{console.log(a.yellow(`
|
|
15
|
+
\u26A0 Failed to install dependencies
|
|
16
|
+
`)),console.log(a.dim(`Run "cd ${l} && ${i} install" manually
|
|
17
|
+
`))}}h(l,i)}async function k(e,t,l){await n.ensureDir(o.join(e,"apps")),await n.ensureDir(o.join(e,"packages")),await n.ensureDir(o.join(e,"claude","commands")),await n.ensureDir(o.join(e,"claude","rules")),await n.ensureDir(o.join(e,"claude","hooks")),await n.ensureDir(o.join(e,"claude","agents")),await n.ensureDir(o.join(e,"scripts")),await n.ensureDir(o.join(e,".github","workflows"));let s={name:l,version:"0.1.0",private:!0,description:"Neural Tools workspace",scripts:{build:"pnpm -r build",dev:"pnpm -r --parallel dev",test:"pnpm -r test","generate:mcp":"neural-tools generate mcp","generate:command":"neural-tools generate command","generate:agent":"neural-tools generate agent"},devDependencies:{"@neural-tools/cli":"^0.1.0",typescript:"^5.3.3"},packageManager:"pnpm@8.15.1"};await n.writeJSON(o.join(e,"package.json"),s,{spaces:2}),await n.writeFile(o.join(e,"pnpm-workspace.yaml"),`packages:
|
|
18
|
+
- 'apps/*'
|
|
19
|
+
- 'packages/*'
|
|
20
|
+
`,"utf-8");let p=`# ${l}
|
|
21
|
+
|
|
22
|
+
AI Toolkit workspace for building MCPs, Claude commands, and AI workflows.
|
|
23
|
+
|
|
24
|
+
## Project Structure
|
|
25
|
+
|
|
26
|
+
- \`apps/\` - MCP servers and deployable applications
|
|
27
|
+
- \`packages/\` - Reusable libraries and shared code
|
|
28
|
+
- \`claude/\` - Claude Code customizations (commands, rules, agents, hooks)
|
|
29
|
+
- \`scripts/\` - Utility scripts
|
|
30
|
+
|
|
31
|
+
## Coding Standards
|
|
32
|
+
|
|
33
|
+
- Use TypeScript for all code
|
|
34
|
+
- Follow ESM module format
|
|
35
|
+
- Write tests for all public APIs
|
|
36
|
+
- Document complex logic with comments
|
|
37
|
+
|
|
38
|
+
## AI Workflow
|
|
39
|
+
|
|
40
|
+
This project uses AI Toolkit to accelerate development:
|
|
41
|
+
- Generate MCPs: \`npm run generate:mcp <name>\`
|
|
42
|
+
- Generate commands: \`npm run generate:command <name>\`
|
|
43
|
+
- Generate agents: \`npm run generate:agent <name>\`
|
|
44
|
+
|
|
45
|
+
## Getting Started
|
|
46
|
+
|
|
47
|
+
1. Install dependencies: \`pnpm install\`
|
|
48
|
+
2. Generate your first MCP: \`pnpm generate:mcp github\`
|
|
49
|
+
3. Build all packages: \`pnpm build\`
|
|
50
|
+
4. Start development: \`pnpm dev\`
|
|
51
|
+
`;await n.writeFile(o.join(e,"CLAUDE.md"),p,"utf-8");let i=`# ${l}
|
|
52
|
+
|
|
53
|
+
AI Toolkit workspace for building intelligent productivity tools.
|
|
54
|
+
|
|
55
|
+
## Quick Start
|
|
56
|
+
|
|
57
|
+
\`\`\`bash
|
|
58
|
+
# Install dependencies
|
|
59
|
+
pnpm install
|
|
60
|
+
|
|
61
|
+
# Generate a new MCP server
|
|
62
|
+
pnpm generate:mcp my-integration
|
|
63
|
+
|
|
64
|
+
# Generate a Claude command
|
|
65
|
+
pnpm generate:command my-command
|
|
66
|
+
|
|
67
|
+
# Build all packages
|
|
68
|
+
pnpm build
|
|
69
|
+
\`\`\`
|
|
70
|
+
|
|
71
|
+
## What's Included
|
|
72
|
+
|
|
73
|
+
- **MCP Generation**: Create FastMCP servers with one command
|
|
74
|
+
- **Claude Commands**: Custom slash commands for Claude Code
|
|
75
|
+
- **Claude Agents**: Specialized AI agents for your workflows
|
|
76
|
+
- **Vector DB**: Semantic search and caching (Pro)
|
|
77
|
+
- **Cloud Deployment**: AWS/GCP deployment templates (Pro)
|
|
78
|
+
|
|
79
|
+
## Documentation
|
|
80
|
+
|
|
81
|
+
- [AI Toolkit Documentation](https://ai-toolkit.dev/docs)
|
|
82
|
+
- [MCP Documentation](https://modelcontextprotocol.io)
|
|
83
|
+
- [Claude Code Documentation](https://docs.anthropic.com/claude-code)
|
|
84
|
+
|
|
85
|
+
## License
|
|
86
|
+
|
|
87
|
+
MIT
|
|
88
|
+
`;await n.writeFile(o.join(e,"README.md"),i,"utf-8"),await n.writeFile(o.join(e,".gitignore"),`node_modules
|
|
89
|
+
dist
|
|
90
|
+
.DS_Store
|
|
91
|
+
*.log
|
|
92
|
+
.env
|
|
93
|
+
.env.local
|
|
94
|
+
CLAUDE.local.md
|
|
95
|
+
.ai-toolkit
|
|
96
|
+
`,"utf-8"),t==="full"&&await n.writeFile(o.join(e,"claude","commands","search-kb.md"),`---
|
|
97
|
+
description: Search the knowledge base
|
|
98
|
+
argument-hint: query
|
|
99
|
+
---
|
|
100
|
+
|
|
101
|
+
# Search Knowledge Base
|
|
102
|
+
|
|
103
|
+
Search your vector database for relevant information.
|
|
104
|
+
|
|
105
|
+
Query: $1
|
|
106
|
+
|
|
107
|
+
Use semantic search to find the most relevant documents and context.
|
|
108
|
+
`,"utf-8")}function h(e,t){console.log(a.green(a.bold(`\u{1F389} Project created successfully!
|
|
109
|
+
`))),console.log(a.cyan(`Next steps:
|
|
110
|
+
`)),console.log(a.dim(` cd ${e}`)),console.log(a.dim(` ${t} generate:mcp github`)),console.log(a.dim(` ${t} generate:command search-kb`)),console.log(a.dim(` ${t} build
|
|
111
|
+
`)),console.log(a.cyan(`Documentation:
|
|
112
|
+
`)),console.log(a.dim(` https://ai-toolkit.dev/docs
|
|
113
|
+
`)),console.log(a.green(`Happy building! \u2728
|
|
114
|
+
`))}u.parse();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@neural-tools/create",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.6",
|
|
4
4
|
"description": "Scaffold a new Neural Tools workspace",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"url": "https://github.com/MacLeanLuke/neural-tools.git",
|
|
17
17
|
"directory": "packages/create-ai-toolkit"
|
|
18
18
|
},
|
|
19
|
-
"homepage": "https://neural-tools.com",
|
|
19
|
+
"homepage": "https://neural-tools.com/docs/create.html",
|
|
20
20
|
"bugs": {
|
|
21
21
|
"url": "https://github.com/MacLeanLuke/neural-tools/issues"
|
|
22
22
|
},
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"fs-extra": "^11.2.0",
|
|
37
37
|
"picocolors": "^1.0.0",
|
|
38
38
|
"degit": "^2.8.4",
|
|
39
|
-
"@neural-tools/core": "0.1.
|
|
39
|
+
"@neural-tools/core": "0.1.6"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
42
|
"@types/fs-extra": "^11.0.4",
|
|
@@ -48,8 +48,8 @@
|
|
|
48
48
|
"dist"
|
|
49
49
|
],
|
|
50
50
|
"scripts": {
|
|
51
|
-
"build": "
|
|
52
|
-
"dev": "
|
|
51
|
+
"build": "tsup && chmod +x dist/index.js",
|
|
52
|
+
"dev": "tsup --watch",
|
|
53
53
|
"clean": "rm -rf dist",
|
|
54
54
|
"test": "echo 'Tests coming soon'"
|
|
55
55
|
}
|