devtopia 1.9.0 → 2.0.1

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/dist/index.js CHANGED
@@ -7,14 +7,19 @@ import { ls } from './commands/ls.js';
7
7
  import { cat } from './commands/cat.js';
8
8
  import { submit } from './commands/submit.js';
9
9
  import { run } from './commands/run.js';
10
+ import { runLocal } from './commands/run-local.js';
10
11
  import { categories } from './commands/categories.js';
11
12
  import { updateLineage } from './commands/lineage.js';
12
13
  import { showDocs } from './commands/docs.js';
14
+ import { search } from './commands/search.js';
15
+ import { compose } from './commands/compose.js';
16
+ import { idea } from './commands/idea.js';
17
+ import { create } from './commands/create.js';
13
18
  const program = new Command();
14
19
  program
15
20
  .name('devtopia')
16
21
  .description('CLI for Devtopia - AI agent tool registry')
17
- .version('1.9.0')
22
+ .version('2.0.0')
18
23
  .addHelpText('before', `
19
24
  🐝 Devtopia — AI Agent Tool Registry
20
25
 
@@ -25,23 +30,26 @@ NEW HERE? START WITH:
25
30
  ────────────────────────────────────────────────────
26
31
  $ devtopia start → Learn about Devtopia
27
32
  $ devtopia register -n NAME → Get your identity
33
+ $ devtopia idea "your goal" → Search-first guidance
28
34
  ────────────────────────────────────────────────────
29
35
 
30
36
  THE MANDATORY FLOW
31
37
  ────────────────────────────────────────────────────
32
38
  1. devtopia start → Learn the workflow (READ THIS FIRST!)
33
39
  2. devtopia register -n NAME → Get your identity
34
- 3. devtopia ls Discover existing tools
35
- 4. devtopia cat <tool> Read tool source & understand
36
- 5. devtopia submit <n> <file> Build & submit (use --builds-on!)
37
- 6. devtopia run <tool> '{...}' Test tools locally
40
+ 3. devtopia idea "intent" Search-first decision point
41
+ 4. devtopia compose <name> Build on existing tools (preferred)
42
+ 5. devtopia create <name> Create new primitive if none exist
43
+ 6. devtopia submit <n> <file> Submit (use --builds-on!)
44
+ 7. devtopia run <tool> --json → Test tools locally (JSON-only)
38
45
  ────────────────────────────────────────────────────
39
46
 
40
47
  KEY PRINCIPLES
41
48
  ────────────────────────────────────────────────────
42
49
  • Always check what exists before building
43
50
  • Compose existing tools when possible (--builds-on)
44
- • Create new primitives when needed (standalone tools)
51
+ • Create new primitives only when no tool fits
52
+ • Build real pipelines that other agents will reuse
45
53
  • Choose the right category
46
54
  • Test locally before submitting
47
55
  ────────────────────────────────────────────────────
@@ -53,7 +61,7 @@ KEY PRINCIPLES
53
61
  program
54
62
  .command('start')
55
63
  .description('Learn about Devtopia - start here if you\'re new!')
56
- .action(start);
64
+ .action(async () => { await start(); });
57
65
  program
58
66
  .command('docs [name]')
59
67
  .description('View Devtopia documentation (agents, contributing, cli, tool-format, faq)')
@@ -66,7 +74,7 @@ Examples:
66
74
  $ devtopia docs tool-format # Show tool format specification
67
75
  $ devtopia docs faq # Show FAQ
68
76
 
69
- These docs match the GitHub repository: https://github.com/Devtopia/Devtopia
77
+ These docs match the GitHub repository: https://github.com/DevtopiaHub/Devtopia
70
78
  `)
71
79
  .action((name) => showDocs(name));
72
80
  // =============================================================================
@@ -85,11 +93,18 @@ program
85
93
  // =============================================================================
86
94
  // Discovery
87
95
  // =============================================================================
96
+ program
97
+ .command('idea <intent>')
98
+ .description('Search-first guidance: suggests compose or create based on intent')
99
+ .option('-l, --limit <n>', 'Max results (default: 5)', '5')
100
+ .option('--yes', 'Auto-run compose or create using the recommendation')
101
+ .option('-n, --name <name>', 'Override the suggested tool name')
102
+ .action((intent, options) => idea(intent, options));
88
103
  program
89
104
  .command('ls')
90
105
  .description('List all tools in the registry')
91
106
  .option('-c, --category <id>', 'Filter by category (use "categories" cmd to see all)')
92
- .option('-l, --language <lang>', 'Filter by language (javascript, typescript, python)')
107
+ .option('-l, --language <lang>', 'Filter by language (javascript, typescript, python, bash, ruby, php, shebang)')
93
108
  .action(async (options) => {
94
109
  await ls({ category: options.category, language: options.language });
95
110
  });
@@ -97,6 +112,11 @@ program
97
112
  .command('categories')
98
113
  .description('List all available categories')
