infernoflow 0.33.1 → 0.34.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/README.md +208 -120
- package/dist/bin/infernoflow.mjs +273 -85
- package/dist/lib/adopters/angular.mjs +128 -1
- package/dist/lib/adopters/css.mjs +111 -1
- package/dist/lib/adopters/react.mjs +104 -1
- package/dist/lib/ai/ideDetection.mjs +31 -1
- package/dist/lib/ai/localProvider.mjs +88 -1
- package/dist/lib/ai/providerRouter.mjs +295 -2
- package/dist/lib/commands/adopt.mjs +869 -20
- package/dist/lib/commands/adoptWizard.mjs +320 -9
- package/dist/lib/commands/agent.mjs +191 -5
- package/dist/lib/commands/ai.mjs +407 -2
- package/dist/lib/commands/ask.mjs +299 -0
- package/dist/lib/commands/audit.mjs +300 -13
- package/dist/lib/commands/changelog.mjs +594 -26
- package/dist/lib/commands/check.mjs +184 -3
- package/dist/lib/commands/ci.mjs +208 -3
- package/dist/lib/commands/claudeMd.mjs +139 -28
- package/dist/lib/commands/cloud.mjs +521 -5
- package/dist/lib/commands/context.mjs +346 -34
- package/dist/lib/commands/coverage.mjs +282 -2
- package/dist/lib/commands/dashboard.mjs +635 -123
- package/dist/lib/commands/demo.mjs +465 -8
- package/dist/lib/commands/diff.mjs +274 -5
- package/dist/lib/commands/docGate.mjs +81 -2
- package/dist/lib/commands/doctor.mjs +321 -3
- package/dist/lib/commands/explain.mjs +438 -8
- package/dist/lib/commands/export.mjs +239 -10
- package/dist/lib/commands/generateSkills.mjs +163 -38
- package/dist/lib/commands/graph.mjs +378 -11
- package/dist/lib/commands/health.mjs +309 -2
- package/dist/lib/commands/impact.mjs +325 -2
- package/dist/lib/commands/implement.mjs +103 -7
- package/dist/lib/commands/init.mjs +545 -23
- package/dist/lib/commands/installCursorHooks.mjs +36 -1
- package/dist/lib/commands/installVsCodeCopilotHooks.mjs +37 -1
- package/dist/lib/commands/link.mjs +342 -2
- package/dist/lib/commands/log.mjs +164 -16
- package/dist/lib/commands/monorepo.mjs +428 -4
- package/dist/lib/commands/notify.mjs +258 -4
- package/dist/lib/commands/onboard.mjs +296 -4
- package/dist/lib/commands/prComment.mjs +361 -2
- package/dist/lib/commands/prImpact.mjs +157 -2
- package/dist/lib/commands/publish.mjs +316 -15
- package/dist/lib/commands/recap.mjs +359 -0
- package/dist/lib/commands/report.mjs +272 -28
- package/dist/lib/commands/review.mjs +223 -9
- package/dist/lib/commands/run.mjs +336 -8
- package/dist/lib/commands/scaffold.mjs +419 -54
- package/dist/lib/commands/scan.mjs +1118 -5
- package/dist/lib/commands/scout.mjs +291 -2
- package/dist/lib/commands/setup.mjs +310 -5
- package/dist/lib/commands/share.mjs +196 -13
- package/dist/lib/commands/snapshot.mjs +383 -3
- package/dist/lib/commands/stability.mjs +293 -2
- package/dist/lib/commands/stats.mjs +402 -0
- package/dist/lib/commands/status.mjs +172 -4
- package/dist/lib/commands/suggest.mjs +563 -21
- package/dist/lib/commands/switch.mjs +310 -9
- package/dist/lib/commands/syncAuto.mjs +96 -1
- package/dist/lib/commands/synthesize.mjs +228 -10
- package/dist/lib/commands/teamSync.mjs +388 -2
- package/dist/lib/commands/test.mjs +363 -6
- package/dist/lib/commands/theme.mjs +195 -18
- package/dist/lib/commands/uninstall.mjs +375 -0
- package/dist/lib/commands/upgrade.mjs +153 -0
- package/dist/lib/commands/version.mjs +282 -2
- package/dist/lib/commands/vibe.mjs +357 -7
- package/dist/lib/commands/watch.mjs +203 -4
- package/dist/lib/commands/why.mjs +358 -4
- package/dist/lib/cursorHooksInstall.mjs +60 -1
- package/dist/lib/draftToolingInstall.mjs +68 -7
- package/dist/lib/git/detect-drift.mjs +208 -4
- package/dist/lib/learning/adapt.mjs +101 -6
- package/dist/lib/learning/observe.mjs +119 -1
- package/dist/lib/learning/patternDetector.mjs +298 -1
- package/dist/lib/learning/profile.mjs +279 -2
- package/dist/lib/learning/skillSynthesizer.mjs +145 -24
- package/dist/lib/templates/index.mjs +131 -1
- package/dist/lib/theme/scanner.mjs +343 -4
- package/dist/lib/ui/errors.mjs +142 -1
- package/dist/lib/ui/output.mjs +72 -6
- package/dist/lib/ui/prompts.mjs +147 -6
- package/dist/lib/vsCodeCopilotHooksInstall.mjs +42 -1
- package/package.json +1 -1
package/dist/bin/infernoflow.mjs
CHANGED
|
@@ -1,21 +1,172 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{readFileSync as d}from"node:fs";import{dirname as m,join as u}from"node:path";import{fileURLToPath as h}from"node:url";import{bold as t,gray as a,red as s}from"../lib/ui/output.mjs";const f=m(h(import.meta.url)),y=JSON.parse(d(u(f,"..","..","package.json"),"utf8")),r=y.version||"0.0.0",c={publish:"Bump version, update changelog, build, npm publish, git commit + push in one shot",diff:"Show what capabilities changed since the last git tag (or any ref)",changelog:"Draft a changelog entry from commits since the last tag",setup:"One command to get fully operational \u2014 detects IDE, inits, installs hooks + MCP",init:"Scaffold inferno/ in your project (or adopt existing project)","install-cursor-hooks":"Install Cursor hooks: draft agent replies to inferno/CONTEXT.draft.md","install-vscode-copilot-hooks":"Install VS Code + Copilot agent hooks (Preview): draft to inferno/CONTEXT.draft.md",check:"Validate contract, capabilities, scenarios, changelog",status:"Show contract health at a glance","pr-impact":"Summarize PR impact on capabilities and docs",sync:"Run deterministic inferno sync flow",run:"One-command detect/propose/apply/validate flow","doc-gate":"Fail if code changed but docs were not updated",suggest:"Generate AI prompt + apply capability updates",implement:"Generate code-agent implementation prompt(s)",context:"Generate AI-ready context for new sessions","generate-skills":"Generate personalised Cursor rules + skill files from your developer profile",synthesize:"Auto-detect workflow patterns and synthesize reusable skills + agents",agent:"Manage and run auto-synthesized agents (list | run | show | delete)",version:"Smart semver bump recommendation based on capability changes (--apply to write)","pr-comment":"Post capability drift analysis as a GitHub PR comment (works in CI automatically)",dashboard:"Launch local web dashboard on localhost:7337 \u2014 live contract health, capabilities, agents","team-sync":"Sync capability contract across a team via a shared git branch (push | pull | status | init)",onboard:"Interactive onboarding wizard for new developers \u2014 explains infernoflow in 5 minutes",cloud:"Sync capability contracts via infernoflow cloud (init | push | pull | status | dashboard)",share:"Generate a public read-only HTML snapshot of your capability contract",watch:"Watch source files and run suggest automatically on save",ci:"CI-native check: GitHub Actions annotations, GitLab code quality, exit codes",notify:"Post capability drift summary to Slack or Discord",report:"Generate a weekly/monthly HTML or Markdown report of capability activity",monorepo:"Manage infernoflow across monorepo packages (init | list | status | diff | sync)",link:"Link capabilities to Jira, Linear, or GitHub Issues tickets",audit:"Classify capabilities by sensitivity (auth, payment, PII, admin) and generate security surface map",scout:"Scan source files for undocumented capabilities not yet in the contract",export:"Export contract to OpenAPI, Backstage catalog-info.yaml, CSV, or Markdown",snapshot:"Save/diff/restore named snapshots of the capability contract",health:"Compute a 0\u2013100 health score across coverage, docs, freshness, completeness, drift",vibe:"Vibe coding mode \u2014 watches files, auto-syncs contract, regenerates context on every save",adopt:"Interactive wizard to adopt infernoflow in an existing project (detect \u2192 review \u2192 wire up)",doctor:"Diagnose your infernoflow setup \u2014 checks Node, git, contract, AI providers, MCP, hooks",coverage:"Map test files to capabilities \u2014 show which caps have test coverage and which don't",review:"AI-powered capability impact review for staged or recent git changes",scan:"Deep AST scan \u2014 reads actual function bodies, extracts calls, DB ops, external services",graph:"Build capability dependency graph \u2014 shows which caps call which, detects breaking changes",stability:"Show solid/liquid stability level for every capability (frozen/stable/experimental)",freeze:"Mark a capability as frozen (solid) \u2014 AI will not modify it without explicit instruction",thaw:"Reset a capability to experimental (liquid) \u2014 free to evolve",why:"Given a file or function name \u2014 show which capability it serves, scenarios, stability, and git history",impact:"Blast radius analysis \u2014 see every cap, scenario, and risk level affected before you change anything",scaffold:"Generate a new capability \u2014 source skeleton, contract registration, and placeholder scenario in one command",explain:"AI narrative about a capability \u2014 what it does, why it exists, what's risky, and what to test",test:"Run registered scenarios for a capability \u2014 auto-generates a smoke harness if no test runner is configured",ai:"Manage AI providers \u2014 setup, status, test connection (subcommands: setup | status | test | clear)",demo:"Interactive walkthrough \u2014 scaffolds a sample project and runs the full capability chain end-to-end",log:"Append to session memory (decisions, gotchas, failed attempts, theme changes) \u2014 what AI can't infer from code",theme:"Scan fonts, colors, and CSS variables \u2014 write inferno/theme.json so AI always matches the design system",switch:"Generate a handoff summary when switching AI agents \u2014 paste into the next session so nothing is lost"},l={publish:async e=>(await import("../lib/commands/publish.mjs")).publishCommand(e),diff:async e=>(await import("../lib/commands/diff.mjs")).diffCommand(e),changelog:async e=>(await import("../lib/commands/changelog.mjs")).changelogCommand(e),setup:async e=>(await import("../lib/commands/setup.mjs")).setupCommand(e),init:async e=>(await import("../lib/commands/init.mjs")).initCommand(e),"install-cursor-hooks":async e=>(await import("../lib/commands/installCursorHooks.mjs")).installCursorHooksCommand(e),"install-vscode-copilot-hooks":async e=>(await import("../lib/commands/installVsCodeCopilotHooks.mjs")).installVsCodeCopilotHooksCommand(e),check:async e=>(await import("../lib/commands/check.mjs")).checkCommand(e),status:async e=>(await import("../lib/commands/status.mjs")).statusCommand(e),"pr-impact":async e=>(await import("../lib/commands/prImpact.mjs")).prImpactCommand(e),sync:async e=>(await import("../lib/commands/syncAuto.mjs")).syncCommand(e),run:async e=>(await import("../lib/commands/run.mjs")).runCommand(e),suggest:async e=>(await import("../lib/commands/suggest.mjs")).suggestCommand(e),implement:async e=>(await import("../lib/commands/implement.mjs")).implementCommand(e),context:async e=>(await import("../lib/commands/context.mjs")).contextCommand(e),"doc-gate":async e=>(await import("../lib/commands/docGate.mjs")).docGateCommand(e),"generate-skills":async e=>(await import("../lib/commands/generateSkills.mjs")).generateSkillsCommand(e),synthesize:async e=>(await import("../lib/commands/synthesize.mjs")).synthesizeCommand(e),agent:async e=>(await import("../lib/commands/agent.mjs")).agentCommand(e),version:async e=>(await import("../lib/commands/version.mjs")).versionCommand(e),"pr-comment":async e=>(await import("../lib/commands/prComment.mjs")).prCommentCommand(e),dashboard:async e=>(await import("../lib/commands/dashboard.mjs")).dashboardCommand(e),"team-sync":async e=>(await import("../lib/commands/teamSync.mjs")).teamSyncCommand(e),onboard:async e=>(await import("../lib/commands/onboard.mjs")).onboardCommand(e),cloud:async e=>(await import("../lib/commands/cloud.mjs")).cloudCommand(e),share:async e=>(await import("../lib/commands/share.mjs")).shareCommand(e),watch:async e=>(await import("../lib/commands/watch.mjs")).watchCommand(e),ci:async e=>(await import("../lib/commands/ci.mjs")).ciCommand(e),notify:async e=>(await import("../lib/commands/notify.mjs")).notifyCommand(e),report:async e=>(await import("../lib/commands/report.mjs")).reportCommand(e),monorepo:async e=>(await import("../lib/commands/monorepo.mjs")).monorepoCommand(e),link:async e=>(await import("../lib/commands/link.mjs")).linkCommand(e),audit:async e=>(await import("../lib/commands/audit.mjs")).auditCommand(e),scout:async e=>(await import("../lib/commands/scout.mjs")).scoutCommand(e),export:async e=>(await import("../lib/commands/export.mjs")).exportCommand(e),snapshot:async e=>(await import("../lib/commands/snapshot.mjs")).snapshotCommand(e),health:async e=>(await import("../lib/commands/health.mjs")).healthCommand(e),vibe:async e=>(await import("../lib/commands/vibe.mjs")).vibeCommand(e),adopt:async e=>(await import("../lib/commands/adoptWizard.mjs")).adoptWizardCommand(e),doctor:async e=>(await import("../lib/commands/doctor.mjs")).doctorCommand(e),coverage:async e=>(await import("../lib/commands/coverage.mjs")).coverageCommand(e),review:async e=>(await import("../lib/commands/review.mjs")).reviewCommand(e),scan:async e=>(await import("../lib/commands/scan.mjs")).scanCommand(e),graph:async e=>(await import("../lib/commands/graph.mjs")).graphCommand(e),stability:async e=>(await import("../lib/commands/stability.mjs")).stabilityCommand(e),freeze:async e=>(await import("../lib/commands/stability.mjs")).freezeCommand(e),thaw:async e=>(await import("../lib/commands/stability.mjs")).thawCommand(e),why:async e=>(await import("../lib/commands/why.mjs")).whyCommand(e),impact:async e=>(await import("../lib/commands/impact.mjs")).impactCommand(e),scaffold:async e=>(await import("../lib/commands/scaffold.mjs")).scaffoldCommand(e),explain:async e=>(await import("../lib/commands/explain.mjs")).explainCommand(e),test:async e=>(await import("../lib/commands/test.mjs")).testCommand(e),ai:async e=>(await import("../lib/commands/ai.mjs")).aiCommand(e),demo:async e=>(await import("../lib/commands/demo.mjs")).demoCommand(e),log:async e=>(await import("../lib/commands/log.mjs")).logCommand(e),theme:async e=>(await import("../lib/commands/theme.mjs")).themeCommand(e),switch:async e=>(await import("../lib/commands/switch.mjs")).switchCommand(e)};function w(){const e=Object.keys(c),n=Math.max(...e.map(i=>i.length),8)+1;return Object.entries(c).map(([i,p])=>` ${i.padEnd(n," ")}${p}`).join(`
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
2
|
+
import { readFileSync } from "node:fs";
|
|
3
|
+
import { dirname, join } from "node:path";
|
|
4
|
+
import { fileURLToPath } from "node:url";
|
|
5
|
+
import { bold, gray, cyan, red } from "../lib/ui/output.mjs";
|
|
6
|
+
|
|
7
|
+
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
8
|
+
// When installed globally: __dirname = .../infernoflow/dist/bin
|
|
9
|
+
// Root package.json lives two levels up at .../infernoflow/package.json
|
|
10
|
+
// npm always includes the root package.json, so this path is always reliable.
|
|
11
|
+
const pkg = JSON.parse(readFileSync(join(__dirname, "..", "..", "package.json"), "utf8"));
|
|
12
|
+
const VERSION = pkg.version || "0.0.0";
|
|
13
|
+
const COMMAND_DESCRIPTIONS = {
|
|
14
|
+
publish: "Bump version, update changelog, build, npm publish, git commit + push in one shot",
|
|
15
|
+
diff: "Show what capabilities changed since the last git tag (or any ref)",
|
|
16
|
+
changelog: "Draft a changelog entry from commits since the last tag",
|
|
17
|
+
setup: "One command to get fully operational — detects IDE, inits, installs hooks + MCP",
|
|
18
|
+
init: "Scaffold inferno/ in your project (or adopt existing project)",
|
|
19
|
+
"install-cursor-hooks": "Install Cursor hooks: draft agent replies to inferno/CONTEXT.draft.md",
|
|
20
|
+
"install-vscode-copilot-hooks":
|
|
21
|
+
"Install VS Code + Copilot agent hooks (Preview): draft to inferno/CONTEXT.draft.md",
|
|
22
|
+
check: "Validate contract, capabilities, scenarios, changelog",
|
|
23
|
+
status: "Show contract health at a glance",
|
|
24
|
+
"pr-impact": "Summarize PR impact on capabilities and docs",
|
|
25
|
+
sync: "Run deterministic inferno sync flow",
|
|
26
|
+
run: "One-command detect/propose/apply/validate flow",
|
|
27
|
+
"doc-gate": "Fail if code changed but docs were not updated",
|
|
28
|
+
suggest: "Generate AI prompt + apply capability updates",
|
|
29
|
+
implement: "Generate code-agent implementation prompt(s)",
|
|
30
|
+
context: "Generate AI-ready context for new sessions",
|
|
31
|
+
"generate-skills": "Generate personalised Cursor rules + skill files from your developer profile",
|
|
32
|
+
synthesize: "Auto-detect workflow patterns and synthesize reusable skills + agents",
|
|
33
|
+
agent: "Manage and run auto-synthesized agents (list | run | show | delete)",
|
|
34
|
+
version: "Smart semver bump recommendation based on capability changes (--apply to write)",
|
|
35
|
+
"pr-comment": "Post capability drift analysis as a GitHub PR comment (works in CI automatically)",
|
|
36
|
+
dashboard: "Launch local web dashboard on localhost:7337 — live contract health, capabilities, agents",
|
|
37
|
+
"team-sync": "Sync capability contract across a team via a shared git branch (push | pull | status | init)",
|
|
38
|
+
onboard: "Interactive onboarding wizard for new developers — explains infernoflow in 5 minutes",
|
|
39
|
+
cloud: "Sync capability contracts via infernoflow cloud (init | push | pull | status | dashboard)",
|
|
40
|
+
share: "Generate a public read-only HTML snapshot of your capability contract",
|
|
41
|
+
watch: "Watch source files and run suggest automatically on save",
|
|
42
|
+
ci: "CI-native check: GitHub Actions annotations, GitLab code quality, exit codes",
|
|
43
|
+
notify: "Post capability drift summary to Slack or Discord",
|
|
44
|
+
report: "Generate a weekly/monthly HTML or Markdown report of capability activity",
|
|
45
|
+
monorepo: "Manage infernoflow across monorepo packages (init | list | status | diff | sync)",
|
|
46
|
+
link: "Link capabilities to Jira, Linear, or GitHub Issues tickets",
|
|
47
|
+
audit: "Classify capabilities by sensitivity (auth, payment, PII, admin) and generate security surface map",
|
|
48
|
+
scout: "Scan source files for undocumented capabilities not yet in the contract",
|
|
49
|
+
export: "Export contract to OpenAPI, Backstage catalog-info.yaml, CSV, or Markdown",
|
|
50
|
+
snapshot: "Save/diff/restore named snapshots of the capability contract",
|
|
51
|
+
health: "Compute a 0–100 health score across coverage, docs, freshness, completeness, drift",
|
|
52
|
+
vibe: "Vibe coding mode — watches files, auto-syncs contract, regenerates context on every save",
|
|
53
|
+
adopt: "Interactive wizard to adopt infernoflow in an existing project (detect → review → wire up)",
|
|
54
|
+
doctor: "Diagnose your infernoflow setup — checks Node, git, contract, AI providers, MCP, hooks",
|
|
55
|
+
coverage: "Map test files to capabilities — show which caps have test coverage and which don't",
|
|
56
|
+
review: "AI-powered capability impact review for staged or recent git changes",
|
|
57
|
+
scan: "Deep AST scan — route discovery, entry point detection, HTTP URL extraction, capability suggestions",
|
|
58
|
+
graph: "Build capability dependency graph — shows which caps call which, detects breaking changes",
|
|
59
|
+
stability: "Show solid/liquid stability level for every capability (frozen/stable/experimental)",
|
|
60
|
+
freeze: "Mark a capability as frozen (solid) — AI will not modify it without explicit instruction",
|
|
61
|
+
thaw: "Reset a capability to experimental (liquid) — free to evolve",
|
|
62
|
+
why: "Given a file or function name — show which capability it serves, scenarios, stability, and git history",
|
|
63
|
+
impact: "Blast radius analysis — see every cap, scenario, and risk level affected before you change anything",
|
|
64
|
+
scaffold: "Generate a new capability — source skeleton, contract registration, and placeholder scenario in one command",
|
|
65
|
+
explain: "AI narrative about a capability — what it does, why it exists, what's risky, and what to test",
|
|
66
|
+
test: "Run registered scenarios for a capability — auto-generates a smoke harness if no test runner is configured",
|
|
67
|
+
ai: "Manage AI providers — setup, status, test connection (subcommands: setup | status | test | clear)",
|
|
68
|
+
demo: "Interactive walkthrough — scaffolds a sample project and runs the full capability chain end-to-end",
|
|
69
|
+
log: "Append to session memory (decisions, gotchas, failed attempts, theme changes) — what AI can't infer from code",
|
|
70
|
+
theme: "Scan fonts, colors, and CSS variables — write inferno/theme.json so AI always matches the design system",
|
|
71
|
+
switch: "Generate a handoff summary when switching AI agents — paste into the next session so nothing is lost",
|
|
72
|
+
upgrade: "Upgrade a lite infernoflow setup to the full structure (scenarios, changelog, scripts)",
|
|
73
|
+
stats: "Value dashboard — session memory, tokens injected per session, coverage %, estimated savings",
|
|
74
|
+
ask: "Query session memory — search gotchas, decisions, and failed attempts by keyword or type",
|
|
75
|
+
recap: "End-of-session summary — what was captured, what git changes weren't logged, session health score",
|
|
76
|
+
uninstall: "Remove infernoflow from a project — inferno/, CLAUDE.md, MCP server, git hooks (--dry-run to preview)",
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
const COMMAND_HANDLERS = {
|
|
80
|
+
publish: async (args) => (await import("../lib/commands/publish.mjs")).publishCommand(args),
|
|
81
|
+
diff: async (args) => (await import("../lib/commands/diff.mjs")).diffCommand(args),
|
|
82
|
+
changelog: async (args) => (await import("../lib/commands/changelog.mjs")).changelogCommand(args),
|
|
83
|
+
setup: async (args) => (await import("../lib/commands/setup.mjs")).setupCommand(args),
|
|
84
|
+
init: async (args) => (await import("../lib/commands/init.mjs")).initCommand(args),
|
|
85
|
+
"install-cursor-hooks": async (args) =>
|
|
86
|
+
(await import("../lib/commands/installCursorHooks.mjs")).installCursorHooksCommand(args),
|
|
87
|
+
"install-vscode-copilot-hooks": async (args) =>
|
|
88
|
+
(await import("../lib/commands/installVsCodeCopilotHooks.mjs")).installVsCodeCopilotHooksCommand(args),
|
|
89
|
+
check: async (args) => (await import("../lib/commands/check.mjs")).checkCommand(args),
|
|
90
|
+
status: async (args) => (await import("../lib/commands/status.mjs")).statusCommand(args),
|
|
91
|
+
"pr-impact": async (args) => (await import("../lib/commands/prImpact.mjs")).prImpactCommand(args),
|
|
92
|
+
sync: async (args) => (await import("../lib/commands/syncAuto.mjs")).syncCommand(args),
|
|
93
|
+
run: async (args) => (await import("../lib/commands/run.mjs")).runCommand(args),
|
|
94
|
+
suggest: async (args) => (await import("../lib/commands/suggest.mjs")).suggestCommand(args),
|
|
95
|
+
implement: async (args) => (await import("../lib/commands/implement.mjs")).implementCommand(args),
|
|
96
|
+
context: async (args) => (await import("../lib/commands/context.mjs")).contextCommand(args),
|
|
97
|
+
"doc-gate": async (args) => (await import("../lib/commands/docGate.mjs")).docGateCommand(args),
|
|
98
|
+
"generate-skills": async (args) => (await import("../lib/commands/generateSkills.mjs")).generateSkillsCommand(args),
|
|
99
|
+
synthesize: async (args) => (await import("../lib/commands/synthesize.mjs")).synthesizeCommand(args),
|
|
100
|
+
agent: async (args) => (await import("../lib/commands/agent.mjs")).agentCommand(args),
|
|
101
|
+
version: async (args) => (await import("../lib/commands/version.mjs")).versionCommand(args),
|
|
102
|
+
"pr-comment": async (args) => (await import("../lib/commands/prComment.mjs")).prCommentCommand(args),
|
|
103
|
+
dashboard: async (args) => (await import("../lib/commands/dashboard.mjs")).dashboardCommand(args),
|
|
104
|
+
"team-sync": async (args) => (await import("../lib/commands/teamSync.mjs")).teamSyncCommand(args),
|
|
105
|
+
onboard: async (args) => (await import("../lib/commands/onboard.mjs")).onboardCommand(args),
|
|
106
|
+
cloud: async (args) => (await import("../lib/commands/cloud.mjs")).cloudCommand(args),
|
|
107
|
+
share: async (args) => (await import("../lib/commands/share.mjs")).shareCommand(args),
|
|
108
|
+
watch: async (args) => (await import("../lib/commands/watch.mjs")).watchCommand(args),
|
|
109
|
+
ci: async (args) => (await import("../lib/commands/ci.mjs")).ciCommand(args),
|
|
110
|
+
notify: async (args) => (await import("../lib/commands/notify.mjs")).notifyCommand(args),
|
|
111
|
+
report: async (args) => (await import("../lib/commands/report.mjs")).reportCommand(args),
|
|
112
|
+
monorepo: async (args) => (await import("../lib/commands/monorepo.mjs")).monorepoCommand(args),
|
|
113
|
+
link: async (args) => (await import("../lib/commands/link.mjs")).linkCommand(args),
|
|
114
|
+
audit: async (args) => (await import("../lib/commands/audit.mjs")).auditCommand(args),
|
|
115
|
+
scout: async (args) => (await import("../lib/commands/scout.mjs")).scoutCommand(args),
|
|
116
|
+
export: async (args) => (await import("../lib/commands/export.mjs")).exportCommand(args),
|
|
117
|
+
snapshot: async (args) => (await import("../lib/commands/snapshot.mjs")).snapshotCommand(args),
|
|
118
|
+
health: async (args) => (await import("../lib/commands/health.mjs")).healthCommand(args),
|
|
119
|
+
vibe: async (args) => (await import("../lib/commands/vibe.mjs")).vibeCommand(args),
|
|
120
|
+
adopt: async (args) => (await import("../lib/commands/adoptWizard.mjs")).adoptWizardCommand(args),
|
|
121
|
+
doctor: async (args) => (await import("../lib/commands/doctor.mjs")).doctorCommand(args),
|
|
122
|
+
coverage: async (args) => (await import("../lib/commands/coverage.mjs")).coverageCommand(args),
|
|
123
|
+
review: async (args) => (await import("../lib/commands/review.mjs")).reviewCommand(args),
|
|
124
|
+
scan: async (args) => (await import("../lib/commands/scan.mjs")).scanCommand(args),
|
|
125
|
+
graph: async (args) => (await import("../lib/commands/graph.mjs")).graphCommand(args),
|
|
126
|
+
stability: async (args) => (await import("../lib/commands/stability.mjs")).stabilityCommand(args),
|
|
127
|
+
freeze: async (args) => (await import("../lib/commands/stability.mjs")).freezeCommand(args),
|
|
128
|
+
thaw: async (args) => (await import("../lib/commands/stability.mjs")).thawCommand(args),
|
|
129
|
+
why: async (args) => (await import("../lib/commands/why.mjs")).whyCommand(args),
|
|
130
|
+
impact: async (args) => (await import("../lib/commands/impact.mjs")).impactCommand(args),
|
|
131
|
+
scaffold: async (args) => (await import("../lib/commands/scaffold.mjs")).scaffoldCommand(args),
|
|
132
|
+
explain: async (args) => (await import("../lib/commands/explain.mjs")).explainCommand(args),
|
|
133
|
+
test: async (args) => (await import("../lib/commands/test.mjs")).testCommand(args),
|
|
134
|
+
ai: async (args) => (await import("../lib/commands/ai.mjs")).aiCommand(args),
|
|
135
|
+
demo: async (args) => (await import("../lib/commands/demo.mjs")).demoCommand(args),
|
|
136
|
+
log: async (args) => (await import("../lib/commands/log.mjs")).logCommand(args),
|
|
137
|
+
theme: async (args) => (await import("../lib/commands/theme.mjs")).themeCommand(args),
|
|
138
|
+
switch: async (args) => (await import("../lib/commands/switch.mjs")).switchCommand(args),
|
|
139
|
+
upgrade: async (args) => (await import("../lib/commands/upgrade.mjs")).upgradeCommand(args),
|
|
140
|
+
stats: async (args) => (await import("../lib/commands/stats.mjs")).statsCommand(args),
|
|
141
|
+
ask: async (args) => (await import("../lib/commands/ask.mjs")).askCommand(args),
|
|
142
|
+
recap: async (args) => (await import("../lib/commands/recap.mjs")).recapCommand(args),
|
|
143
|
+
uninstall: async (args) => (await import("../lib/commands/uninstall.mjs")).uninstallCommand(args),
|
|
144
|
+
};
|
|
145
|
+
|
|
146
|
+
function formatCommandsHelp() {
|
|
147
|
+
const names = Object.keys(COMMAND_DESCRIPTIONS);
|
|
148
|
+
const w = Math.max(...names.map((n) => n.length), 8) + 1;
|
|
149
|
+
return Object.entries(COMMAND_DESCRIPTIONS)
|
|
150
|
+
.map(([name, desc]) => ` ${name.padEnd(w, " ")}${desc}`)
|
|
151
|
+
.join("\n");
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
const HELP = `
|
|
155
|
+
${bold("🔥 infernoflow")} ${gray("v" + VERSION)}
|
|
156
|
+
${gray("The forge for liquid code — keep every AI session in sync")}
|
|
157
|
+
|
|
158
|
+
${bold("Usage:")}
|
|
8
159
|
infernoflow <command> [options]
|
|
9
160
|
|
|
10
|
-
${
|
|
11
|
-
${
|
|
161
|
+
${bold("Commands:")}
|
|
162
|
+
${formatCommandsHelp()}
|
|
12
163
|
|
|
13
|
-
${
|
|
164
|
+
${bold("diff options:")}
|
|
14
165
|
--ref <tag|commit> Compare against a specific ref (default: last git tag)
|
|
15
166
|
--summary One-liner count only
|
|
16
167
|
--json Machine-readable output
|
|
17
168
|
|
|
18
|
-
${
|
|
169
|
+
${bold("changelog options:")}
|
|
19
170
|
update Draft ## Unreleased from commits (default sub-command)
|
|
20
171
|
show Print the current ## Unreleased block
|
|
21
172
|
list List commits since last tag
|
|
@@ -26,7 +177,7 @@ ${w()}
|
|
|
26
177
|
--append Append to existing ## Unreleased instead of replacing
|
|
27
178
|
--json Machine-readable output
|
|
28
179
|
|
|
29
|
-
${
|
|
180
|
+
${bold("publish options:")}
|
|
30
181
|
--bump patch|minor|major Version bump type (default: patch)
|
|
31
182
|
--skip-build Skip the build step
|
|
32
183
|
--skip-tests Skip smoke tests
|
|
@@ -35,13 +186,13 @@ ${w()}
|
|
|
35
186
|
--dry-run Print all steps without executing
|
|
36
187
|
--yes, -y Non-interactive (skip confirmation prompt)
|
|
37
188
|
|
|
38
|
-
${
|
|
189
|
+
${bold("setup options:")}
|
|
39
190
|
--yes, -y Skip prompts (non-interactive)
|
|
40
191
|
--force, -f Overwrite existing hook files
|
|
41
192
|
|
|
42
|
-
${
|
|
43
|
-
--cursor-hooks Also install Cursor hooks (draft
|
|
44
|
-
--vscode-copilot-hooks Also install VS Code + Copilot hooks (.github/hooks
|
|
193
|
+
${bold("init options:")}
|
|
194
|
+
--cursor-hooks Also install Cursor hooks (draft → inferno/CONTEXT.draft.md)
|
|
195
|
+
--vscode-copilot-hooks Also install VS Code + Copilot hooks (.github/hooks — Preview)
|
|
45
196
|
--adopt Infer capabilities from an existing codebase
|
|
46
197
|
--lang <name> Override detected language (e.g. ts, js, py)
|
|
47
198
|
--framework <name> Override detected framework (e.g. react, angular, express)
|
|
@@ -52,13 +203,13 @@ ${w()}
|
|
|
52
203
|
--yes, -y Skip prompts and accept inferred/default values
|
|
53
204
|
--force, -f Overwrite existing inferno/ files
|
|
54
205
|
|
|
55
|
-
${
|
|
206
|
+
${bold("install-cursor-hooks options:")}
|
|
56
207
|
--force, -f Overwrite .cursor/hooks.json and hook scripts if they exist
|
|
57
208
|
|
|
58
|
-
${
|
|
209
|
+
${bold("install-vscode-copilot-hooks options:")}
|
|
59
210
|
--force, -f Overwrite .github/hooks/infernoflow-drafts.json and scripts if they exist
|
|
60
211
|
|
|
61
|
-
${
|
|
212
|
+
${bold("context options:")}
|
|
62
213
|
--intent "..." What you plan to build next
|
|
63
214
|
--working "..." What you are building right now
|
|
64
215
|
--decision "..." Record a decision or note
|
|
@@ -70,39 +221,39 @@ ${w()}
|
|
|
70
221
|
--auto-commit Watch mode: commit CONTEXT.md to git on every change
|
|
71
222
|
--auto-push Watch mode: commit + push CONTEXT.md on every change
|
|
72
223
|
|
|
73
|
-
${
|
|
224
|
+
${bold("generate-skills options:")}
|
|
74
225
|
--cursor Also install rules to .cursor/rules/infernoflow.md
|
|
75
226
|
--force, -f Overwrite existing generated skill files
|
|
76
227
|
|
|
77
|
-
${
|
|
228
|
+
${bold("implement options:")}
|
|
78
229
|
--mode <type> cursor | generic | both (default: both)
|
|
79
230
|
--copy, -c Copy generated prompt(s) to clipboard
|
|
80
231
|
|
|
81
|
-
${
|
|
232
|
+
${bold("run options:")}
|
|
82
233
|
--dry-run Execute full flow without writing files
|
|
83
234
|
--json Emit machine-readable events and result payload
|
|
84
235
|
--no-rollback Keep changes even if validation fails
|
|
85
236
|
--provider <type> auto | agent | local | prompt (default: auto)
|
|
86
237
|
--ide <name> auto | cursor | vscode | windsurf (default: auto)
|
|
87
238
|
|
|
88
|
-
${
|
|
89
|
-
${
|
|
90
|
-
${
|
|
91
|
-
${
|
|
92
|
-
${
|
|
93
|
-
${
|
|
239
|
+
${bold("Typical workflow:")}
|
|
240
|
+
${gray('1. infernoflow context --intent "what I want to build"')}
|
|
241
|
+
${gray("2. [paste inferno/CONTEXT.md into Claude / Cursor / Copilot]")}
|
|
242
|
+
${gray("3. [build the feature]")}
|
|
243
|
+
${gray('4. infernoflow suggest "what I built"')}
|
|
244
|
+
${gray("5. infernoflow check")}
|
|
94
245
|
|
|
95
|
-
${
|
|
246
|
+
${bold("suggest options:")}
|
|
96
247
|
--json Non-interactive: emit prompt as JSON, no readline prompts
|
|
97
248
|
--response <json|@file> Provide AI response directly (use with --json)
|
|
98
249
|
--apply Apply the response changes when using --json --response
|
|
99
250
|
|
|
100
|
-
${
|
|
251
|
+
${bold("version options:")}
|
|
101
252
|
--ref <tag|commit> Compare against a specific ref (default: last git tag)
|
|
102
253
|
--apply Write recommended version bump to package.json
|
|
103
254
|
--json Machine-readable output
|
|
104
255
|
|
|
105
|
-
${
|
|
256
|
+
${bold("pr-comment options:")}
|
|
106
257
|
--pr <number> PR number to comment on (auto-detected in GitHub Actions)
|
|
107
258
|
--repo <owner/repo> GitHub repository (auto-detected in GitHub Actions)
|
|
108
259
|
--token <ghp_...> GitHub token (auto-detected from GITHUB_TOKEN env var)
|
|
@@ -110,83 +261,83 @@ ${w()}
|
|
|
110
261
|
--dry-run Print the comment without posting it
|
|
111
262
|
--json Machine-readable output
|
|
112
263
|
|
|
113
|
-
${
|
|
264
|
+
${bold("cloud sub-commands:")}
|
|
114
265
|
init Generate a project token and configure cloud sync
|
|
115
266
|
push Upload local capability contract to cloud
|
|
116
267
|
pull Download latest contract from cloud (conflict detection)
|
|
117
268
|
status Compare local vs cloud (hashes, capability counts)
|
|
118
269
|
dashboard Print hosted dashboard URL and open in browser
|
|
119
270
|
|
|
120
|
-
${
|
|
271
|
+
${bold("cloud options:")}
|
|
121
272
|
--token <tok> Override token (or set INFERNOFLOW_TOKEN env var)
|
|
122
273
|
--endpoint <url> Override default endpoint (https://cloud.infernoflow.dev)
|
|
123
274
|
--force, -f Overwrite on init; overwrite local on conflicted pull
|
|
124
275
|
--dry-run Print what would happen without sending
|
|
125
276
|
--json Machine-readable output
|
|
126
277
|
|
|
127
|
-
${
|
|
278
|
+
${bold("share options:")}
|
|
128
279
|
--upload Upload to dpaste.com and print a public URL
|
|
129
280
|
--open Open the snapshot in your browser immediately
|
|
130
281
|
--copy Copy HTML to clipboard
|
|
131
282
|
--out <path> Custom output path (default: inferno/share.html)
|
|
132
283
|
--json Machine-readable: { ok, file, url }
|
|
133
284
|
|
|
134
|
-
${
|
|
285
|
+
${bold("watch options:")}
|
|
135
286
|
[dirs...] Directories to watch (default: src/, lib/, app/)
|
|
136
287
|
--interval <secs> Debounce interval in seconds (default: 3)
|
|
137
288
|
--dry-run Print what would run without executing
|
|
138
289
|
--silent No output (for git hook use)
|
|
139
290
|
|
|
140
|
-
${
|
|
291
|
+
${bold("notify options:")}
|
|
141
292
|
--slack <url> Slack incoming webhook URL
|
|
142
293
|
--discord <url> Discord webhook URL
|
|
143
294
|
--on-change Only notify if capabilities actually changed
|
|
144
295
|
--dry-run Print message without sending
|
|
145
296
|
--json Machine-readable result
|
|
146
297
|
|
|
147
|
-
${
|
|
298
|
+
${bold("report options:")}
|
|
148
299
|
--format html|md Output format (default: html)
|
|
149
300
|
--since <period> 7d, 30d, 90d, or YYYY-MM-DD (default: 30d)
|
|
150
301
|
--out <path> Output file path (default: inferno/report.html)
|
|
151
302
|
--open Open HTML report in browser after generating
|
|
152
303
|
--json Machine-readable summary
|
|
153
304
|
|
|
154
|
-
${
|
|
305
|
+
${bold("ci options:")}
|
|
155
306
|
--platform <name> github | gitlab | bitbucket | generic (auto-detected)
|
|
156
307
|
--fail-on <level> error | warning (default: error)
|
|
157
308
|
--json Machine-readable result + exit code
|
|
158
309
|
|
|
159
|
-
${
|
|
310
|
+
${bold("monorepo sub-commands:")}
|
|
160
311
|
init Run infernoflow init --adopt in every package
|
|
161
312
|
list List detected packages with their capability counts
|
|
162
313
|
status Show contract health across all packages
|
|
163
314
|
diff Show capability changes across packages (--package to filter)
|
|
164
315
|
sync Aggregate all contracts into inferno-monorepo.json
|
|
165
316
|
|
|
166
|
-
${
|
|
317
|
+
${bold("monorepo options:")}
|
|
167
318
|
--package <name> Filter to a specific package
|
|
168
319
|
--json Machine-readable output
|
|
169
320
|
|
|
170
|
-
${
|
|
321
|
+
${bold("link sub-commands:")}
|
|
171
322
|
(default) Link a capability to a ticket
|
|
172
|
-
list Show all capability
|
|
323
|
+
list Show all capability→ticket links
|
|
173
324
|
status Show linked and unlinked capabilities
|
|
174
325
|
remove Remove a link by capability ID
|
|
175
326
|
|
|
176
|
-
${
|
|
327
|
+
${bold("link options:")}
|
|
177
328
|
--capability <id> Capability to link
|
|
178
329
|
--jira <TICKET> Jira ticket ID (e.g. PROJ-123)
|
|
179
330
|
--linear <ID> Linear issue ID
|
|
180
331
|
--github <NUM> GitHub issue number
|
|
181
332
|
--json Machine-readable output
|
|
182
333
|
|
|
183
|
-
${
|
|
334
|
+
${bold("audit options:")}
|
|
184
335
|
--format text|json|html Output format (default: text)
|
|
185
336
|
--out <path> Save to file (default: prints to stdout)
|
|
186
337
|
--fail-on high|medium Exit 1 if unreviewed caps at given severity exist
|
|
187
338
|
--json Machine-readable output
|
|
188
339
|
|
|
189
|
-
${
|
|
340
|
+
${bold("vibe options:")}
|
|
190
341
|
--dir <dirs> Comma-separated directories to watch (default: auto-detected)
|
|
191
342
|
--no-suggest Disable automatic contract sync on file save
|
|
192
343
|
--no-context Disable CONTEXT.md regeneration
|
|
@@ -194,30 +345,30 @@ ${w()}
|
|
|
194
345
|
--port <n> Also run a mini status dashboard on localhost:<n>
|
|
195
346
|
--silent Suppress all terminal output (pure background mode)
|
|
196
347
|
|
|
197
|
-
${
|
|
348
|
+
${bold("adopt options:")}
|
|
198
349
|
--dir <dirs> Source directories to scan (default: src,lib,app,api,routes,controllers)
|
|
199
350
|
--yes, -y Auto-approve all candidates (non-interactive)
|
|
200
351
|
--json Machine-readable output, implies --yes
|
|
201
352
|
|
|
202
|
-
${
|
|
353
|
+
${bold("init --template options:")}
|
|
203
354
|
--template rest-api REST API (Express/Fastify/Hono) starter
|
|
204
355
|
--template nextjs Next.js fullstack app starter
|
|
205
356
|
--template cli CLI tool (Node.js/Python) starter
|
|
206
357
|
--template graphql GraphQL API (Apollo/Pothos) starter
|
|
207
358
|
--template monorepo Monorepo workspace starter
|
|
208
359
|
|
|
209
|
-
${
|
|
360
|
+
${bold("scout options:")}
|
|
210
361
|
--dir <dirs> Comma-separated directories to scan (default: src,lib,app,api,routes)
|
|
211
362
|
--apply Write discovered capabilities to the contract file
|
|
212
363
|
--min-confidence <0-1> Minimum confidence threshold (default: 0.6)
|
|
213
364
|
--json Machine-readable output
|
|
214
365
|
|
|
215
|
-
${
|
|
366
|
+
${bold("export options:")}
|
|
216
367
|
--format openapi|backstage|csv|markdown|json Output format (required)
|
|
217
368
|
--out <path> Output file path (default: project root, auto-named)
|
|
218
369
|
--json Machine-readable summary
|
|
219
370
|
|
|
220
|
-
${
|
|
371
|
+
${bold("snapshot sub-commands:")}
|
|
221
372
|
save <name> Save current contract as a named snapshot
|
|
222
373
|
list List all snapshots
|
|
223
374
|
show <name> Print a snapshot's capabilities
|
|
@@ -225,62 +376,63 @@ ${w()}
|
|
|
225
376
|
restore <name> Overwrite contract with snapshot contents
|
|
226
377
|
delete <name> Delete a snapshot
|
|
227
378
|
|
|
228
|
-
${
|
|
379
|
+
${bold("snapshot options:")}
|
|
229
380
|
--json Machine-readable output
|
|
230
381
|
|
|
231
|
-
${
|
|
382
|
+
${bold("health options:")}
|
|
232
383
|
--fail-below <score> Exit 1 if health score is below this threshold (CI gate)
|
|
233
384
|
--watch Re-run every 30s (live terminal view)
|
|
234
385
|
--interval <secs> Watch interval in seconds (default: 30)
|
|
235
386
|
--json Machine-readable score + breakdown
|
|
236
387
|
|
|
237
|
-
${
|
|
388
|
+
${bold("doctor options:")}
|
|
238
389
|
--fix Auto-fix common issues (installs hooks, runs init, etc.)
|
|
239
390
|
--json Machine-readable list of pass/warn/fail results
|
|
240
391
|
|
|
241
|
-
${
|
|
392
|
+
${bold("coverage options:")}
|
|
242
393
|
--dir <path> Extra directory to scan for test files (repeatable)
|
|
243
394
|
--threshold <0-1> Minimum fuzzy-match score to count a test (default: 0.25)
|
|
244
395
|
--fail-below <pct> Exit 1 if coverage percentage is below this value (CI gate)
|
|
245
396
|
--json Machine-readable coverage breakdown
|
|
246
397
|
|
|
247
|
-
${
|
|
398
|
+
${bold("scan options:")}
|
|
248
399
|
--dir <path> Extra directory to scan (repeatable)
|
|
249
400
|
--capability <id> Scan and enrich a single capability only
|
|
401
|
+
--suggest, -s Show untracked entry points as new capability candidates
|
|
250
402
|
--dry-run Print results without writing files
|
|
251
|
-
--json Machine-readable scan output
|
|
403
|
+
--json Machine-readable scan output (includes discovered routes)
|
|
252
404
|
|
|
253
|
-
${
|
|
405
|
+
${bold("graph options:")}
|
|
254
406
|
--cap <id> Show dependency view for a single capability
|
|
255
407
|
--check Exit 1 if breaking dependency changes detected (CI gate)
|
|
256
408
|
--json Machine-readable graph output
|
|
257
409
|
|
|
258
|
-
${
|
|
410
|
+
${bold("stability / freeze / thaw options:")}
|
|
259
411
|
infernoflow stability List all capabilities with their stability level
|
|
260
412
|
infernoflow freeze <id> Mark capability as frozen (AI won't touch it)
|
|
261
413
|
infernoflow freeze <id> --stable Mark as stable (careful, not forbidden)
|
|
262
|
-
infernoflow thaw <id> Reset to experimental (liquid
|
|
414
|
+
infernoflow thaw <id> Reset to experimental (liquid — free to change)
|
|
263
415
|
--json Machine-readable stability list
|
|
264
416
|
|
|
265
|
-
${
|
|
417
|
+
${bold("review options:")}
|
|
266
418
|
--unstaged Review all working-tree changes (not just staged)
|
|
267
419
|
--last Review last commit (git diff HEAD~1)
|
|
268
|
-
--dry-run Print the AI prompt only
|
|
420
|
+
--dry-run Print the AI prompt only — no API call made
|
|
269
421
|
--json Machine-readable output (affectedCaps, summary, provider)
|
|
270
422
|
|
|
271
|
-
${
|
|
423
|
+
${bold("why options:")}
|
|
272
424
|
infernoflow why <file> Show capability for a source file
|
|
273
425
|
infernoflow why <functionName> Show capability for a function name
|
|
274
426
|
--function <name> Filter to a specific function when multiple caps match
|
|
275
427
|
--json Machine-readable output
|
|
276
428
|
|
|
277
|
-
${
|
|
429
|
+
${bold("impact options:")}
|
|
278
430
|
infernoflow impact <cap-id> Show blast radius for a capability
|
|
279
431
|
--depth <n> Max transitive depth to traverse (default: 10)
|
|
280
432
|
--check Exit 1 if risk level is HIGH or CRITICAL (CI gate)
|
|
281
433
|
--json Machine-readable output
|
|
282
434
|
|
|
283
|
-
${
|
|
435
|
+
${bold("scaffold options:")}
|
|
284
436
|
infernoflow scaffold <cap-id> Generate a new capability skeleton
|
|
285
437
|
--dir <path> Output directory for the source file (default: auto-detected)
|
|
286
438
|
--lang ts|js|py|go Language override (default: auto-detected from project)
|
|
@@ -288,12 +440,12 @@ ${w()}
|
|
|
288
440
|
--dry-run Preview what would be generated without writing files
|
|
289
441
|
--json Machine-readable output including generated code
|
|
290
442
|
|
|
291
|
-
${
|
|
443
|
+
${bold("explain options:")}
|
|
292
444
|
infernoflow explain <cap-id> AI narrative: what it does, risk, what to test
|
|
293
|
-
--dry-run Print the AI prompt only
|
|
445
|
+
--dry-run Print the AI prompt only — no API call made
|
|
294
446
|
--json Machine-readable output (narrative, stability, scenarios)
|
|
295
447
|
|
|
296
|
-
${
|
|
448
|
+
${bold("test options:")}
|
|
297
449
|
infernoflow test Run all caps that have registered scenarios
|
|
298
450
|
infernoflow test <cap-id> Run scenarios for a specific capability
|
|
299
451
|
infernoflow test --all Run every capability (including those without scenarios)
|
|
@@ -302,30 +454,66 @@ ${w()}
|
|
|
302
454
|
--verbose, -v Show runner output for each scenario
|
|
303
455
|
--json Machine-readable output (passed/failed/skipped counts)
|
|
304
456
|
|
|
305
|
-
${
|
|
306
|
-
infernoflow ai setup Interactive wizard
|
|
457
|
+
${bold("ai options:")}
|
|
458
|
+
infernoflow ai setup Interactive wizard — pick provider, enter API key, verify
|
|
307
459
|
infernoflow ai status Show all providers and which are configured
|
|
308
460
|
infernoflow ai test [provider] Send a test prompt and verify the connection
|
|
309
461
|
infernoflow ai clear <provider> Remove a provider's config from integrations.json
|
|
310
462
|
Supported providers: anthropic openai gemini openrouter ollama
|
|
311
463
|
|
|
312
|
-
${
|
|
464
|
+
${bold("demo options:")}
|
|
313
465
|
infernoflow demo Full interactive walkthrough (sample e-commerce project)
|
|
314
|
-
infernoflow demo --fast Skip pauses
|
|
466
|
+
infernoflow demo --fast Skip pauses — good for CI or screen recording
|
|
315
467
|
infernoflow demo --no-cleanup Keep the temp demo project after the run
|
|
316
468
|
|
|
317
|
-
${
|
|
318
|
-
${
|
|
319
|
-
${
|
|
320
|
-
${
|
|
321
|
-
${
|
|
322
|
-
${
|
|
323
|
-
${
|
|
324
|
-
${
|
|
325
|
-
${
|
|
326
|
-
${
|
|
327
|
-
${
|
|
328
|
-
`;
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
469
|
+
${bold("Machine output:")}
|
|
470
|
+
${gray("status --json")}
|
|
471
|
+
${gray("check --json")}
|
|
472
|
+
${gray("doc-gate --json")}
|
|
473
|
+
${gray("pr-impact --json")}
|
|
474
|
+
${gray("sync --auto --json")}
|
|
475
|
+
${gray('run "task" --json')}
|
|
476
|
+
${gray('suggest "what changed" --json')}
|
|
477
|
+
${gray('suggest "what changed" --json --response \'{"newCapabilities":[...]}\' --apply')}
|
|
478
|
+
${gray("version --json")}
|
|
479
|
+
${gray("version --apply")}
|
|
480
|
+
`;
|
|
481
|
+
|
|
482
|
+
// ── Silent behavior observation ───────────────────────────────────────────
|
|
483
|
+
import * as fs from "node:fs";
|
|
484
|
+
import * as path from "node:path";
|
|
485
|
+
try {
|
|
486
|
+
const infernoDir = path.join(process.cwd(), "inferno");
|
|
487
|
+
if (fs.existsSync(infernoDir)) {
|
|
488
|
+
const { observeCommandStart } = await import("../lib/learning/observe.mjs");
|
|
489
|
+
const cmdForObserve = process.argv[2];
|
|
490
|
+
if (cmdForObserve && !cmdForObserve.startsWith("-")) {
|
|
491
|
+
observeCommandStart(infernoDir, cmdForObserve);
|
|
492
|
+
}
|
|
493
|
+
}
|
|
494
|
+
} catch {}
|
|
495
|
+
|
|
496
|
+
const [, , cmd, ...rest] = process.argv;
|
|
497
|
+
|
|
498
|
+
if (!cmd || cmd === "--help" || cmd === "-h") {
|
|
499
|
+
console.log(HELP);
|
|
500
|
+
process.exit(0);
|
|
501
|
+
}
|
|
502
|
+
if (cmd === "--version" || cmd === "-v") {
|
|
503
|
+
console.log(VERSION);
|
|
504
|
+
process.exit(0);
|
|
505
|
+
}
|
|
506
|
+
|
|
507
|
+
const commands = Object.keys(COMMAND_HANDLERS);
|
|
508
|
+
|
|
509
|
+
if (!commands.includes(cmd)) {
|
|
510
|
+
console.error(red(`\nUnknown command: ${cmd}`));
|
|
511
|
+
console.error(gray("Run: infernoflow --help\n"));
|
|
512
|
+
process.exit(1);
|
|
513
|
+
}
|
|
514
|
+
|
|
515
|
+
const args = [cmd, ...rest];
|
|
516
|
+
COMMAND_HANDLERS[cmd](args).catch((err) => {
|
|
517
|
+
console.error(red("\nError: ") + err.message);
|
|
518
|
+
process.exit(1);
|
|
519
|
+
});
|