task-o-matic 0.0.26 → 0.0.28
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/commands/init.js +14 -14
- package/dist/commands/prd.js +100 -0
- package/dist/commands/workflow.d.ts.map +1 -1
- package/dist/commands/workflow.js +274 -100
- package/dist/lib/ai-service/ai-operations.d.ts +4 -0
- package/dist/lib/ai-service/ai-operations.d.ts.map +1 -1
- package/dist/lib/ai-service/ai-operations.js +4 -0
- package/dist/lib/ai-service/json-parser.js +8 -3
- package/dist/lib/ai-service/prd-operations.d.ts +12 -1
- package/dist/lib/ai-service/prd-operations.d.ts.map +1 -1
- package/dist/lib/ai-service/prd-operations.js +134 -0
- package/dist/lib/better-t-stack-cli.d.ts +0 -4
- package/dist/lib/better-t-stack-cli.d.ts.map +1 -1
- package/dist/lib/better-t-stack-cli.js +32 -37
- package/dist/lib/bootstrap/index.d.ts +0 -1
- package/dist/lib/bootstrap/index.d.ts.map +1 -1
- package/dist/lib/bootstrap/index.js +0 -1
- package/dist/lib/prompt-registry.d.ts.map +1 -1
- package/dist/lib/prompt-registry.js +23 -0
- package/dist/prompts/index.d.ts +1 -0
- package/dist/prompts/index.d.ts.map +1 -1
- package/dist/prompts/index.js +1 -0
- package/dist/prompts/prd-suggest-stack.d.ts +3 -0
- package/dist/prompts/prd-suggest-stack.d.ts.map +1 -0
- package/dist/prompts/prd-suggest-stack.js +99 -0
- package/dist/services/prd.d.ts +18 -1
- package/dist/services/prd.d.ts.map +1 -1
- package/dist/services/prd.js +85 -0
- package/dist/types/index.d.ts +32 -15
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/options.d.ts +3 -1
- package/dist/types/options.d.ts.map +1 -1
- package/dist/types/results.d.ts +29 -1
- package/dist/types/results.d.ts.map +1 -1
- package/dist/types/workflow-options.d.ts +6 -1
- package/dist/types/workflow-options.d.ts.map +1 -1
- package/dist/utils/file-utils.d.ts +35 -0
- package/dist/utils/file-utils.d.ts.map +1 -1
- package/dist/utils/file-utils.js +54 -0
- package/package.json +2 -2
- package/dist/lib/bootstrap/opentui-bootstrap.d.ts +0 -11
- package/dist/lib/bootstrap/opentui-bootstrap.d.ts.map +0 -1
- package/dist/lib/bootstrap/opentui-bootstrap.js +0 -342
package/dist/commands/init.js
CHANGED
|
@@ -13,7 +13,7 @@ const config_1 = require("../lib/config");
|
|
|
13
13
|
const progress_1 = require("../cli/display/progress");
|
|
14
14
|
const task_o_matic_error_1 = require("../utils/task-o-matic-error");
|
|
15
15
|
const better_t_stack_cli_1 = require("../lib/better-t-stack-cli");
|
|
16
|
-
exports.initCommand = new commander_1.Command("init").description("Initialize task-o-matic project and bootstrap projects (web/native/cli
|
|
16
|
+
exports.initCommand = new commander_1.Command("init").description("Initialize task-o-matic project and bootstrap projects (web/native/cli)");
|
|
17
17
|
// Initialize task-o-matic project
|
|
18
18
|
exports.initCommand
|
|
19
19
|
.command("init")
|
|
@@ -26,7 +26,7 @@ exports.initCommand
|
|
|
26
26
|
.option("--temperature <temp>", "AI temperature", "0.5")
|
|
27
27
|
.option("--no-bootstrap", "Skip bootstrap after initialization")
|
|
28
28
|
.option("--project-name <name>", "Project name for bootstrap")
|
|
29
|
-
.option("--frontend <frontends...>", "Frontend framework(s) - space/comma-separated (next, native-bare, cli,
|
|
29
|
+
.option("--frontend <frontends...>", "Frontend framework(s) - space/comma-separated (next, native-bare, cli, etc.)", "next")
|
|
30
30
|
.option("--backend <backend>", "Backend framework for bootstrap", "convex")
|
|
31
31
|
.option("--database <database>", "Database for bootstrap")
|
|
32
32
|
.option("--auth <auth>", "Authentication for bootstrap", "better-auth")
|
|
@@ -36,7 +36,6 @@ exports.initCommand
|
|
|
36
36
|
.option("--runtime <runtime>", "Runtime (bun/node)", "node")
|
|
37
37
|
.option("--payment <payment>", "Payment provider (none/polar)", "none")
|
|
38
38
|
.option("--cli-deps <level>", "CLI dependency level (minimal/standard/full/task-o-matic)", "standard")
|
|
39
|
-
.option("--tui-framework <framework>", "TUI framework (solid/vue/react)", "solid")
|
|
40
39
|
.action(async (options) => {
|
|
41
40
|
// Handle directory creation/setup first
|
|
42
41
|
if (options.directory) {
|
|
@@ -147,15 +146,17 @@ async function initializeProjectStructure(options) {
|
|
|
147
146
|
// Bootstrap project with Better-T-Stack
|
|
148
147
|
exports.initCommand
|
|
149
148
|
.command("bootstrap")
|
|
150
|
-
.description("Bootstrap a new project (web/native/cli
|
|
149
|
+
.description("Bootstrap a new project (web/native/cli)")
|
|
151
150
|
.argument("<name>", "Project name")
|
|
152
|
-
.option("--frontend <frontends...>", "Frontend framework(s) - space/comma-separated (next, native-bare, cli,
|
|
153
|
-
.option("--backend <backend>", "Backend framework (hono/express/elysia)", "hono")
|
|
154
|
-
.option("--database <database>", "Database (sqlite/postgres/mysql/mongodb)", "sqlite")
|
|
155
|
-
.option("--orm <orm>", "ORM (drizzle/prisma/none)", "drizzle")
|
|
151
|
+
.option("--frontend <frontends...>", "Frontend framework(s) - space/comma-separated (next, native-bare, cli, etc.)", "next")
|
|
152
|
+
.option("--backend <backend>", "Backend framework (hono/express/fastify/elysia/convex/self/none)", "hono")
|
|
153
|
+
.option("--database <database>", "Database (sqlite/postgres/mysql/mongodb/none)", "sqlite")
|
|
154
|
+
.option("--orm <orm>", "ORM (drizzle/prisma/mongoose/none)", "drizzle")
|
|
155
|
+
.option("--auth <auth>", "Authentication (better-auth/clerk/none)", "better-auth")
|
|
156
156
|
.option("--no-auth", "Exclude authentication")
|
|
157
|
-
.option("--addons <addons
|
|
158
|
-
.option("--examples <examples
|
|
157
|
+
.option("--addons <addons...>", "Addons (turborepo/pwa/tauri/biome/husky/starlight/fumadocs/ultracite/oxlint/ruler/opentui/wxt)")
|
|
158
|
+
.option("--examples <examples...>", "Examples to include (todo/ai)")
|
|
159
|
+
.option("--template <template>", "Use a predefined template (mern/pern/t3/uniwind/none)")
|
|
159
160
|
.option("--no-git", "Skip git initialization")
|
|
160
161
|
.option("--package-manager <pm>", "Package manager (npm/pnpm/bun)", "npm")
|
|
161
162
|
.option("--no-install", "Skip installing dependencies")
|
|
@@ -164,7 +165,6 @@ exports.initCommand
|
|
|
164
165
|
.option("--api <type>", "API type (trpc/orpc)")
|
|
165
166
|
.option("--payment <payment>", "Payment provider (none/polar)", "none")
|
|
166
167
|
.option("--cli-deps <level>", "CLI dependency level (minimal/standard/full/task-o-matic)", "standard")
|
|
167
|
-
.option("--tui-framework <framework>", "TUI framework (solid/vue/react)", "solid")
|
|
168
168
|
.action(async (name, options) => {
|
|
169
169
|
const taskOMaticDir = config_1.configManager.getTaskOMaticDir();
|
|
170
170
|
if (!(0, fs_1.existsSync)(taskOMaticDir)) {
|
|
@@ -216,7 +216,7 @@ exports.initCommand.action(() => {
|
|
|
216
216
|
console.log(" task-o-matic init init --project-name my-app");
|
|
217
217
|
console.log("");
|
|
218
218
|
console.log(" # Web + Native + CLI + TUI (monorepo):");
|
|
219
|
-
console.log(
|
|
219
|
+
console.log(' task-o-matic init init --project-name my-app --frontend "next native-uniwind cli tui" --backend hono');
|
|
220
220
|
console.log("");
|
|
221
221
|
console.log(" # CLI only:");
|
|
222
222
|
console.log(" task-o-matic init init --project-name my-cli --frontend cli --cli-deps full");
|
|
@@ -225,10 +225,10 @@ exports.initCommand.action(() => {
|
|
|
225
225
|
console.log(" task-o-matic init init --project-name my-tui --frontend tui --tui-framework solid");
|
|
226
226
|
console.log("");
|
|
227
227
|
console.log(" # Web + Native (monorepo):");
|
|
228
|
-
console.log(
|
|
228
|
+
console.log(' task-o-matic init init --project-name my-app --frontend "next native-bare" --backend hono');
|
|
229
229
|
console.log("");
|
|
230
230
|
console.log(" # Multiple web frontends:");
|
|
231
|
-
console.log(
|
|
231
|
+
console.log(' task-o-matic init init --project-name my-app --frontend "next tanstack-router" --backend hono');
|
|
232
232
|
console.log("");
|
|
233
233
|
console.log(" # No bootstrap:");
|
|
234
234
|
console.log(" task-o-matic init init --project-name my-app --no-bootstrap");
|
package/dist/commands/prd.js
CHANGED
|
@@ -642,3 +642,103 @@ exports.prdCommand
|
|
|
642
642
|
process.exit(1);
|
|
643
643
|
}
|
|
644
644
|
});
|
|
645
|
+
// Get recommended technology stack from PRD
|
|
646
|
+
exports.prdCommand
|
|
647
|
+
.command("get-stack")
|
|
648
|
+
.description("Suggest optimal technology stack based on PRD analysis")
|
|
649
|
+
.option("--file <path>", "Path to PRD file")
|
|
650
|
+
.option("--content <text>", "PRD content as string (mutually exclusive with --file)")
|
|
651
|
+
.option("--project-name <name>", "Project name (inferred from PRD if not provided)")
|
|
652
|
+
.option("--save", "Save suggested stack to .task-o-matic/stack.json")
|
|
653
|
+
.option("--output <path>", "Custom output path (implies --save)")
|
|
654
|
+
.option("--json", "Output result as JSON")
|
|
655
|
+
.option("--prompt <prompt>", "Override prompt")
|
|
656
|
+
.option("--message <message>", "User message")
|
|
657
|
+
.option("--ai-provider <provider>", "AI provider override")
|
|
658
|
+
.option("--ai-model <model>", "AI model override")
|
|
659
|
+
.option("--ai-key <key>", "AI API key override")
|
|
660
|
+
.option("--ai-provider-url <url>", "AI provider URL override")
|
|
661
|
+
.option("--ai-reasoning <tokens>", "Enable reasoning for OpenRouter models (max reasoning tokens)")
|
|
662
|
+
.option("--stream", "Show streaming AI output")
|
|
663
|
+
.option("--tools", "Enable filesystem tools for project analysis")
|
|
664
|
+
.action(async (options) => {
|
|
665
|
+
try {
|
|
666
|
+
const workingDirectory = process.cwd();
|
|
667
|
+
const streamingOptions = (0, streaming_options_1.createStreamingOptions)(options.stream, "Analyzing");
|
|
668
|
+
const result = await prd_1.prdService.suggestStack({
|
|
669
|
+
file: options.file,
|
|
670
|
+
content: options.content,
|
|
671
|
+
projectName: options.projectName,
|
|
672
|
+
output: options.output,
|
|
673
|
+
workingDirectory,
|
|
674
|
+
enableFilesystemTools: options.tools,
|
|
675
|
+
save: options.save || !!options.output,
|
|
676
|
+
aiOptions: {
|
|
677
|
+
aiProvider: options.aiProvider,
|
|
678
|
+
aiModel: options.aiModel,
|
|
679
|
+
aiKey: options.aiKey,
|
|
680
|
+
aiProviderUrl: options.aiProviderUrl,
|
|
681
|
+
aiReasoning: options.aiReasoning,
|
|
682
|
+
},
|
|
683
|
+
promptOverride: options.prompt,
|
|
684
|
+
messageOverride: options.message,
|
|
685
|
+
streamingOptions,
|
|
686
|
+
callbacks: {
|
|
687
|
+
onProgress: progress_1.displayProgress,
|
|
688
|
+
onError: progress_1.displayError,
|
|
689
|
+
},
|
|
690
|
+
});
|
|
691
|
+
console.log("");
|
|
692
|
+
if (options.json) {
|
|
693
|
+
// JSON output mode
|
|
694
|
+
console.log(JSON.stringify({
|
|
695
|
+
stack: result.stack,
|
|
696
|
+
reasoning: result.reasoning,
|
|
697
|
+
savedPath: result.savedPath,
|
|
698
|
+
stats: result.stats,
|
|
699
|
+
}, null, 2));
|
|
700
|
+
}
|
|
701
|
+
else {
|
|
702
|
+
// Human-readable output
|
|
703
|
+
console.log(chalk_1.default.green("✓ Suggested Technology Stack\n"));
|
|
704
|
+
const stack = result.stack;
|
|
705
|
+
console.log(chalk_1.default.cyan("Project: ") + chalk_1.default.bold(stack.projectName));
|
|
706
|
+
console.log(chalk_1.default.cyan("Frontend: ") +
|
|
707
|
+
(Array.isArray(stack.frontend)
|
|
708
|
+
? stack.frontend.join(", ")
|
|
709
|
+
: stack.frontend));
|
|
710
|
+
console.log(chalk_1.default.cyan("Backend: ") + stack.backend);
|
|
711
|
+
console.log(chalk_1.default.cyan("Database: ") + stack.database);
|
|
712
|
+
console.log(chalk_1.default.cyan("ORM: ") + stack.orm);
|
|
713
|
+
console.log(chalk_1.default.cyan("API: ") + stack.api);
|
|
714
|
+
console.log(chalk_1.default.cyan("Auth: ") + stack.auth);
|
|
715
|
+
console.log(chalk_1.default.cyan("Payments: ") + stack.payments);
|
|
716
|
+
console.log(chalk_1.default.cyan("Runtime: ") + stack.runtime);
|
|
717
|
+
console.log(chalk_1.default.cyan("DB Setup: ") + stack.dbSetup);
|
|
718
|
+
console.log(chalk_1.default.cyan("Pkg Manager: ") + stack.packageManager);
|
|
719
|
+
console.log(chalk_1.default.cyan("Web Deploy: ") + stack.webDeploy);
|
|
720
|
+
console.log(chalk_1.default.cyan("Server Deploy: ") + stack.serverDeploy);
|
|
721
|
+
console.log(chalk_1.default.cyan("Addons: ") +
|
|
722
|
+
(stack.addons.length > 0 ? stack.addons.join(", ") : "none"));
|
|
723
|
+
console.log(chalk_1.default.cyan("Examples: ") +
|
|
724
|
+
(stack.examples.length > 0 ? stack.examples.join(", ") : "none"));
|
|
725
|
+
console.log(chalk_1.default.blue("\nReasoning:"));
|
|
726
|
+
console.log(chalk_1.default.dim(" " + result.reasoning.split("\n").join("\n ")));
|
|
727
|
+
console.log(chalk_1.default.blue("\nStats:"));
|
|
728
|
+
console.log(chalk_1.default.cyan(` Duration: ${result.stats.duration}ms`));
|
|
729
|
+
if (result.stats.tokenUsage) {
|
|
730
|
+
console.log(chalk_1.default.cyan(` Tokens: ${result.stats.tokenUsage.total}`));
|
|
731
|
+
}
|
|
732
|
+
if (result.stats.timeToFirstToken) {
|
|
733
|
+
console.log(chalk_1.default.cyan(` TTFT: ${result.stats.timeToFirstToken}ms`));
|
|
734
|
+
}
|
|
735
|
+
if (result.savedPath) {
|
|
736
|
+
console.log(chalk_1.default.green(`\n✓ Saved to: ${result.savedPath}`));
|
|
737
|
+
}
|
|
738
|
+
}
|
|
739
|
+
}
|
|
740
|
+
catch (error) {
|
|
741
|
+
(0, progress_1.displayError)(error);
|
|
742
|
+
process.exit(1);
|
|
743
|
+
}
|
|
744
|
+
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workflow.d.ts","sourceRoot":"","sources":["../../src/commands/workflow.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"workflow.d.ts","sourceRoot":"","sources":["../../src/commands/workflow.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAmCpC,eAAO,MAAM,eAAe,SAwQxB,CAAC"}
|