@agent-lint/cli 0.2.1 → 0.3.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/dist/index.js CHANGED
@@ -3520,35 +3520,129 @@ var require_gray_matter = __commonJS({
3520
3520
  }
3521
3521
  });
3522
3522
 
3523
- // src/index.ts
3523
+ // src/index.tsx
3524
3524
  import { Command } from "commander";
3525
3525
 
3526
- // src/commands/init.ts
3526
+ // src/commands/init.tsx
3527
+ import { useState, useEffect } from "react";
3527
3528
  import fs from "fs";
3528
3529
  import path from "path";
3530
+ import { Box as Box2, Text as Text2, render } from "ink";
3531
+ import { Spinner } from "@inkjs/ui";
3529
3532
 
3530
- // src/utils.ts
3531
- import util from "util";
3532
- function redirectLogsToStderr() {
3533
- console.log = (...args) => {
3534
- process.stderr.write(`${util.format(...args)}
3535
- `);
3536
- };
3537
- console.info = (...args) => {
3538
- process.stderr.write(`${util.format(...args)}
3539
- `);
3540
- };
3541
- }
3542
- function writeStdout(content) {
3543
- process.stdout.write(content.endsWith("\n") ? content : `${content}
3544
- `);
3533
+ // src/ui/components.tsx
3534
+ import { Box, Text } from "ink";
3535
+
3536
+ // src/ui/theme.ts
3537
+ var colors = {
3538
+ primary: "#6367FF",
3539
+ secondary: "#8494FF",
3540
+ tertiary: "#C9BEFF",
3541
+ accent: "#FFDBFD",
3542
+ dim: "#666666",
3543
+ success: "#22c55e",
3544
+ warning: "#eab308",
3545
+ error: "#ef4444",
3546
+ muted: "#888888"
3547
+ };
3548
+ var BANNER = `
3549
+ _ _ _ _ _
3550
+ / \\ __ _ ___ _ __ | |_ | | (_)_ __ | |_
3551
+ / _ \\ / _\` |/ _ \\ '_ \\| __| | | | | '_ \\| __|
3552
+ / ___ \\ (_| | __/ | | | |_ | |___| | | | | |_
3553
+ /_/ \\_\\__, |\\___|_| |_|\\__| |_____|_|_| |_|\\__|
3554
+ |___/`;
3555
+ var TAGLINE = "Meta-agent orchestrator for AI coding agents";
3556
+ var VERSION = "0.3.0";
3557
+
3558
+ // src/ui/components.tsx
3559
+ import { jsx, jsxs } from "react/jsx-runtime";
3560
+ function Banner() {
3561
+ return /* @__PURE__ */ jsxs(Box, { flexDirection: "column", marginBottom: 1, children: [
3562
+ /* @__PURE__ */ jsx(Text, { color: colors.primary, bold: true, children: BANNER }),
3563
+ /* @__PURE__ */ jsxs(Box, { marginTop: 0, marginLeft: 3, children: [
3564
+ /* @__PURE__ */ jsx(Text, { color: colors.tertiary, children: TAGLINE }),
3565
+ /* @__PURE__ */ jsxs(Text, { color: colors.dim, children: [
3566
+ " v",
3567
+ VERSION
3568
+ ] })
3569
+ ] })
3570
+ ] });
3571
+ }
3572
+ function Divider() {
3573
+ return /* @__PURE__ */ jsx(Box, { marginY: 0, children: /* @__PURE__ */ jsx(Text, { color: colors.dim, children: "\u2500".repeat(50) }) });
3574
+ }
3575
+ function SectionTitle({ children }) {
3576
+ return /* @__PURE__ */ jsxs(Box, { marginTop: 1, marginBottom: 0, children: [
3577
+ /* @__PURE__ */ jsx(Text, { color: colors.secondary, bold: true, children: "\u25B8 " }),
3578
+ /* @__PURE__ */ jsx(Text, { color: colors.secondary, bold: true, children })
3579
+ ] });
3580
+ }
3581
+ function SuccessItem({ children }) {
3582
+ return /* @__PURE__ */ jsxs(Box, { marginLeft: 2, children: [
3583
+ /* @__PURE__ */ jsx(Text, { color: colors.success, children: "\u2714 " }),
3584
+ /* @__PURE__ */ jsx(Text, { children })
3585
+ ] });
3586
+ }
3587
+ function SkipItem({ children }) {
3588
+ return /* @__PURE__ */ jsxs(Box, { marginLeft: 2, children: [
3589
+ /* @__PURE__ */ jsx(Text, { color: colors.warning, children: "\u2023 " }),
3590
+ /* @__PURE__ */ jsx(Text, { color: colors.muted, children })
3591
+ ] });
3592
+ }
3593
+ function InfoItem({ children }) {
3594
+ return /* @__PURE__ */ jsxs(Box, { marginLeft: 2, children: [
3595
+ /* @__PURE__ */ jsx(Text, { color: colors.accent, children: "\u25C6 " }),
3596
+ /* @__PURE__ */ jsx(Text, { children })
3597
+ ] });
3598
+ }
3599
+ function ErrorItem({ children }) {
3600
+ return /* @__PURE__ */ jsxs(Box, { marginLeft: 2, children: [
3601
+ /* @__PURE__ */ jsx(Text, { color: colors.error, children: "\u2716 " }),
3602
+ /* @__PURE__ */ jsx(Text, { children })
3603
+ ] });
3604
+ }
3605
+ function Hint({ children }) {
3606
+ return /* @__PURE__ */ jsxs(Box, { marginTop: 1, marginLeft: 2, children: [
3607
+ /* @__PURE__ */ jsx(Text, { color: colors.dim, children: "\u{1F4A1} " }),
3608
+ /* @__PURE__ */ jsx(Text, { color: colors.dim, italic: true, children })
3609
+ ] });
3610
+ }
3611
+ function NextStep({ children }) {
3612
+ return /* @__PURE__ */ jsxs(Box, { marginTop: 1, children: [
3613
+ /* @__PURE__ */ jsx(Text, { color: colors.tertiary, children: "\u2192 " }),
3614
+ /* @__PURE__ */ jsx(Text, { color: colors.tertiary, children })
3615
+ ] });
3616
+ }
3617
+ function PromptBox({ children }) {
3618
+ return /* @__PURE__ */ jsx(
3619
+ Box,
3620
+ {
3621
+ borderStyle: "round",
3622
+ borderColor: colors.primary,
3623
+ paddingX: 2,
3624
+ paddingY: 1,
3625
+ marginY: 1,
3626
+ children: /* @__PURE__ */ jsx(Text, { children })
3627
+ }
3628
+ );
3545
3629
  }
3546
- function writeStderr(content) {
3547
- process.stderr.write(content.endsWith("\n") ? content : `${content}
3548
- `);
3630
+ function StatBox({
3631
+ label,
3632
+ value,
3633
+ color
3634
+ }) {
3635
+ return /* @__PURE__ */ jsxs(Box, { gap: 1, children: [
3636
+ /* @__PURE__ */ jsxs(Text, { color: colors.dim, children: [
3637
+ label,
3638
+ ":"
3639
+ ] }),
3640
+ /* @__PURE__ */ jsx(Text, { color: color ?? colors.primary, bold: true, children: String(value) })
3641
+ ] });
3549
3642
  }
3550
3643
 
3551
- // src/commands/init.ts
3644
+ // src/commands/init.tsx
3645
+ import { Fragment, jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
3552
3646
  function mcpStdioEntry() {
3553
3647
  return {
3554
3648
  command: "npx",
@@ -3616,9 +3710,7 @@ var CLIENT_CONFIGS = [
3616
3710
  function detectClients(rootPath) {
3617
3711
  const detected = [];
3618
3712
  for (const client of CLIENT_CONFIGS) {
3619
- if (client.detectDir === null) {
3620
- continue;
3621
- }
3713
+ if (client.detectDir === null) continue;
3622
3714
  const dirPath = path.join(rootPath, client.detectDir);
3623
3715
  if (fs.existsSync(dirPath)) {
3624
3716
  detected.push(client);
@@ -3632,75 +3724,90 @@ function ensureDir(filePath) {
3632
3724
  fs.mkdirSync(dir, { recursive: true });
3633
3725
  }
3634
3726
  }
3635
- function registerInitCommand(program) {
3636
- program.command("init").description("Set up Agent Lint MCP config for detected IDE clients").option("-y, --yes", "Skip confirmation prompts").option("--all", "Generate configs for all supported clients, not just detected ones").action(async (options2) => {
3637
- const rootPath = process.cwd();
3638
- writeStderr("Agent Lint init \u2014 detecting IDE clients...\n");
3639
- const detected = options2.all ? CLIENT_CONFIGS : detectClients(rootPath);
3640
- const created = [];
3641
- const notes = [];
3642
- if (detected.length === 0 && !options2.all) {
3643
- writeStderr(
3644
- "No IDE client directories detected (.cursor/, .windsurf/, .vscode/, .claude/).\nUse --all to generate configs for all supported clients.\n"
3645
- );
3646
- return;
3647
- }
3648
- for (const client of detected) {
3649
- if (!client.configPath) {
3650
- if (client.note) {
3651
- notes.push(`${client.name}: ${client.note}`);
3652
- }
3653
- continue;
3654
- }
3655
- const fullPath = path.join(rootPath, client.configPath);
3656
- if (fs.existsSync(fullPath) && !options2.yes) {
3657
- writeStderr(` [skip] ${client.configPath} already exists.
3658
- `);
3659
- continue;
3660
- }
3661
- const config2 = client.buildConfig();
3662
- if (!config2) {
3663
- if (client.note) {
3664
- notes.push(`${client.name}: ${client.note}`);
3665
- }
3666
- continue;
3667
- }
3668
- ensureDir(fullPath);
3669
- fs.writeFileSync(fullPath, config2, "utf-8");
3670
- created.push(client.configPath);
3671
- writeStderr(` [created] ${client.configPath} (${client.name})
3672
- `);
3727
+ function runInit(options2) {
3728
+ const rootPath = process.cwd();
3729
+ const detected = options2.all ? CLIENT_CONFIGS : detectClients(rootPath);
3730
+ const created = [];
3731
+ const skipped = [];
3732
+ const notes = [];
3733
+ if (detected.length === 0 && !options2.all) {
3734
+ return { created, skipped, notes, noClients: true };
3735
+ }
3736
+ for (const client of detected) {
3737
+ if (!client.configPath) {
3673
3738
  if (client.note) {
3674
- notes.push(`${client.name}: ${client.note}`);
3739
+ notes.push({ client: client.name, note: client.note });
3675
3740
  }
3741
+ continue;
3676
3742
  }
3677
- writeStderr("\n");
3678
- if (created.length > 0) {
3679
- writeStdout(`Created ${created.length} MCP config file(s):
3680
- `);
3681
- for (const p of created) {
3682
- writeStdout(` - ${p}
3683
- `);
3684
- }
3685
- } else {
3686
- writeStdout("No new config files created.\n");
3743
+ const fullPath = path.join(rootPath, client.configPath);
3744
+ if (fs.existsSync(fullPath) && !options2.yes) {
3745
+ skipped.push(`${client.configPath} (${client.name}) \u2014 already exists`);
3746
+ continue;
3687
3747
  }
3688
- if (notes.length > 0) {
3689
- writeStdout("\nManual steps:\n");
3690
- for (const note of notes) {
3691
- writeStdout(` ${note}
3692
- `);
3748
+ const config2 = client.buildConfig();
3749
+ if (!config2) {
3750
+ if (client.note) {
3751
+ notes.push({ client: client.name, note: client.note });
3693
3752
  }
3753
+ continue;
3694
3754
  }
3695
- writeStdout(
3696
- "\nNext: Run `agent-lint doctor` to scan your workspace and generate a fix report.\n"
3697
- );
3698
- });
3755
+ ensureDir(fullPath);
3756
+ fs.writeFileSync(fullPath, config2, "utf-8");
3757
+ created.push(`${client.configPath} (${client.name})`);
3758
+ if (client.note) {
3759
+ notes.push({ client: client.name, note: client.note });
3760
+ }
3761
+ }
3762
+ return { created, skipped, notes, noClients: false };
3763
+ }
3764
+ function InitApp({ options: options2 }) {
3765
+ const [phase, setPhase] = useState("scanning");
3766
+ const [result, setResult] = useState(null);
3767
+ useEffect(() => {
3768
+ const timer = setTimeout(() => {
3769
+ const r = runInit(options2);
3770
+ setResult(r);
3771
+ setPhase("done");
3772
+ }, 300);
3773
+ return () => clearTimeout(timer);
3774
+ }, []);
3775
+ return /* @__PURE__ */ jsxs2(Box2, { flexDirection: "column", children: [
3776
+ /* @__PURE__ */ jsx2(Banner, {}),
3777
+ /* @__PURE__ */ jsx2(Divider, {}),
3778
+ phase === "scanning" && /* @__PURE__ */ jsx2(Box2, { marginTop: 1, marginLeft: 2, children: /* @__PURE__ */ jsx2(Spinner, { label: "Detecting IDE clients..." }) }),
3779
+ phase === "done" && result && /* @__PURE__ */ jsx2(Fragment, { children: result.noClients ? /* @__PURE__ */ jsxs2(Fragment, { children: [
3780
+ /* @__PURE__ */ jsx2(SectionTitle, { children: "No IDE clients detected" }),
3781
+ /* @__PURE__ */ jsx2(Box2, { marginLeft: 2, marginTop: 0, children: /* @__PURE__ */ jsx2(Text2, { color: colors.muted, children: "No .cursor/, .windsurf/, .vscode/, or .claude/ directories found." }) }),
3782
+ /* @__PURE__ */ jsx2(NextStep, { children: "Use --all to generate configs for all supported clients." })
3783
+ ] }) : /* @__PURE__ */ jsxs2(Fragment, { children: [
3784
+ result.created.length > 0 && /* @__PURE__ */ jsxs2(Fragment, { children: [
3785
+ /* @__PURE__ */ jsx2(SectionTitle, { children: "Created" }),
3786
+ result.created.map((item, i) => /* @__PURE__ */ jsx2(SuccessItem, { children: item }, i))
3787
+ ] }),
3788
+ result.skipped.length > 0 && /* @__PURE__ */ jsxs2(Fragment, { children: [
3789
+ /* @__PURE__ */ jsx2(SectionTitle, { children: "Skipped" }),
3790
+ result.skipped.map((item, i) => /* @__PURE__ */ jsx2(SkipItem, { children: item }, i))
3791
+ ] }),
3792
+ result.notes.length > 0 && /* @__PURE__ */ jsxs2(Fragment, { children: [
3793
+ /* @__PURE__ */ jsx2(SectionTitle, { children: "Manual steps" }),
3794
+ result.notes.map((n, i) => /* @__PURE__ */ jsx2(InfoItem, { children: `${n.client}: ${n.note}` }, i))
3795
+ ] }),
3796
+ result.created.length === 0 && result.skipped.length > 0 && /* @__PURE__ */ jsx2(Box2, { marginLeft: 2, marginTop: 1, children: /* @__PURE__ */ jsx2(Text2, { color: colors.muted, children: "No new config files created." }) }),
3797
+ /* @__PURE__ */ jsx2(NextStep, { children: `Run ${"`"}agent-lint doctor${"`"} to scan your workspace.` })
3798
+ ] }) })
3799
+ ] });
3800
+ }
3801
+ function runInitCommand(options2) {
3802
+ render(/* @__PURE__ */ jsx2(InitApp, { options: options2 }));
3699
3803
  }
3700
3804
 
3701
- // src/commands/doctor.ts
3805
+ // src/commands/doctor.tsx
3806
+ import { useState as useState2, useEffect as useEffect2 } from "react";
3702
3807
  import fs3 from "fs";
3703
3808
  import path3 from "path";
3809
+ import { Box as Box3, render as render2 } from "ink";
3810
+ import { Spinner as Spinner2 } from "@inkjs/ui";
3704
3811
 
3705
3812
  // ../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/classic/external.js
3706
3813
  var external_exports = {};
@@ -18060,61 +18167,121 @@ function buildWorkspaceAutofixPlan(rootPath) {
18060
18167
  };
18061
18168
  }
18062
18169
 
18063
- // src/commands/doctor.ts
18170
+ // src/commands/doctor.tsx
18171
+ import { Fragment as Fragment2, jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
18064
18172
  var REPORT_FILENAME = ".agentlint-report.md";
18065
- function registerDoctorCommand(program) {
18066
- program.command("doctor").description("Scan workspace for context artifacts and generate a fix report").option("--stdout", "Print report to stdout instead of writing a file").option("--json", "Output discovery results as JSON").action(async (options2) => {
18173
+ function runDoctor() {
18174
+ const rootPath = process.cwd();
18175
+ const plan = buildWorkspaceAutofixPlan(rootPath);
18176
+ const { discoveryResult } = plan;
18177
+ return {
18178
+ discoveredCount: discoveryResult.discovered.length,
18179
+ missingCount: discoveryResult.missing.length,
18180
+ discovered: discoveryResult.discovered.map(
18181
+ (d) => `${d.relativePath} (${d.type})`
18182
+ ),
18183
+ missing: discoveryResult.missing.map((m) => String(m)),
18184
+ markdown: plan.markdown
18185
+ };
18186
+ }
18187
+ function DoctorApp() {
18188
+ const [phase, setPhase] = useState2("scanning");
18189
+ const [result, setResult] = useState2(null);
18190
+ useEffect2(() => {
18191
+ const timer = setTimeout(() => {
18192
+ const r = runDoctor();
18193
+ const reportPath = path3.join(process.cwd(), REPORT_FILENAME);
18194
+ fs3.writeFileSync(reportPath, r.markdown, "utf-8");
18195
+ setResult(r);
18196
+ setPhase("done");
18197
+ }, 400);
18198
+ return () => clearTimeout(timer);
18199
+ }, []);
18200
+ return /* @__PURE__ */ jsxs3(Box3, { flexDirection: "column", children: [
18201
+ /* @__PURE__ */ jsx3(Banner, {}),
18202
+ /* @__PURE__ */ jsx3(Divider, {}),
18203
+ phase === "scanning" && /* @__PURE__ */ jsx3(Box3, { marginTop: 1, marginLeft: 2, children: /* @__PURE__ */ jsx3(Spinner2, { label: "Scanning workspace for context artifacts..." }) }),
18204
+ phase === "done" && result && /* @__PURE__ */ jsxs3(Fragment2, { children: [
18205
+ /* @__PURE__ */ jsx3(SectionTitle, { children: "Scan results" }),
18206
+ /* @__PURE__ */ jsxs3(Box3, { marginLeft: 2, gap: 3, marginTop: 0, children: [
18207
+ /* @__PURE__ */ jsx3(
18208
+ StatBox,
18209
+ {
18210
+ label: "Found",
18211
+ value: result.discoveredCount,
18212
+ color: result.discoveredCount > 0 ? colors.success : colors.warning
18213
+ }
18214
+ ),
18215
+ /* @__PURE__ */ jsx3(
18216
+ StatBox,
18217
+ {
18218
+ label: "Missing",
18219
+ value: result.missingCount,
18220
+ color: result.missingCount > 0 ? colors.warning : colors.success
18221
+ }
18222
+ )
18223
+ ] }),
18224
+ result.discovered.length > 0 && /* @__PURE__ */ jsxs3(Fragment2, { children: [
18225
+ /* @__PURE__ */ jsx3(SectionTitle, { children: "Discovered artifacts" }),
18226
+ result.discovered.map((item, i) => /* @__PURE__ */ jsx3(SuccessItem, { children: item }, i))
18227
+ ] }),
18228
+ result.missing.length > 0 && /* @__PURE__ */ jsxs3(Fragment2, { children: [
18229
+ /* @__PURE__ */ jsx3(SectionTitle, { children: "Missing artifact types" }),
18230
+ result.missing.map((item, i) => /* @__PURE__ */ jsx3(ErrorItem, { children: item }, i))
18231
+ ] }),
18232
+ /* @__PURE__ */ jsx3(SectionTitle, { children: "Report saved" }),
18233
+ /* @__PURE__ */ jsx3(InfoItem, { children: REPORT_FILENAME }),
18234
+ /* @__PURE__ */ jsx3(NextStep, { children: `Run ${"agent-lint prompt"} to get a copy-paste prompt for your IDE.` })
18235
+ ] })
18236
+ ] });
18237
+ }
18238
+ function runDoctorCommand(options2) {
18239
+ if (options2.json) {
18067
18240
  const rootPath = process.cwd();
18068
- writeStderr("Agent Lint doctor \u2014 scanning workspace...\n");
18069
18241
  const plan = buildWorkspaceAutofixPlan(rootPath);
18070
- const { discoveryResult } = plan;
18071
- writeStderr(
18072
- ` Found ${discoveryResult.discovered.length} artifact(s), ${discoveryResult.missing.length} type(s) missing.
18073
-
18074
- `
18075
- );
18076
- if (options2.json) {
18077
- writeStdout(JSON.stringify(discoveryResult, null, 2));
18078
- return;
18079
- }
18080
- if (options2.stdout) {
18081
- writeStdout(plan.markdown);
18082
- return;
18083
- }
18084
- const reportPath = path3.join(rootPath, REPORT_FILENAME);
18085
- fs3.writeFileSync(reportPath, plan.markdown, "utf-8");
18086
- writeStdout(`Report written to ${REPORT_FILENAME}
18087
- `);
18088
- writeStdout(
18089
- `
18090
- Next: Run \`agent-lint prompt\` to get a copy-paste prompt for your IDE.
18091
- `
18092
- );
18093
- });
18242
+ process.stdout.write(JSON.stringify(plan.discoveryResult, null, 2) + "\n");
18243
+ return;
18244
+ }
18245
+ if (options2.stdout) {
18246
+ const result = runDoctor();
18247
+ process.stdout.write(result.markdown + "\n");
18248
+ return;
18249
+ }
18250
+ render2(/* @__PURE__ */ jsx3(DoctorApp, {}));
18094
18251
  }
18095
18252
 
18096
- // src/commands/prompt.ts
18253
+ // src/commands/prompt.tsx
18097
18254
  import fs4 from "fs";
18098
18255
  import path4 from "path";
18256
+ import { Box as Box4, Text as Text4, render as render3 } from "ink";
18257
+ import { jsx as jsx4, jsxs as jsxs4 } from "react/jsx-runtime";
18099
18258
  var REPORT_FILENAME2 = ".agentlint-report.md";
18100
18259
  var PROMPT_WITH_REPORT = "Read the file .agentlint-report.md in this project and execute all recommended fixes. Use the agentlint MCP tools (agentlint_get_guidelines, agentlint_plan_workspace_autofix) for detailed guidelines on each artifact type. Apply all changes directly.";
18101
18260
  var PROMPT_WITHOUT_REPORT = "Run agentlint_plan_workspace_autofix to scan this project for AI agent context artifacts (AGENTS.md, skills, rules, workflows, plans). Then execute the fix plan step by step. Use agentlint_get_guidelines for each artifact type before editing. Apply all changes directly.";
18102
- function registerPromptCommand(program) {
18103
- program.command("prompt").description("Print a copy-paste prompt for your IDE chat to trigger autofix").action(async () => {
18104
- const rootPath = process.cwd();
18105
- const reportPath = path4.join(rootPath, REPORT_FILENAME2);
18106
- const hasReport = fs4.existsSync(reportPath);
18107
- const prompt = hasReport ? PROMPT_WITH_REPORT : PROMPT_WITHOUT_REPORT;
18108
- writeStdout(prompt);
18109
- if (!hasReport) {
18110
- writeStdout(
18111
- "\n\nTip: Run `agent-lint doctor` first to generate a detailed report for better results."
18112
- );
18113
- }
18114
- });
18261
+ function PromptApp() {
18262
+ const rootPath = process.cwd();
18263
+ const reportPath = path4.join(rootPath, REPORT_FILENAME2);
18264
+ const hasReport = fs4.existsSync(reportPath);
18265
+ const prompt = hasReport ? PROMPT_WITH_REPORT : PROMPT_WITHOUT_REPORT;
18266
+ return /* @__PURE__ */ jsxs4(Box4, { flexDirection: "column", children: [
18267
+ /* @__PURE__ */ jsx4(Banner, {}),
18268
+ /* @__PURE__ */ jsx4(Divider, {}),
18269
+ /* @__PURE__ */ jsx4(SectionTitle, { children: "Copy this prompt into your IDE chat" }),
18270
+ /* @__PURE__ */ jsx4(PromptBox, { children: prompt }),
18271
+ hasReport ? /* @__PURE__ */ jsxs4(Box4, { marginLeft: 2, children: [
18272
+ /* @__PURE__ */ jsx4(Text4, { color: colors.success, children: "\u2714 " }),
18273
+ /* @__PURE__ */ jsxs4(Text4, { color: colors.muted, children: [
18274
+ "Using report from ",
18275
+ REPORT_FILENAME2
18276
+ ] })
18277
+ ] }) : /* @__PURE__ */ jsx4(Hint, { children: `Run ${"`"}agent-lint doctor${"`"} first to generate a detailed report for better results.` })
18278
+ ] });
18279
+ }
18280
+ function runPromptCommand() {
18281
+ render3(/* @__PURE__ */ jsx4(PromptApp, {}));
18115
18282
  }
18116
18283
 
18117
- // src/index.ts
18284
+ // src/index.tsx
18118
18285
  var nodeVersion = parseInt(process.versions.node.split(".")[0], 10);
18119
18286
  if (nodeVersion < 18) {
18120
18287
  process.stderr.write(
@@ -18123,25 +18290,27 @@ if (nodeVersion < 18) {
18123
18290
  );
18124
18291
  process.exit(1);
18125
18292
  }
18126
- async function main() {
18127
- redirectLogsToStderr();
18128
- const program = new Command();
18129
- program.name("agent-lint").description("Meta-agent orchestrator for AI coding agent context artifacts").version("0.2.0").showHelpAfterError();
18130
- registerInitCommand(program);
18131
- registerDoctorCommand(program);
18132
- registerPromptCommand(program);
18133
- const argv = process.argv.slice(2);
18134
- const normalizedArgv = argv[0] === "--" ? argv.slice(1) : argv;
18135
- try {
18136
- await program.parseAsync([process.argv[0], process.argv[1], ...normalizedArgv]);
18137
- } catch (error48) {
18138
- const message = error48 instanceof Error ? error48.message : "Unknown CLI error";
18139
- process.stderr.write(`${message}
18293
+ var program = new Command();
18294
+ program.name("agent-lint").description("Meta-agent orchestrator for AI coding agent context artifacts").version("0.3.0").showHelpAfterError();
18295
+ program.command("init").description("Set up Agent Lint MCP config for detected IDE clients").option("-y, --yes", "Skip confirmation prompts").option("--all", "Generate configs for all supported clients, not just detected ones").action((options2) => {
18296
+ runInitCommand(options2);
18297
+ });
18298
+ program.command("doctor").description("Scan workspace for context artifacts and generate a fix report").option("--stdout", "Print report to stdout instead of writing a file").option("--json", "Output discovery results as JSON").action((options2) => {
18299
+ runDoctorCommand(options2);
18300
+ });
18301
+ program.command("prompt").description("Print a copy-paste prompt for your IDE chat to trigger autofix").action(() => {
18302
+ runPromptCommand();
18303
+ });
18304
+ var argv = process.argv.slice(2);
18305
+ var normalizedArgv = argv[0] === "--" ? argv.slice(1) : argv;
18306
+ try {
18307
+ program.parse([process.argv[0], process.argv[1], ...normalizedArgv]);
18308
+ } catch (error48) {
18309
+ const message = error48 instanceof Error ? error48.message : "Unknown CLI error";
18310
+ process.stderr.write(`${message}
18140
18311
  `);
18141
- process.exitCode = 2;
18142
- }
18312
+ process.exitCode = 2;
18143
18313
  }
18144
- void main();
18145
18314
  /*! Bundled license information:
18146
18315
 
18147
18316
  is-extendable/index.js: