@jpoindexter/agent-smith 1.1.2 → 1.1.3
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/cli.js +13 -3
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -623,10 +623,20 @@ import { join as join4, relative } from "path";
|
|
|
623
623
|
import { execSync as execSync3 } from "child_process";
|
|
624
624
|
import { readFileSync as readFileSync4 } from "fs";
|
|
625
625
|
import { fileURLToPath } from "url";
|
|
626
|
-
import { dirname } from "path";
|
|
626
|
+
import { dirname, join as pathJoin } from "path";
|
|
627
627
|
var __filename = fileURLToPath(import.meta.url);
|
|
628
628
|
var __dirname = dirname(__filename);
|
|
629
|
-
var
|
|
629
|
+
var packageVersion = "1.1.2";
|
|
630
|
+
try {
|
|
631
|
+
const packageJson = JSON.parse(readFileSync4(pathJoin(__dirname, "../package.json"), "utf-8"));
|
|
632
|
+
packageVersion = packageJson.version;
|
|
633
|
+
} catch {
|
|
634
|
+
try {
|
|
635
|
+
const packageJson = JSON.parse(readFileSync4(pathJoin(__dirname, "package.json"), "utf-8"));
|
|
636
|
+
packageVersion = packageJson.version;
|
|
637
|
+
} catch {
|
|
638
|
+
}
|
|
639
|
+
}
|
|
630
640
|
var cli = cac("agentsmith");
|
|
631
641
|
cli.command("[dir]", "Generate AGENTS.md from your codebase").option("-o, --output <file>", "Output file path", { default: "AGENTS.md" }).option("--dry-run", "Preview without writing file").option("--force", "Overwrite existing AGENTS.md even if it has custom content").option("--compact", "Generate compact output (fewer details, smaller token count)").option("--json", "Also generate AGENTS.index.json for programmatic access").option("--check-secrets", "Scan for potential secrets and warn before output").option("--include-git-log", "Include recent git commits in output").option("--xml", "Output in XML format (industry standard)").option("--remote <url>", "Clone and analyze a remote GitHub repository").option("--compress", "Extract signatures only (reduce tokens by ~40%)").option("--minimal", "Ultra-compact output (~3K tokens) - TL;DR + rules + component names").option("--tree", "Include file tree in output (off by default)").option("--copy", "Copy output to clipboard").option("--include-diffs", "Include uncommitted git changes").option("--split-output <size>", "Split output into chunks (e.g., 100kb, 500kb)").option("--security", "Include security audit (npm audit) in output").option("--monorepo", "Generate AGENTS.md for each package in monorepo").option("--mcp", "Start as MCP server (for AI tool integration)").option("--watch", "Watch for file changes and regenerate automatically").action(async (dir, options) => {
|
|
632
642
|
if (options.mcp) {
|
|
@@ -1007,5 +1017,5 @@ cli.command("[dir]", "Generate AGENTS.md from your codebase").option("-o, --outp
|
|
|
1007
1017
|
}
|
|
1008
1018
|
});
|
|
1009
1019
|
cli.help();
|
|
1010
|
-
cli.version(
|
|
1020
|
+
cli.version(packageVersion);
|
|
1011
1021
|
cli.parse();
|