Skip to content

armgit / Ix

Public Imported from GitHub
0

Understand any codebase instantly. System intelligence for codebases, built for humans and AI.

fix(help): list every command ix registers, starting with context

KageBinarybbfb6e0dfe8f
diff --git a/ix-cli/src/cli/__tests__/help-coverage.test.ts b/ix-cli/src/cli/__tests__/help-coverage.test.ts
index c2703457..1362d297 100644
--- a/ix-cli/src/cli/__tests__/help-coverage.test.ts
+++ b/ix-cli/src/cli/__tests__/help-coverage.test.ts
@@ -1,7 +1,9 @@
// Copyright 2026 Ix Infrastructure Inc.
import { describe, it, expect } from "vitest";
+import { Command } from "commander";
import { buildHelpText } from "../help-text.js";
+import { registerOssCommands } from "../register/oss.js";
/**
* Verify that buildHelpText output mentions all core commands.
@@ -56,3 +58,26 @@ describe("help coverage", () => {
expect(proHelp).toContain("goal");
});
});
+
+/**
+ * `ix --help` is a hand-written list, so a new command was easy to leave out:
+ * `context`, the command agents are told to use first, was missing. Every
+ * command the OSS build registers and does not hide has to be in it.
+ */
+/** Registered but deliberately not listed: deprecated, or not a command people run. */
+const UNLISTED = new Set(["query", "init", "help", "hook"]);
+
+describe("help coverage against the registrations", () => {
+ it("lists every non-hidden OSS command", () => {
+ const program = new Command();
+ registerOssCommands(program);
+ const help = buildHelpText();
+ const listed = (name: string) => new RegExp(`^\\s{2}${name}\\b`, "m").test(help);
+ const visible = program.commands
+ .filter((c) => !(c as unknown as { _hidden?: boolean })._hidden)
+ .map((c) => c.name())
+ .filter((name) => !UNLISTED.has(name));
+ expect(visible.length).toBeGreaterThan(20);
+ expect(visible.filter((name) => !listed(name))).toEqual([]);
+ });
+});
diff --git a/ix-cli/src/cli/help-text.ts b/ix-cli/src/cli/help-text.ts
index 5ee9a6e1..04c3d37b 100644
--- a/ix-cli/src/cli/help-text.ts
+++ b/ix-cli/src/cli/help-text.ts
@@ -8,10 +8,13 @@ const OSS_HELP = [
chalk.bold(`Start:`),
` map [path] Map system`,
` watch Watch changes`,
+ ` ingest <path> Ingest files or GitHub data`,
` config Update config`,
``,
chalk.bold(`Understand:`),
+ ` context <target> Bounded context bundle (start here)`,
` search <term> Search system`,
+ ` text <pattern> Search text (ripgrep)`,
` locate <symbol> Find definition`,
` explain <symbol> Explain behavior`,
` impact <target> Analyze impact`,
@@ -21,12 +24,21 @@ const OSS_HELP = [
` smells Detect issues`,
``,
chalk.bold(`Explore:`),
+ ` callers <symbol> Who calls it`,
+ ` callees <symbol> What it calls`,
+ ` imports <target> What it imports`,
+ ` imported-by <target> What imports it`,
+ ` contains <target> Its members`,
+ ` depends <target> Upstream dependents`,
+ ` entity <id> Entity details`,
` trace <symbol> Trace flow`,
` subsystems Explore structure`,
` inventory List components`,
` rank Rank importance`,
` history <target> Show history`,
` diff <from> <to> Compare changes`,
+ ` patches Recent patches`,
+ ` conflicts Detected conflicts`,
``,
chalk.bold(`System:`),
` status Check status`,