kirograph 0.17.0 → 0.19.0
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 +1 -1
- package/README.md +103 -1822
- package/dist/architecture/layers/dart.js +112 -0
- package/dist/architecture/layers/dart.js.map +7 -0
- package/dist/architecture/layers/index.js +3 -1
- package/dist/architecture/layers/index.js.map +2 -2
- package/dist/bin/banner.js +74 -6
- package/dist/bin/banner.js.map +2 -2
- package/dist/bin/commands/attack-surface.js +157 -0
- package/dist/bin/commands/attack-surface.js.map +7 -0
- package/dist/bin/commands/benchmark.js +206 -0
- package/dist/bin/commands/benchmark.js.map +7 -0
- package/dist/bin/commands/budget.js +70 -0
- package/dist/bin/commands/budget.js.map +7 -0
- package/dist/bin/commands/communities.js +77 -0
- package/dist/bin/commands/communities.js.map +7 -0
- package/dist/bin/commands/dep-confusion.js +119 -0
- package/dist/bin/commands/dep-confusion.js.map +7 -0
- package/dist/bin/commands/export.js +304 -10
- package/dist/bin/commands/export.js.map +2 -2
- package/dist/bin/commands/flows.js +97 -0
- package/dist/bin/commands/flows.js.map +7 -0
- package/dist/bin/commands/help.js +382 -101
- package/dist/bin/commands/help.js.map +2 -2
- package/dist/bin/commands/install.js +90 -8
- package/dist/bin/commands/install.js.map +2 -2
- package/dist/bin/commands/licenses.js +201 -0
- package/dist/bin/commands/licenses.js.map +7 -0
- package/dist/bin/commands/reachability.js +160 -0
- package/dist/bin/commands/reachability.js.map +7 -0
- package/dist/bin/commands/read.js +100 -0
- package/dist/bin/commands/read.js.map +7 -0
- package/dist/bin/commands/refactor.js +116 -0
- package/dist/bin/commands/refactor.js.map +7 -0
- package/dist/bin/commands/remediation.js +133 -0
- package/dist/bin/commands/remediation.js.map +7 -0
- package/dist/bin/commands/sbom.js +76 -0
- package/dist/bin/commands/sbom.js.map +7 -0
- package/dist/bin/commands/security-ci-report.js +267 -0
- package/dist/bin/commands/security-ci-report.js.map +7 -0
- package/dist/bin/commands/security-export.js +1349 -0
- package/dist/bin/commands/security-export.js.map +7 -0
- package/dist/bin/commands/security-flows.js +126 -0
- package/dist/bin/commands/security-flows.js.map +7 -0
- package/dist/bin/commands/security-secrets.js +170 -0
- package/dist/bin/commands/security-secrets.js.map +7 -0
- package/dist/bin/commands/security.js +193 -0
- package/dist/bin/commands/security.js.map +7 -0
- package/dist/bin/commands/staleness.js +144 -0
- package/dist/bin/commands/staleness.js.map +7 -0
- package/dist/bin/commands/status.js +102 -2
- package/dist/bin/commands/status.js.map +2 -2
- package/dist/bin/commands/supply-chain.js +138 -0
- package/dist/bin/commands/supply-chain.js.map +7 -0
- package/dist/bin/commands/uninit.js +109 -60
- package/dist/bin/commands/uninit.js.map +2 -2
- package/dist/bin/commands/vex.js +76 -0
- package/dist/bin/commands/vex.js.map +7 -0
- package/dist/bin/commands/vuln-suppress.js +95 -0
- package/dist/bin/commands/vuln-suppress.js.map +7 -0
- package/dist/bin/commands/vulns.js +382 -0
- package/dist/bin/commands/vulns.js.map +7 -0
- package/dist/bin/installer/auto-detect.js +125 -0
- package/dist/bin/installer/auto-detect.js.map +7 -0
- package/dist/bin/installer/cli-agent.js +28 -5
- package/dist/bin/installer/cli-agent.js.map +2 -2
- package/dist/bin/installer/common.js +47 -0
- package/dist/bin/installer/common.js.map +2 -2
- package/dist/bin/installer/config-prompt.js +12 -1
- package/dist/bin/installer/config-prompt.js.map +2 -2
- package/dist/bin/installer/detect.js +309 -0
- package/dist/bin/installer/detect.js.map +7 -0
- package/dist/bin/installer/index.js +9 -1
- package/dist/bin/installer/index.js.map +2 -2
- package/dist/bin/installer/instructions.js +195 -3
- package/dist/bin/installer/instructions.js.map +2 -2
- package/dist/bin/installer/steering.js +407 -0
- package/dist/bin/installer/steering.js.map +2 -2
- package/dist/bin/installer/targets/aider.js +3 -3
- package/dist/bin/installer/targets/aider.js.map +2 -2
- package/dist/bin/installer/targets/amp.js +3 -3
- package/dist/bin/installer/targets/amp.js.map +2 -2
- package/dist/bin/installer/targets/antigravity.js +35 -6
- package/dist/bin/installer/targets/antigravity.js.map +2 -2
- package/dist/bin/installer/targets/augment.js +3 -3
- package/dist/bin/installer/targets/augment.js.map +2 -2
- package/dist/bin/installer/targets/claude.js +49 -5
- package/dist/bin/installer/targets/claude.js.map +2 -2
- package/dist/bin/installer/targets/cline.js +32 -6
- package/dist/bin/installer/targets/cline.js.map +2 -2
- package/dist/bin/installer/targets/codex.js +64 -12
- package/dist/bin/installer/targets/codex.js.map +2 -2
- package/dist/bin/installer/targets/continue.js +2 -2
- package/dist/bin/installer/targets/continue.js.map +2 -2
- package/dist/bin/installer/targets/copilot-cli.js +101 -0
- package/dist/bin/installer/targets/copilot-cli.js.map +7 -0
- package/dist/bin/installer/targets/copilot.js +31 -5
- package/dist/bin/installer/targets/copilot.js.map +2 -2
- package/dist/bin/installer/targets/cursor.js +4 -4
- package/dist/bin/installer/targets/cursor.js.map +2 -2
- package/dist/bin/installer/targets/devin.js +2 -2
- package/dist/bin/installer/targets/devin.js.map +2 -2
- package/dist/bin/installer/targets/gemini-cli.js +2 -2
- package/dist/bin/installer/targets/gemini-cli.js.map +2 -2
- package/dist/bin/installer/targets/generic.js +2 -14
- package/dist/bin/installer/targets/generic.js.map +2 -2
- package/dist/bin/installer/targets/goose.js +3 -3
- package/dist/bin/installer/targets/goose.js.map +2 -2
- package/dist/bin/installer/targets/index.js +250 -0
- package/dist/bin/installer/targets/index.js.map +2 -2
- package/dist/bin/installer/targets/junie.js +2 -2
- package/dist/bin/installer/targets/junie.js.map +2 -2
- package/dist/bin/installer/targets/kilo.js +2 -2
- package/dist/bin/installer/targets/kilo.js.map +2 -2
- package/dist/bin/installer/targets/kiro.js +3 -3
- package/dist/bin/installer/targets/kiro.js.map +2 -2
- package/dist/bin/installer/targets/opencode.js +2 -2
- package/dist/bin/installer/targets/opencode.js.map +2 -2
- package/dist/bin/installer/targets/openhands.js +3 -3
- package/dist/bin/installer/targets/openhands.js.map +2 -2
- package/dist/bin/installer/targets/qoder.js +91 -0
- package/dist/bin/installer/targets/qoder.js.map +7 -0
- package/dist/bin/installer/targets/qwen.js +96 -0
- package/dist/bin/installer/targets/qwen.js.map +7 -0
- package/dist/bin/installer/targets/replit.js +3 -3
- package/dist/bin/installer/targets/replit.js.map +2 -2
- package/dist/bin/installer/targets/roo.js +2 -2
- package/dist/bin/installer/targets/roo.js.map +2 -2
- package/dist/bin/installer/targets/tabnine.js +3 -3
- package/dist/bin/installer/targets/tabnine.js.map +2 -2
- package/dist/bin/installer/targets/trae.js +5 -5
- package/dist/bin/installer/targets/trae.js.map +2 -2
- package/dist/bin/installer/targets/warp.js +2 -2
- package/dist/bin/installer/targets/warp.js.map +2 -2
- package/dist/bin/installer/targets/windsurf.js +35 -6
- package/dist/bin/installer/targets/windsurf.js.map +2 -2
- package/dist/bin/kirograph.js +72 -6
- package/dist/bin/kirograph.js.map +3 -3
- package/dist/compression/tracker.js +80 -0
- package/dist/compression/tracker.js.map +2 -2
- package/dist/config.js +90 -3
- package/dist/config.js.map +2 -2
- package/dist/core/pipeline.js +36 -2
- package/dist/core/pipeline.js.map +2 -2
- package/dist/db/database.js +56 -5
- package/dist/db/database.js.map +2 -2
- package/dist/db/memory-schema.sql +5 -1
- package/dist/db/schema.sql +3 -1
- package/dist/db/security-schema.sql +72 -0
- package/dist/extraction/extractor.js +81 -0
- package/dist/extraction/extractor.js.map +2 -2
- package/dist/extraction/grammars.js +32 -8
- package/dist/extraction/grammars.js.map +2 -2
- package/dist/extraction/languages.js +43 -1
- package/dist/extraction/languages.js.map +2 -2
- package/dist/extraction/notebook.js +300 -0
- package/dist/extraction/notebook.js.map +7 -0
- package/dist/extraction/wasm/tree-sitter-astro.wasm +0 -0
- package/dist/extraction/wasm/tree-sitter-gdscript.wasm +0 -0
- package/dist/extraction/wasm/tree-sitter-julia.wasm +0 -0
- package/dist/extraction/wasm/tree-sitter-nix.wasm +0 -0
- package/dist/extraction/wasm/tree-sitter-perl.wasm +0 -0
- package/dist/extraction/wasm/tree-sitter-powershell.wasm +0 -0
- package/dist/extraction/wasm/tree-sitter-r.wasm +0 -0
- package/dist/extraction/wasm/tree-sitter-sql.wasm +0 -0
- package/dist/extraction/wasm/tree-sitter-verilog.wasm +0 -0
- package/dist/frameworks/flutter.js +130 -0
- package/dist/frameworks/flutter.js.map +7 -0
- package/dist/frameworks/index.js +7 -1
- package/dist/frameworks/index.js.map +3 -3
- package/dist/graph/communities.js +317 -0
- package/dist/graph/communities.js.map +7 -0
- package/dist/graph/flows.js +138 -0
- package/dist/graph/flows.js.map +7 -0
- package/dist/graph/refactor.js +155 -0
- package/dist/graph/refactor.js.map +7 -0
- package/dist/index.js +1 -1
- package/dist/index.js.map +2 -2
- package/dist/mcp/cache.js +172 -0
- package/dist/mcp/cache.js.map +7 -0
- package/dist/mcp/read-modes.js +295 -0
- package/dist/mcp/read-modes.js.map +7 -0
- package/dist/mcp/server.js +2 -1
- package/dist/mcp/server.js.map +2 -2
- package/dist/mcp/tool-names.js +21 -1
- package/dist/mcp/tool-names.js.map +2 -2
- package/dist/mcp/tools.js +1160 -1
- package/dist/mcp/tools.js.map +3 -3
- package/dist/memory/database.js +32 -2
- package/dist/memory/database.js.map +2 -2
- package/dist/memory/types.js.map +1 -1
- package/dist/resolution/bridges/android-rn.js +298 -0
- package/dist/resolution/bridges/android-rn.js.map +7 -0
- package/dist/resolution/bridges/expo-modules.js +155 -0
- package/dist/resolution/bridges/expo-modules.js.map +7 -0
- package/dist/resolution/bridges/flutter-channel.js +385 -0
- package/dist/resolution/bridges/flutter-channel.js.map +7 -0
- package/dist/resolution/bridges/index.js +80 -0
- package/dist/resolution/bridges/index.js.map +7 -0
- package/dist/resolution/bridges/native-events.js +188 -0
- package/dist/resolution/bridges/native-events.js.map +7 -0
- package/dist/resolution/bridges/native-views.js +244 -0
- package/dist/resolution/bridges/native-views.js.map +7 -0
- package/dist/resolution/bridges/react-native.js +161 -0
- package/dist/resolution/bridges/react-native.js.map +7 -0
- package/dist/resolution/bridges/swift-objc.js +227 -0
- package/dist/resolution/bridges/swift-objc.js.map +7 -0
- package/dist/resolution/bridges/turbomodules.js +216 -0
- package/dist/resolution/bridges/turbomodules.js.map +7 -0
- package/dist/resolution/index.js +61 -2
- package/dist/resolution/index.js.map +2 -2
- package/dist/security/attack-surface.js +164 -0
- package/dist/security/attack-surface.js.map +7 -0
- package/dist/security/context-warnings.js +123 -0
- package/dist/security/context-warnings.js.map +7 -0
- package/dist/security/context-warnings.test.js +300 -0
- package/dist/security/context-warnings.test.js.map +7 -0
- package/dist/security/data-flows.js +228 -0
- package/dist/security/data-flows.js.map +7 -0
- package/dist/security/dep-confusion.js +255 -0
- package/dist/security/dep-confusion.js.map +7 -0
- package/dist/security/errors.js +51 -0
- package/dist/security/errors.js.map +7 -0
- package/dist/security/export/fix-suggestions.js +58 -0
- package/dist/security/export/fix-suggestions.js.map +7 -0
- package/dist/security/export/fix-suggestions.test.js +74 -0
- package/dist/security/export/fix-suggestions.test.js.map +7 -0
- package/dist/security/export/sbom.js +230 -0
- package/dist/security/export/sbom.js.map +7 -0
- package/dist/security/export/sbom.test.js +288 -0
- package/dist/security/export/sbom.test.js.map +7 -0
- package/dist/security/export/serialization.js +142 -0
- package/dist/security/export/serialization.js.map +7 -0
- package/dist/security/export/serialization.test.js +310 -0
- package/dist/security/export/serialization.test.js.map +7 -0
- package/dist/security/export/vex.js +220 -0
- package/dist/security/export/vex.js.map +7 -0
- package/dist/security/export/vex.test.js +278 -0
- package/dist/security/export/vex.test.js.map +7 -0
- package/dist/security/index.js +67 -0
- package/dist/security/index.js.map +7 -0
- package/dist/security/integrator-transitives.test.js +359 -0
- package/dist/security/integrator-transitives.test.js.map +7 -0
- package/dist/security/integrator.js +491 -0
- package/dist/security/integrator.js.map +7 -0
- package/dist/security/integrator.test.js +237 -0
- package/dist/security/integrator.test.js.map +7 -0
- package/dist/security/license.js +70 -0
- package/dist/security/license.js.map +7 -0
- package/dist/security/manifest/adapter.js +243 -0
- package/dist/security/manifest/adapter.js.map +7 -0
- package/dist/security/manifest/adapter.test.js +272 -0
- package/dist/security/manifest/adapter.test.js.map +7 -0
- package/dist/security/manifest/parser.js +376 -0
- package/dist/security/manifest/parser.js.map +7 -0
- package/dist/security/manifest/parser.test.js +110 -0
- package/dist/security/manifest/parser.test.js.map +7 -0
- package/dist/security/manifest/plugins/cargo.js +233 -0
- package/dist/security/manifest/plugins/cargo.js.map +7 -0
- package/dist/security/manifest/plugins/cargo.test.js +304 -0
- package/dist/security/manifest/plugins/cargo.test.js.map +7 -0
- package/dist/security/manifest/plugins/composer.js +152 -0
- package/dist/security/manifest/plugins/composer.js.map +7 -0
- package/dist/security/manifest/plugins/go.js +146 -0
- package/dist/security/manifest/plugins/go.js.map +7 -0
- package/dist/security/manifest/plugins/go.test.js +341 -0
- package/dist/security/manifest/plugins/go.test.js.map +7 -0
- package/dist/security/manifest/plugins/gradle.js +159 -0
- package/dist/security/manifest/plugins/gradle.js.map +7 -0
- package/dist/security/manifest/plugins/hex.js +159 -0
- package/dist/security/manifest/plugins/hex.js.map +7 -0
- package/dist/security/manifest/plugins/maven.js +128 -0
- package/dist/security/manifest/plugins/maven.js.map +7 -0
- package/dist/security/manifest/plugins/maven.test.js +389 -0
- package/dist/security/manifest/plugins/maven.test.js.map +7 -0
- package/dist/security/manifest/plugins/npm.js +284 -0
- package/dist/security/manifest/plugins/npm.js.map +7 -0
- package/dist/security/manifest/plugins/npm.test.js +298 -0
- package/dist/security/manifest/plugins/npm.test.js.map +7 -0
- package/dist/security/manifest/plugins/nuget.js +186 -0
- package/dist/security/manifest/plugins/nuget.js.map +7 -0
- package/dist/security/manifest/plugins/pip.js +123 -0
- package/dist/security/manifest/plugins/pip.js.map +7 -0
- package/dist/security/manifest/plugins/pip.test.js +208 -0
- package/dist/security/manifest/plugins/pip.test.js.map +7 -0
- package/dist/security/manifest/plugins/pubspec.js +212 -0
- package/dist/security/manifest/plugins/pubspec.js.map +7 -0
- package/dist/security/manifest/plugins/pyproject.js +261 -0
- package/dist/security/manifest/plugins/pyproject.js.map +7 -0
- package/dist/security/manifest/plugins/rubygems.js +185 -0
- package/dist/security/manifest/plugins/rubygems.js.map +7 -0
- package/dist/security/manifest/plugins/swift.js +200 -0
- package/dist/security/manifest/plugins/swift.js.map +7 -0
- package/dist/security/owasp.js +104 -0
- package/dist/security/owasp.js.map +7 -0
- package/dist/security/pipeline.js +125 -0
- package/dist/security/pipeline.js.map +7 -0
- package/dist/security/reachability.js +276 -0
- package/dist/security/reachability.js.map +7 -0
- package/dist/security/reachability.test.js +394 -0
- package/dist/security/reachability.test.js.map +7 -0
- package/dist/security/remediation.js +126 -0
- package/dist/security/remediation.js.map +7 -0
- package/dist/security/secrets.js +176 -0
- package/dist/security/secrets.js.map +7 -0
- package/dist/security/staleness.js +231 -0
- package/dist/security/staleness.js.map +7 -0
- package/dist/security/supply-chain.js +301 -0
- package/dist/security/supply-chain.js.map +7 -0
- package/dist/security/suppressions.js +106 -0
- package/dist/security/suppressions.js.map +7 -0
- package/dist/security/types.js +17 -0
- package/dist/security/types.js.map +7 -0
- package/dist/security/vuln/client.js +355 -0
- package/dist/security/vuln/client.js.map +7 -0
- package/dist/security/vuln/client.test.js +288 -0
- package/dist/security/vuln/client.test.js.map +7 -0
- package/dist/security/vuln/epss-client.js +95 -0
- package/dist/security/vuln/epss-client.js.map +7 -0
- package/dist/security/vuln/index.js +29 -0
- package/dist/security/vuln/index.js.map +7 -0
- package/dist/security/vuln/osv-adapter.js +321 -0
- package/dist/security/vuln/osv-adapter.js.map +7 -0
- package/dist/security/vuln/osv-adapter.test.js +391 -0
- package/dist/security/vuln/osv-adapter.test.js.map +7 -0
- package/dist/security/vuln/types.js +17 -0
- package/dist/security/vuln/types.js.map +7 -0
- package/dist/types.js.map +2 -2
- package/package.json +2 -1
|
@@ -19,121 +19,380 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
19
19
|
var help_exports = {};
|
|
20
20
|
__export(help_exports, {
|
|
21
21
|
printColoredHelp: () => printColoredHelp,
|
|
22
|
+
printInteractiveHelp: () => printInteractiveHelp,
|
|
22
23
|
register: () => register
|
|
23
24
|
});
|
|
24
25
|
module.exports = __toCommonJS(help_exports);
|
|
25
26
|
var import_banner = require("../banner");
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
]
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
{
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
]
|
|
27
|
+
const c = {
|
|
28
|
+
reset: "\x1B[0m",
|
|
29
|
+
bold: "\x1B[1m",
|
|
30
|
+
dim: "\x1B[2m",
|
|
31
|
+
violet: "\x1B[38;5;99m",
|
|
32
|
+
purple: "\x1B[38;5;135m",
|
|
33
|
+
lavender: "\x1B[38;5;141m",
|
|
34
|
+
paleLavender: "\x1B[38;5;183m",
|
|
35
|
+
gray: "\x1B[90m",
|
|
36
|
+
brown: "\x1B[38;5;130m",
|
|
37
|
+
green: "\x1B[32m",
|
|
38
|
+
cyan: "\x1B[36m",
|
|
39
|
+
underline: "\x1B[4m"
|
|
40
|
+
};
|
|
41
|
+
const GROUPS = [
|
|
42
|
+
{
|
|
43
|
+
icon: "\u{1F527}",
|
|
44
|
+
title: "Setup",
|
|
45
|
+
commands: [
|
|
46
|
+
{ name: "install", desc: "Wire up MCP/instructions for an agent workspace", opts: ["--target <t> kiro | cursor | claude | windsurf | ..."] },
|
|
47
|
+
{ name: "init", args: "[path]", desc: "Initialize KiroGraph in a project", opts: ["-i, --index Index immediately after init"] },
|
|
48
|
+
{ name: "uninit", args: "[path]", desc: "Remove KiroGraph from a project", opts: ["--force Skip confirmation", '--target <t> Target to clean up (or "all")'] }
|
|
49
|
+
],
|
|
50
|
+
examples: [
|
|
51
|
+
["kirograph install", "Wire up Kiro MCP + hooks + steering"],
|
|
52
|
+
["kirograph install --target cursor", "Wire up Cursor MCP + rules + hooks"],
|
|
53
|
+
["kirograph init --index", "Init and immediately index"]
|
|
54
|
+
]
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
icon: "\u{1F4E6}",
|
|
58
|
+
title: "Indexing",
|
|
59
|
+
commands: [
|
|
60
|
+
{ name: "index", args: "[path]", desc: "Full re-index of a project", opts: ["--force Force re-index all files"] },
|
|
61
|
+
{ name: "sync", args: "[path]", desc: "Incremental sync of changed files", opts: ["--files <f> Specific files to sync"] },
|
|
62
|
+
{ name: "sync-if-dirty", args: "[path]", desc: "Sync only if a dirty marker is present", opts: ["-q, --quiet Suppress output"] },
|
|
63
|
+
{ name: "mark-dirty", args: "[path]", desc: "Write a dirty marker for deferred sync" },
|
|
64
|
+
{ name: "unlock", args: "[path]", desc: "Force-release a stale lock file" }
|
|
65
|
+
],
|
|
66
|
+
examples: [
|
|
67
|
+
["kirograph sync", "Incremental sync of changed files"],
|
|
68
|
+
["kirograph index --force", "Force full re-index"]
|
|
69
|
+
]
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
icon: "\u{1F50D}",
|
|
73
|
+
title: "Search",
|
|
74
|
+
commands: [
|
|
75
|
+
{ name: "status", args: "[path]", desc: "Show index statistics and health" },
|
|
76
|
+
{ name: "query", args: "<search>", desc: "Search for symbols by name", opts: ["--kind <k> Filter by kind", "--limit <n> Max results"] },
|
|
77
|
+
{ name: "context", args: "<task>", desc: "Build relevant code context for a task", opts: ["--max-nodes <n> Max symbols", "--no-code Exclude code", "--format <f> markdown | json"] },
|
|
78
|
+
{ name: "files", args: "[path]", desc: "Show project file structure", opts: ["--format <f> tree | flat | grouped | compact", "--filter <p> Directory prefix", "--pattern <g> Glob"] },
|
|
79
|
+
{ name: "path", args: "<from> <to>", desc: "Shortest path between two symbols" },
|
|
80
|
+
{ name: "affected", args: "[files...]", desc: "Find test files affected by changes", opts: ["--stdin Read from stdin", "-d <n> Depth", "-q Quiet"] }
|
|
81
|
+
],
|
|
82
|
+
examples: [
|
|
83
|
+
["kirograph query useState", "Find symbols named useState"],
|
|
84
|
+
['kirograph context "add dark mode"', "Get context for a task"],
|
|
85
|
+
["kirograph path LoginController Pool", "How are these connected?"],
|
|
86
|
+
["git diff --name-only | kirograph affected --stdin", "Affected tests from git diff"]
|
|
87
|
+
]
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
icon: "\u{1F4CA}",
|
|
91
|
+
title: "Insights",
|
|
92
|
+
commands: [
|
|
93
|
+
{ name: "hotspots", args: "[path]", desc: "Most-connected symbols by edge degree", opts: ["--limit <n> Max results", "--format <f> table | json"] },
|
|
94
|
+
{ name: "surprising", args: "[path]", desc: "Non-obvious cross-file connections", opts: ["--limit <n> Max results"] },
|
|
95
|
+
{ name: "dead-code", args: "[path]", desc: "Unreferenced unexported symbols", opts: ["--limit <n> Max results"] },
|
|
96
|
+
{ name: "snapshot", desc: "Save/list/diff graph snapshots", opts: ["save [label]", "list", "diff [label] --format summary|full|json"] },
|
|
97
|
+
{ name: "export", desc: "Interactive graph dashboard", opts: ["build [path] Generate HTML", "start [path] Generate and open"] }
|
|
98
|
+
],
|
|
99
|
+
examples: [
|
|
100
|
+
["kirograph hotspots --limit 10", "Top 10 most-connected symbols"],
|
|
101
|
+
["kirograph snapshot save pre-refactor", "Save before a refactor"],
|
|
102
|
+
["kirograph snapshot diff pre-refactor", "See what changed"],
|
|
103
|
+
["kirograph export start", "Open the graph dashboard"]
|
|
104
|
+
]
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
icon: "\u{1F3DB}\uFE0F",
|
|
108
|
+
title: "Architecture",
|
|
109
|
+
commands: [
|
|
110
|
+
{ name: "architecture", args: "[path]", desc: "Package graph and layer map", opts: ["--packages Packages only", "--layers Layers only"] },
|
|
111
|
+
{ name: "coupling", args: "[path]", desc: "Coupling metrics per package", opts: ["--sort <s> instability | ca | ce | name", "--package <n> Detail view"] },
|
|
112
|
+
{ name: "package", args: "<name>", desc: "Inspect a package", opts: ["--no-files Omit file list"] }
|
|
113
|
+
],
|
|
114
|
+
examples: [
|
|
115
|
+
["kirograph architecture --packages", "List all detected packages"],
|
|
116
|
+
["kirograph coupling --sort instability", "Packages ranked by instability"],
|
|
117
|
+
["kirograph package src/auth", "Inspect the auth package"]
|
|
118
|
+
]
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
icon: "\u{1F9E0}",
|
|
122
|
+
title: "Memory",
|
|
123
|
+
commands: [
|
|
124
|
+
{ name: "mem search", args: "<query>", desc: "Search past observations", opts: ["--kind <k> Filter by kind", "--limit <n> Max results"] },
|
|
125
|
+
{ name: "mem store", args: "<text>", desc: "Store an observation", opts: ["--kind <k> decision | error | pattern | architecture | note"] },
|
|
126
|
+
{ name: "mem timeline", desc: "List recent sessions and observations" },
|
|
127
|
+
{ name: "mem status", desc: "Memory health dashboard" },
|
|
128
|
+
{ name: "mem prune", desc: "Remove old observations", opts: ["--older-than <d> Duration (e.g. 90d)"] },
|
|
129
|
+
{ name: "mem export", desc: "Export observations", opts: ["--format <f> jsonl | md"] },
|
|
130
|
+
{ name: "mem reembed", desc: "Re-embed after model change" },
|
|
131
|
+
{ name: "mem lint", desc: "Health check and auto-repair", opts: ["--fix Auto-fix issues"] }
|
|
132
|
+
],
|
|
133
|
+
examples: [
|
|
134
|
+
['kirograph mem search "auth decision"', "Search for past decisions"],
|
|
135
|
+
['kirograph mem store "use idempotency keys" --kind decision', "Store a decision"],
|
|
136
|
+
["kirograph mem timeline", "See recent sessions"]
|
|
137
|
+
]
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
icon: "\u{1F512}",
|
|
141
|
+
title: "Security",
|
|
142
|
+
commands: [
|
|
143
|
+
{ name: "security", args: "[path]", desc: "Security overview: vulnerabilities, verdicts, stale-data warnings" },
|
|
144
|
+
{
|
|
145
|
+
name: "vulns",
|
|
146
|
+
args: "[path]",
|
|
147
|
+
desc: "List vulnerabilities with reachability verdicts and severity",
|
|
148
|
+
opts: [
|
|
149
|
+
"--severity <level> Filter by severity: critical, high, medium, low",
|
|
150
|
+
"--verdict <verdict> Filter by verdict: affected, not_affected, under_investigation",
|
|
151
|
+
"--refresh Trigger fresh vulnerability enrichment before listing",
|
|
152
|
+
"--add <cveId> Manually register a CVE (requires --package and --version)"
|
|
153
|
+
]
|
|
154
|
+
},
|
|
155
|
+
{ name: "reachability", args: "<target>", desc: "Check reachability for a CVE or dependency: verdict, call paths, impact" },
|
|
156
|
+
{
|
|
157
|
+
name: "vuln suppress",
|
|
158
|
+
args: "<cveId>",
|
|
159
|
+
desc: "Mark a CVE as suppressed (false positive or accepted risk)",
|
|
160
|
+
opts: [
|
|
161
|
+
"--reason <text> Reason for suppression",
|
|
162
|
+
"--expires <date> Expiry date (e.g. 2026-12-31)"
|
|
163
|
+
]
|
|
164
|
+
},
|
|
165
|
+
{ name: "vuln unsuppress", args: "<cveId>", desc: "Remove a suppression" },
|
|
166
|
+
{ name: "vuln suppressions", desc: "List all active suppressions", opts: ["--format json JSON output"] },
|
|
167
|
+
{
|
|
168
|
+
name: "licenses",
|
|
169
|
+
args: "[path]",
|
|
170
|
+
desc: "Show dependency licenses and check against policy (deny/warn lists)",
|
|
171
|
+
opts: [
|
|
172
|
+
"--policy Show only policy violations",
|
|
173
|
+
"--deny <patterns> Override deny list (comma-separated SPDX patterns)",
|
|
174
|
+
"--warn <patterns> Override warn list (comma-separated SPDX patterns)",
|
|
175
|
+
"--format json JSON output"
|
|
176
|
+
]
|
|
177
|
+
},
|
|
178
|
+
{ name: "vex", args: "[path]", desc: "Export a VEX document (Vulnerability Exploitability eXchange)", opts: ["--output <file> Write to file instead of stdout"] },
|
|
179
|
+
{ name: "sbom", args: "[path]", desc: "Export a Software Bill of Materials", opts: ["--output <file> Write to file instead of stdout"] },
|
|
180
|
+
{
|
|
181
|
+
name: "staleness",
|
|
182
|
+
args: "[path]",
|
|
183
|
+
desc: "Check dependency freshness \u2014 packages behind their latest version",
|
|
184
|
+
opts: [
|
|
185
|
+
"--threshold <n> Show only packages with staleness_score >= n (default: 0.3)",
|
|
186
|
+
"--refresh Fetch latest version info from registries before listing",
|
|
187
|
+
"--format <fmt> table | json"
|
|
188
|
+
]
|
|
189
|
+
},
|
|
190
|
+
{ name: "security export", args: "[path]", desc: "Generate HTML security dashboard", opts: ["--output <file> Output path", "--open Open in browser"] },
|
|
191
|
+
{ name: "security secrets", args: "[path]", desc: "Scan for hardcoded secrets with call-graph blast radius", opts: ["--include-tests Include test files", "--severity <s> Filter level", "--format json"] },
|
|
192
|
+
{ name: "security flows", args: "[path]", desc: "SAST-lite: detect dangerous data flows (SQL injection, eval, path traversal, etc.)", opts: ["--type sql|eval|deserialize|path|all", "--format json"] },
|
|
193
|
+
{ name: "security ci-report", args: "[path]", desc: "Generate CI/CD security report (JSON, SARIF for GitHub, or text)", opts: ["--format json|sarif|text", "--fail-on affected|any|critical", "--output <file>"] },
|
|
194
|
+
{ name: "attack-surface", args: "[path]", desc: "Map attack surface: routes \u2192 vulnerable deps with hop count and auth status", opts: ["--limit <n>", "--public-only", "--format json"] },
|
|
195
|
+
{ name: "supply-chain", args: "[path]", desc: "Supply chain health: OpenSSF Scorecard, maintainer count, abandoned packages", opts: ["--threshold critical|high|medium", "--refresh", "--format json"] },
|
|
196
|
+
{ name: "dep-confusion", args: "[path]", desc: "Detect dependency confusion: internal packages that exist in public registries", opts: ["--format json"] },
|
|
197
|
+
{ name: "remediation", args: "[path]", desc: "Remediation SLA tracking: days open, fix available since, overdue alerts", opts: ["--overdue-only", "--format json"] }
|
|
198
|
+
],
|
|
199
|
+
examples: [
|
|
200
|
+
["kirograph security", "Overview: dep count, vuln count, verdict breakdown"],
|
|
201
|
+
["kirograph security --refresh-staleness", "Overview including stale dependency count"],
|
|
202
|
+
["kirograph vulns", "List all vulnerabilities with severity and verdict"],
|
|
203
|
+
["kirograph vulns --stale", "Show staleness score alongside each CVE"],
|
|
204
|
+
["kirograph vulns --verdict under_investigation", "Show only vulnerabilities still being investigated"],
|
|
205
|
+
["kirograph vulns --severity critical --verdict affected", "Critical confirmed vulnerabilities"],
|
|
206
|
+
["kirograph vulns --refresh", "Re-query OSV before listing"],
|
|
207
|
+
["kirograph staleness", "Show packages with staleness_score >= 0.3"],
|
|
208
|
+
["kirograph staleness --refresh --threshold 0.5", "Fetch latest versions and show very stale packages"],
|
|
209
|
+
["kirograph reachability CVE-2023-12345", "Check reachability for a specific CVE"],
|
|
210
|
+
["kirograph reachability lodash", "Check reachability for a dependency by package name"],
|
|
211
|
+
["kirograph licenses", "Show all dependency licenses"],
|
|
212
|
+
["kirograph licenses --policy", "Show only license policy violations"],
|
|
213
|
+
['kirograph licenses --deny "GPL-*,AGPL-*"', "Block all GPL/AGPL licenses"],
|
|
214
|
+
["kirograph vex --output vex.json", "Export CycloneDX VEX document"],
|
|
215
|
+
["kirograph sbom --output sbom.json", "Export SPDX SBOM"],
|
|
216
|
+
["kirograph security export --open", "Generate and open HTML security dashboard"],
|
|
217
|
+
["kirograph security secrets", "Scan for hardcoded secrets with call-graph blast radius"],
|
|
218
|
+
["kirograph security flows", "Detect dangerous data flows (SQL injection, eval, etc.)"],
|
|
219
|
+
["kirograph security ci-report --format sarif --output results.sarif", "SARIF report for GitHub Security tab"],
|
|
220
|
+
["kirograph attack-surface --public-only", "Show public routes reaching vulnerable deps"],
|
|
221
|
+
["kirograph supply-chain --threshold high", "Show high-risk supply chain findings"],
|
|
222
|
+
["kirograph dep-confusion", "Detect dependency confusion attack vectors"],
|
|
223
|
+
["kirograph remediation --overdue-only", "Show CVEs past their remediation SLA"],
|
|
224
|
+
['kirograph vuln suppress CVE-2024-1234 --reason "not in code path"', "Suppress a false positive CVE"],
|
|
225
|
+
["kirograph vuln unsuppress CVE-2024-1234", "Remove a suppression"],
|
|
226
|
+
["kirograph vuln suppressions", "List all active suppressions"]
|
|
227
|
+
]
|
|
228
|
+
},
|
|
229
|
+
{
|
|
230
|
+
icon: "\u2699\uFE0F",
|
|
231
|
+
title: "Agent",
|
|
232
|
+
commands: [
|
|
233
|
+
{ name: "caveman", args: "[mode]", desc: "Communication style (off | lite | full | ultra)" },
|
|
234
|
+
{ name: "compression", args: "[level]", desc: "Shell compression level (off | normal | aggressive | ultra)" },
|
|
235
|
+
{ name: "exec", args: "<cmd>", desc: "Run command with token-optimized output", opts: ["-l <level> Compression level", "-t <sec> Timeout"] },
|
|
236
|
+
{ name: "gain", desc: "Token savings statistics", opts: ["--graph ASCII chart", "--history Recent commands", "--daily Day breakdown"] },
|
|
237
|
+
{ name: "serve", desc: "Start the MCP server", opts: ["--mcp Run as stdio MCP", "--path <p> Project path"] }
|
|
238
|
+
],
|
|
239
|
+
examples: [
|
|
240
|
+
["kirograph caveman lite", "Enable lite caveman mode"],
|
|
241
|
+
["kirograph exec git status", "Run git status with compression"],
|
|
242
|
+
["kirograph gain --graph", "Show token savings graph"]
|
|
243
|
+
]
|
|
244
|
+
}
|
|
245
|
+
];
|
|
246
|
+
function renderGroup(group, highlightIdx) {
|
|
247
|
+
const lines = [];
|
|
248
|
+
const nameWidth = Math.max(...group.commands.map((cmd) => (cmd.name + (cmd.args ? " " + cmd.args : "")).length)) + 2;
|
|
249
|
+
lines.push("");
|
|
250
|
+
lines.push(` ${c.bold}${c.paleLavender}COMMANDS${c.reset} ${c.dim}\u2191\u2193 select \xB7 enter to copy \xB7 q quit${c.reset}`);
|
|
251
|
+
lines.push("");
|
|
252
|
+
for (let i = 0; i < group.commands.length; i++) {
|
|
253
|
+
const cmd = group.commands[i];
|
|
254
|
+
const signature = cmd.name + (cmd.args ? " " + cmd.args : "");
|
|
255
|
+
const isHighlighted = i === highlightIdx;
|
|
256
|
+
const prefix = isHighlighted ? `${c.green}${c.bold}\u276F${c.reset} ` : " ";
|
|
257
|
+
const namePart = isHighlighted ? `${c.bold}${c.lavender}${cmd.name}${c.reset}${cmd.args ? " " + c.bold + cmd.args + c.reset : ""}` : `${c.lavender}${cmd.name}${c.reset}${cmd.args ? " " + c.dim + cmd.args + c.reset : ""}`;
|
|
258
|
+
const pad = " ".repeat(Math.max(0, nameWidth - signature.length));
|
|
259
|
+
lines.push(`${prefix}${namePart}${pad}${c.gray}${cmd.desc}${c.reset}`);
|
|
260
|
+
if (cmd.opts) {
|
|
261
|
+
for (const opt of cmd.opts) {
|
|
262
|
+
const [flag, ...rest] = opt.split(/ +/);
|
|
263
|
+
lines.push(` ${c.purple}${flag}${c.reset}${rest.length ? " " + c.dim + rest.join(" ") + c.reset : ""}`);
|
|
264
|
+
}
|
|
100
265
|
}
|
|
101
|
-
|
|
266
|
+
}
|
|
267
|
+
if (group.examples.length > 0) {
|
|
268
|
+
lines.push("");
|
|
269
|
+
lines.push(` ${c.bold}${c.paleLavender}EXAMPLES${c.reset}`);
|
|
270
|
+
lines.push("");
|
|
271
|
+
for (const [ex, desc] of group.examples) {
|
|
272
|
+
lines.push(` ${c.violet}$${c.reset} ${c.lavender}${ex}${c.reset}`);
|
|
273
|
+
lines.push(` ${c.dim}${desc}${c.reset}`);
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
return lines;
|
|
277
|
+
}
|
|
278
|
+
function renderTabs(selectedIdx) {
|
|
279
|
+
return GROUPS.map((g, i) => {
|
|
280
|
+
if (i === selectedIdx) {
|
|
281
|
+
return `${c.bold}${c.violet}${c.underline}${g.icon} ${g.title}${c.reset}`;
|
|
282
|
+
}
|
|
283
|
+
return `${c.dim}${g.icon} ${g.title}${c.reset}`;
|
|
284
|
+
}).join(" ");
|
|
285
|
+
}
|
|
286
|
+
function printInteractiveHelp() {
|
|
287
|
+
const CLEAR_LINE = "\x1B[2K\x1B[G";
|
|
288
|
+
let selectedTab = 0;
|
|
289
|
+
let selectedCmd = 0;
|
|
290
|
+
let prevLineCount = 0;
|
|
291
|
+
function render(first) {
|
|
292
|
+
if (!first && prevLineCount > 0) {
|
|
293
|
+
process.stdout.write(`\x1B[${prevLineCount}A`);
|
|
294
|
+
for (let i = 0; i < prevLineCount; i++) {
|
|
295
|
+
process.stdout.write(`${CLEAR_LINE}
|
|
296
|
+
`);
|
|
297
|
+
}
|
|
298
|
+
process.stdout.write(`\x1B[${prevLineCount}A`);
|
|
299
|
+
}
|
|
300
|
+
const lines = [];
|
|
301
|
+
lines.push("");
|
|
302
|
+
lines.push(` ${renderTabs(selectedTab)}`);
|
|
303
|
+
lines.push(` ${c.dim}\u2190 \u2192 tabs \xB7 \u2191 \u2193 commands \xB7 enter to use \xB7 q quit${c.reset}`);
|
|
304
|
+
lines.push(...renderGroup(GROUPS[selectedTab], selectedCmd));
|
|
305
|
+
lines.push("");
|
|
306
|
+
for (const line of lines) {
|
|
307
|
+
process.stdout.write(`${CLEAR_LINE}${line}
|
|
308
|
+
`);
|
|
309
|
+
}
|
|
310
|
+
prevLineCount = lines.length;
|
|
311
|
+
}
|
|
312
|
+
(0, import_banner.printBanner)();
|
|
313
|
+
console.log(`
|
|
314
|
+
${c.bold}${c.paleLavender}USAGE${c.reset} ${c.lavender}kirograph${c.reset} ${c.gray}<command>${c.reset} ${c.dim}[options]${c.reset}`);
|
|
315
|
+
render(true);
|
|
316
|
+
const stdin = process.stdin;
|
|
317
|
+
if (!stdin.isTTY) {
|
|
318
|
+
for (let i = 1; i < GROUPS.length; i++) {
|
|
319
|
+
const lines = renderGroup(GROUPS[i], -1);
|
|
320
|
+
for (const line of lines) console.log(line);
|
|
321
|
+
}
|
|
322
|
+
return;
|
|
323
|
+
}
|
|
324
|
+
stdin.setRawMode(true);
|
|
325
|
+
stdin.resume();
|
|
326
|
+
stdin.setEncoding("utf8");
|
|
327
|
+
function cleanup() {
|
|
328
|
+
stdin.removeListener("data", onData);
|
|
329
|
+
stdin.setRawMode(false);
|
|
330
|
+
stdin.pause();
|
|
331
|
+
}
|
|
332
|
+
function onData(key) {
|
|
333
|
+
if (key.startsWith("\x1B[")) {
|
|
334
|
+
if (key === "\x1B[C") {
|
|
335
|
+
selectedTab = (selectedTab + 1) % GROUPS.length;
|
|
336
|
+
selectedCmd = 0;
|
|
337
|
+
render(false);
|
|
338
|
+
} else if (key === "\x1B[D") {
|
|
339
|
+
selectedTab = (selectedTab - 1 + GROUPS.length) % GROUPS.length;
|
|
340
|
+
selectedCmd = 0;
|
|
341
|
+
render(false);
|
|
342
|
+
} else if (key === "\x1B[B") {
|
|
343
|
+
const maxCmd = GROUPS[selectedTab].commands.length - 1;
|
|
344
|
+
selectedCmd = Math.min(selectedCmd + 1, maxCmd);
|
|
345
|
+
render(false);
|
|
346
|
+
} else if (key === "\x1B[A") {
|
|
347
|
+
selectedCmd = Math.max(selectedCmd - 1, 0);
|
|
348
|
+
render(false);
|
|
349
|
+
}
|
|
350
|
+
return;
|
|
351
|
+
}
|
|
352
|
+
if (key === "\r" || key === "\n") {
|
|
353
|
+
cleanup();
|
|
354
|
+
const cmd = GROUPS[selectedTab].commands[selectedCmd];
|
|
355
|
+
const fullCmd = `kirograph ${cmd.name}${cmd.args ? " " + cmd.args : ""}`;
|
|
356
|
+
process.stdout.write(`\x1B[${prevLineCount}A`);
|
|
357
|
+
for (let i = 0; i < prevLineCount; i++) {
|
|
358
|
+
process.stdout.write(`${CLEAR_LINE}
|
|
359
|
+
`);
|
|
360
|
+
}
|
|
361
|
+
process.stdout.write(`\x1B[${prevLineCount}A`);
|
|
362
|
+
console.log(`
|
|
363
|
+
${c.green}${c.bold}$${c.reset} ${fullCmd}
|
|
364
|
+
`);
|
|
365
|
+
process.exit(0);
|
|
366
|
+
} else if (key === "q" || key === "") {
|
|
367
|
+
cleanup();
|
|
368
|
+
console.log();
|
|
369
|
+
process.exit(0);
|
|
370
|
+
}
|
|
371
|
+
}
|
|
372
|
+
stdin.on("data", onData);
|
|
373
|
+
}
|
|
374
|
+
function printColoredHelp() {
|
|
102
375
|
console.log(`
|
|
103
376
|
${c.bold}${c.paleLavender}USAGE${c.reset}`);
|
|
104
377
|
console.log(` ${c.lavender}kirograph${c.reset} ${c.gray}<command>${c.reset} ${c.dim}[options]${c.reset}
|
|
105
378
|
`);
|
|
106
|
-
const
|
|
107
|
-
|
|
108
|
-
for (const group of groups) {
|
|
109
|
-
console.log(`${c.bold}${c.paleLavender}${group.title.toUpperCase()}${c.reset}
|
|
379
|
+
for (const group of GROUPS) {
|
|
380
|
+
console.log(`${c.bold}${c.paleLavender}${group.icon} ${group.title.toUpperCase()}${c.reset}
|
|
110
381
|
`);
|
|
382
|
+
const nameWidth = Math.max(...group.commands.map((cmd) => (cmd.name + (cmd.args ? " " + cmd.args : "")).length)) + 2;
|
|
111
383
|
for (const cmd of group.commands) {
|
|
112
384
|
const signature = cmd.name + (cmd.args ? " " + cmd.args : "");
|
|
113
|
-
const
|
|
114
|
-
const nameColor = isCaveman ? c.brown : c.lavender;
|
|
115
|
-
const prefix = isCaveman ? "\u{1FAA8} " : " ";
|
|
116
|
-
const namePart = `${nameColor}${cmd.name}${c.reset}${cmd.args ? " " + c.dim + cmd.args + c.reset : ""}`;
|
|
385
|
+
const namePart = `${c.lavender}${cmd.name}${c.reset}${cmd.args ? " " + c.dim + cmd.args + c.reset : ""}`;
|
|
117
386
|
const pad = " ".repeat(Math.max(0, nameWidth - signature.length));
|
|
118
|
-
console.log(
|
|
119
|
-
if (isCaveman) {
|
|
120
|
-
const inspiredPad = " ".repeat(3 + nameWidth);
|
|
121
|
-
console.log(`${inspiredPad}${c.dim}Inspired by Caveman , original idea by github.com/JuliusBrussee/caveman${c.reset}`);
|
|
122
|
-
console.log();
|
|
123
|
-
}
|
|
387
|
+
console.log(` ${namePart}${pad}${c.gray}${cmd.desc}${c.reset}`);
|
|
124
388
|
if (cmd.opts) {
|
|
125
389
|
for (const opt of cmd.opts) {
|
|
126
390
|
const [flag, ...rest] = opt.split(/ +/);
|
|
127
|
-
|
|
128
|
-
console.log(` ${optPad}${c.purple}${flag}${c.reset}${rest.length ? " " + c.dim + rest.join(" ") + c.reset : ""}`);
|
|
391
|
+
console.log(` ${c.purple}${flag}${c.reset}${rest.length ? " " + c.dim + rest.join(" ") + c.reset : ""}`);
|
|
129
392
|
}
|
|
130
|
-
console.log();
|
|
131
393
|
}
|
|
132
394
|
}
|
|
133
|
-
|
|
134
|
-
const lastHasOpts = group.commands[group.commands.length - 1].opts;
|
|
135
|
-
if (!lastHasOpts) console.log();
|
|
136
|
-
}
|
|
395
|
+
console.log();
|
|
137
396
|
}
|
|
138
397
|
console.log(`${c.bold}${c.paleLavender}GLOBAL FLAGS${c.reset}
|
|
139
398
|
`);
|
|
@@ -184,6 +443,31 @@ ${c.bold}${c.paleLavender}USAGE${c.reset}`);
|
|
|
184
443
|
["kirograph package src/auth", "Inspect the auth package"]
|
|
185
444
|
]
|
|
186
445
|
},
|
|
446
|
+
{
|
|
447
|
+
title: "\u{1F512} Security",
|
|
448
|
+
examples: [
|
|
449
|
+
["kirograph security", "Overview: dep count, vuln count, verdict breakdown"],
|
|
450
|
+
["kirograph security --refresh-staleness", "Overview including stale dependency count"],
|
|
451
|
+
["kirograph vulns", "List all vulnerabilities"],
|
|
452
|
+
["kirograph vulns --stale", "Show staleness score alongside each CVE"],
|
|
453
|
+
["kirograph vulns --verdict under_investigation", "Vulnerabilities still being investigated"],
|
|
454
|
+
["kirograph vulns --severity critical --verdict affected", "Critical confirmed vulnerabilities"],
|
|
455
|
+
["kirograph vulns --refresh", "Re-query OSV then list"],
|
|
456
|
+
["kirograph staleness", "Show packages with staleness_score >= 0.3"],
|
|
457
|
+
["kirograph staleness --refresh --threshold 0.5", "Fetch latest versions and show very stale packages"],
|
|
458
|
+
["kirograph reachability CVE-2023-12345", "Check reachability for a specific CVE"],
|
|
459
|
+
["kirograph reachability lodash", "Check reachability for a dependency by package name"],
|
|
460
|
+
["kirograph licenses", "Show all dependency licenses"],
|
|
461
|
+
["kirograph licenses --policy", "Show only license policy violations"],
|
|
462
|
+
['kirograph licenses --deny "GPL-*,AGPL-*"', "Block all GPL/AGPL licenses"],
|
|
463
|
+
["kirograph vex --output vex.json", "Export CycloneDX VEX document"],
|
|
464
|
+
["kirograph sbom --output sbom.json", "Export SPDX SBOM"],
|
|
465
|
+
['kirograph vuln suppress CVE-2024-1234 --reason "not in code path"', "Suppress a false positive CVE"],
|
|
466
|
+
["kirograph vuln suppress CVE-2024-1234 --expires 2026-12-31", "Suppress with expiry date"],
|
|
467
|
+
["kirograph vuln unsuppress CVE-2024-1234", "Remove a suppression"],
|
|
468
|
+
["kirograph vuln suppressions", "List all active suppressions"]
|
|
469
|
+
]
|
|
470
|
+
},
|
|
187
471
|
{
|
|
188
472
|
title: "\u2699\uFE0F Agent",
|
|
189
473
|
examples: [
|
|
@@ -217,15 +501,12 @@ ${c.bold}${c.paleLavender}USAGE${c.reset}`);
|
|
|
217
501
|
function register(program) {
|
|
218
502
|
program.configureHelp({ formatHelp: () => "" });
|
|
219
503
|
program.addHelpText("afterAll", "");
|
|
220
|
-
program.
|
|
221
|
-
(0, import_banner.printBanner)();
|
|
222
|
-
printColoredHelp();
|
|
223
|
-
return "";
|
|
224
|
-
};
|
|
504
|
+
program.helpOption(false);
|
|
225
505
|
}
|
|
226
506
|
// Annotate the CommonJS export names for ESM import in node:
|
|
227
507
|
0 && (module.exports = {
|
|
228
508
|
printColoredHelp,
|
|
509
|
+
printInteractiveHelp,
|
|
229
510
|
register
|
|
230
511
|
});
|
|
231
512
|
//# sourceMappingURL=help.js.map
|