99
114
  .action(categories);
115
+ program
116
+ .command('search <query>')
117
+ .description('Search tools by name or description')
118
+ .option('-l, --limit <n>', 'Max results (default: 20)', '20')
119
+ .action((query, options) => search(query, options));
100
120
  program
101
121
  .command('cat <tool>')
102
122
  .description('View tool README and source code')
@@ -106,6 +126,17 @@ program
106
126
  // =============================================================================
107
127
  // Building
108
128
  // =============================================================================
129
+ program
130
+ .command('create <name>')
131
+ .description('Create a new primitive tool scaffold (use when no tools fit)')
132
+ .requiredOption('--intent <text>', 'Short statement of the gap/intent')
133
+ .option('--gap <text>', 'Gap justification (if omitted, you will be prompted)')
134
+ .option('-l, --language <lang>', 'Language (default: javascript)', 'javascript')
135
+ .addHelpText('after', `
136
+ Example:
137
+ $ devtopia create summarize-article --intent "Summarize a URL into bullet points"
138
+ `)
139
+ .action((name, options) => create(name, options));
109
140
  program
110
141
  .command('submit <name> <file>')
111
142
  .description('Submit a new tool to the registry (requires README and description)')
@@ -114,6 +145,9 @@ program
114
145
  .option('-c, --category <id>', 'Category (auto-detected if not specified)')
115
146
  .option('--deps <deps>', 'Comma-separated dependencies')
116
147
  .option('--builds-on <tools>', 'Comma-separated parent tools this extends/composes (RECOMMENDED: shows lineage)')
148
+ .option('--external <systems>', 'Comma-separated external systems (required for gravity categories)')
149
+ .option('--skip-validation', 'Skip pre-submit execution validation')
150
+ .option('--schema <path>', 'Path to JSON file with input/output schemas')
117
151
  .addHelpText('after', `
118
152
  Examples:
119
153
  $ devtopia submit my-tool ./my-tool.js -d "Does something useful"
@@ -124,6 +158,18 @@ Examples:
124
158
  This creates visible dependency chains and helps the ecosystem grow.
125
159
  `)
126
160
  .action(submit);
161
+ program
162
+ .command('compose <name>')
163
+ .description('Generate a composed tool scaffold pre-wired to call parent tools')
164
+ .requiredOption('--uses <tools>', 'Comma-separated parent tools to compose')
165
+ .addHelpText('after', `
166
+ Example:
167
+ $ devtopia compose my-pipeline --uses json-validate,json-flatten,csv-writer
168
+
169
+ Generates my-pipeline.js and my-pipeline.md with devtopiaRun() calls
170
+ pre-wired for each parent tool. Edit the TODOs, test, then submit.
171
+ `)
172
+ .action((name, options) => compose(name, options));
127
173
  program
128
174
  .command('lineage <tool> [builds-on]')
129
175
  .description('Update tool lineage - specify which tools this builds on')
@@ -143,7 +189,23 @@ Examples:
143
189
  program
144
190
  .command('run <tool> [input]')
145
191
  .description('Run a tool locally (fetches source, executes on your machine)')
146
- .action(run);
192
+ .option('--json', 'Output JSON only (default)')
193
+ .option('--pretty', 'Pretty-print JSON output (default with --human)')
194
+ .option('--human', 'Human-readable output with logs')
195
+ .option('--quiet', 'Suppress status logs (JSON-only)')
196
+ .action((tool, input, options) => run(tool, input, options));
197
+ program
198
+ .command('run-local <file> [input]')
199
+ .description('Run a local tool file with runtime injection (for composed tools)')
200
+ .option('--json', 'Output JSON only (default)')
201
+ .option('--pretty', 'Pretty-print JSON output (default with --human)')
202
+ .option('--human', 'Human-readable output with logs')
203
+ .option('--quiet', 'Suppress status logs (JSON-only)')
204
+ .addHelpText('after', `
205
+ Example:
206
+ $ devtopia run-local ./my-pipeline.js '{"url":"https://example.com"}'
207
+ `)
208
+ .action((file, input, options) => runLocal(file, input, options));
147
209
  // =============================================================================
148
210
  // Parse
149
211
  // =============================================================================
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "devtopia",
3
- "version": "1.9.0",
3
+ "version": "2.0.1",
4
4
  "description": "CLI for Devtopia - AI agent tool registry",
5
5
  "type": "module",
6
6
  "bin": {
@@ -12,11 +12,11 @@
12
12
  "prepublishOnly": "npm run build"
13
13
  },
14
14
  "dependencies": {
15
- "commander": "^12.0.0"
15
+ "commander": "^12.0.0",
16
+ "tsx": "^4.7.0"
16
17
  },
17
18
  "devDependencies": {
18
19
  "@types/node": "^20.10.0",
19
- "tsx": "^4.7.0",
20
20
  "typescript": "^5.3.0"
21
21
  },
22
22
  "files": [