@aiready/cli 0.13.6 → 0.13.7

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.
@@ -1,6 +1,6 @@
1
1
 
2
2
  
3
- > @aiready/cli@0.13.5 build /Users/pengcao/projects/aiready/packages/cli
3
+ > @aiready/cli@0.13.7 build /Users/pengcao/projects/aiready/packages/cli
4
4
  > tsup src/index.ts src/cli.ts --format cjs,esm
5
5
 
6
6
  CLI Building entry: src/cli.ts, src/index.ts
@@ -10,20 +10,20 @@
10
10
  CJS Build start
11
11
  ESM Build start
12
12
 
13
-  WARN  ▲ [WARNING] "import.meta" is not available with the "cjs" output format and will be empty [empty-import-meta] 8:31:33 am
13
+  WARN  ▲ [WARNING] "import.meta" is not available with the "cjs" output format and will be empty [empty-import-meta] 10:35:58 am
14
14
 
15
- src/cli.ts:34:31:
16
-  34 │ return dirname(fileURLToPath(import.meta.url));
15
+ src/cli.ts:28:31:
16
+  28 │ return dirname(fileURLToPath(import.meta.url));
17
17
  ╵ ~~~~~~~~~~~
18
18
 
19
19
  You need to set the output format to "esm" for "import.meta" to work correctly.
20
20
 
21
21
 
22
22
 
23
- CJS dist/cli.js 87.71 KB
24
23
  CJS dist/index.js 10.62 KB
25
- CJS ⚡️ Build success in 61ms
26
- ESM dist/index.mjs 170.00 B
24
+ CJS dist/cli.js 80.45 KB
25
+ CJS ⚡️ Build success in 109ms
27
26
  ESM dist/chunk-VOKP7FGM.mjs 9.52 KB
28
- ESM dist/cli.mjs 73.71 KB
29
- ESM ⚡️ Build success in 61ms
27
+ ESM dist/cli.mjs 66.94 KB
28
+ ESM dist/index.mjs 170.00 B
29
+ ESM ⚡️ Build success in 109ms
package/dist/cli.js CHANGED
@@ -25,8 +25,8 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
25
25
 
26
26
  // src/cli.ts
27
27
  var import_commander = require("commander");
28
- var import_fs7 = require("fs");
29
- var import_path9 = require("path");
28
+ var import_fs6 = require("fs");
29
+ var import_path8 = require("path");
30
30
  var import_url = require("url");
31
31
 
32
32
  // src/commands/scan.ts
@@ -1759,7 +1759,11 @@ Type: ${type}
1759
1759
  return;
1760
1760
  } catch (error) {
1761
1761
  console.error(import_chalk11.default.red("\n\u274C Failed to submit via gh CLI."));
1762
- console.log(import_chalk11.default.yellow(' Make sure gh is installed and run "gh auth login".\n'));
1762
+ console.log(
1763
+ import_chalk11.default.yellow(
1764
+ ' Make sure gh is installed and run "gh auth login".\n'
1765
+ )
1766
+ );
1763
1767
  console.log(import_chalk11.default.dim(" Falling back to URL generation..."));
1764
1768
  }
1765
1769
  }
@@ -1802,158 +1806,14 @@ EXAMPLES:
1802
1806
  $ aiready bug "Fix typo in scan output" --submit # Submit directly via gh CLI
1803
1807
  `;
1804
1808
 
1805
- // src/commands/clawmart.ts
1806
- var import_chalk12 = __toESM(require("chalk"));
1807
- var import_fs6 = __toESM(require("fs"));
1808
- var import_path8 = require("path");
1809
- var import_clawmart = require("@aiready/clawmart");
1810
- function getClient(options) {
1811
- const apiKey = options.apiKey || process.env.CLAWMART_API_KEY;
1812
- if (!apiKey) {
1813
- console.error(import_chalk12.default.red("\u274C ClawMart API Key is required."));
1814
- console.log(
1815
- import_chalk12.default.dim(
1816
- " Set CLAWMART_API_KEY environment variable or use --api-key flag."
1817
- )
1818
- );
1819
- process.exit(1);
1820
- }
1821
- return new import_clawmart.ClawMartClient(apiKey, options.server);
1822
- }
1823
- async function clawmartMeAction(options) {
1824
- const client = getClient(options);
1825
- try {
1826
- const me = await client.getMe();
1827
- console.log(import_chalk12.default.blue("\n\u{1F464} ClawMart Profile:"));
1828
- console.log(` Name: ${import_chalk12.default.bold(me.name)}`);
1829
- console.log(` Email: ${me.email}`);
1830
- console.log(` Role: ${me.isCreator ? "Creator" : "User"}`);
1831
- console.log(
1832
- ` Sub: ${me.subscriptionActive ? import_chalk12.default.green("Active") : import_chalk12.default.red("Inactive")}`
1833
- );
1834
- } catch (error) {
1835
- console.error(import_chalk12.default.red(`\u274C Failed to fetch profile: ${error.message}`));
1836
- }
1837
- }
1838
- async function clawmartListingsAction(options) {
1839
- const client = getClient(options);
1840
- try {
1841
- let listings;
1842
- if (options.query) {
1843
- listings = await client.searchListings(
1844
- options.query,
1845
- options.type,
1846
- options.limit
1847
- );
1848
- } else {
1849
- listings = await client.getListings();
1850
- }
1851
- if (listings.length === 0) {
1852
- console.log(import_chalk12.default.yellow("\n\u{1F4ED} No listings found."));
1853
- return;
1854
- }
1855
- console.log(import_chalk12.default.blue(`
1856
- \u{1F3E0} ClawMart Listings (${listings.length}):`));
1857
- listings.forEach((l) => {
1858
- const status = l.published ? import_chalk12.default.green("Published") : import_chalk12.default.yellow("Draft");
1859
- console.log(` - ${import_chalk12.default.bold(l.name)} (${import_chalk12.default.dim(l.id)})`);
1860
- console.log(` ${import_chalk12.default.italic(l.tagline)}`);
1861
- console.log(
1862
- ` Price: $${l.price} | Type: ${l.productType} | Status: ${status}`
1863
- );
1864
- console.log("");
1865
- });
1866
- } catch (error) {
1867
- console.error(import_chalk12.default.red(`\u274C Failed to fetch listings: ${error.message}`));
1868
- }
1869
- }
1870
- async function clawmartCreateAction(options) {
1871
- const client = getClient(options);
1872
- try {
1873
- const data = {
1874
- name: options.name,
1875
- tagline: options.tagline,
1876
- about: options.about || "",
1877
- category: options.category || "Utility",
1878
- capabilities: options.capabilities ? options.capabilities.split(",") : [],
1879
- price: parseFloat(options.price) || 0,
1880
- productType: options.type
1881
- };
1882
- const listing = await client.createListing(data);
1883
- console.log(import_chalk12.default.green(`
1884
- \u2705 Listing created successfully!`));
1885
- console.log(` ID: ${listing.id}`);
1886
- console.log(` Name: ${listing.name}`);
1887
- } catch (error) {
1888
- console.error(import_chalk12.default.red(`\u274C Failed to create listing: ${error.message}`));
1889
- }
1890
- }
1891
- async function clawmartUploadAction(id, files, options) {
1892
- const client = getClient(options);
1893
- try {
1894
- const fileData = files.map((f) => {
1895
- const path = (0, import_path8.resolve)(process.cwd(), f);
1896
- if (!import_fs6.default.existsSync(path)) {
1897
- throw new Error(`File not found: ${f}`);
1898
- }
1899
- return {
1900
- path: f,
1901
- content: import_fs6.default.readFileSync(path, "utf-8")
1902
- };
1903
- });
1904
- await client.uploadVersion(id, fileData);
1905
- console.log(
1906
- import_chalk12.default.green(`
1907
- \u2705 New version uploaded successfully to listing ${id}!`)
1908
- );
1909
- } catch (error) {
1910
- console.error(import_chalk12.default.red(`\u274C Failed to upload version: ${error.message}`));
1911
- }
1912
- }
1913
- async function clawmartDownloadAction(idOrSlug, options) {
1914
- const client = getClient(options);
1915
- try {
1916
- const pkg = await client.downloadPackage(idOrSlug);
1917
- const outDir = options.outDir || `./clawmart-${pkg.slug}`;
1918
- if (!import_fs6.default.existsSync(outDir)) {
1919
- import_fs6.default.mkdirSync(outDir, { recursive: true });
1920
- }
1921
- pkg.files.forEach((f) => {
1922
- const filePath = (0, import_path8.resolve)(outDir, f.path);
1923
- const dir = (0, import_path8.resolve)(filePath, "..");
1924
- if (!import_fs6.default.existsSync(dir)) {
1925
- import_fs6.default.mkdirSync(dir, { recursive: true });
1926
- }
1927
- import_fs6.default.writeFileSync(filePath, f.content);
1928
- });
1929
- console.log(
1930
- import_chalk12.default.green(`
1931
- \u2705 Package ${idOrSlug} downloaded to ${outDir}`)
1932
- );
1933
- } catch (error) {
1934
- console.error(import_chalk12.default.red(`\u274C Failed to download package: ${error.message}`));
1935
- }
1936
- }
1937
- var clawmartHelpText = `
1938
- EXAMPLES:
1939
- $ aiready clawmart me
1940
- $ aiready clawmart listings --query "marketing"
1941
- $ aiready clawmart create --name "SEO Booster" --tagline "Boost your SEO" --type skill --price 10
1942
- $ aiready clawmart upload <listing-id> SKILL.md rules/
1943
- $ aiready clawmart download <listing-id-or-slug> --outDir ./my-skill
1944
-
1945
- ENVIRONMENT VARIABLES:
1946
- CLAWMART_API_KEY Your ClawMart creator API key
1947
- `;
1948
-
1949
1809
  // src/cli.ts
1950
1810
  var import_meta = {};
1951
1811
  var getDirname = () => {
1952
1812
  if (typeof __dirname !== "undefined") return __dirname;
1953
- return (0, import_path9.dirname)((0, import_url.fileURLToPath)(import_meta.url));
1813
+ return (0, import_path8.dirname)((0, import_url.fileURLToPath)(import_meta.url));
1954
1814
  };
1955
1815
  var packageJson = JSON.parse(
1956
- (0, import_fs7.readFileSync)((0, import_path9.join)(getDirname(), "../package.json"), "utf8")
1816
+ (0, import_fs6.readFileSync)((0, import_path8.join)(getDirname(), "../package.json"), "utf8")
1957
1817
  );
1958
1818
  var program = new import_commander.Command();
1959
1819
  program.name("aiready").description("AIReady - Assess and improve AI-readiness of codebases").version(packageJson.version).addHelpText(
@@ -2006,10 +1866,7 @@ program.command("scan").description(
2006
1866
  ).option(
2007
1867
  "--compare-to <path>",
2008
1868
  "Compare results against a previous AIReady report JSON"
2009
- ).option("--include <patterns>", "File patterns to include (comma-separated)").option("--exclude <patterns>", "File patterns to exclude (comma-separated)").option("-o, --output <format>", "Output format: console, json", "console").option("--output-file <path>", "Output file path (for json)").option("--score", "Calculate and display AI Readiness Score (0-100)", true).option(
2010
- "--no-score",
2011
- "Disable calculating AI Readiness Score"
2012
- ).option("--weights <weights>", "Custom scoring weights").option("--threshold <score>", "Fail CI/CD if score below threshold (0-100)").option(
1869
+ ).option("--include <patterns>", "File patterns to include (comma-separated)").option("--exclude <patterns>", "File patterns to exclude (comma-separated)").option("-o, --output <format>", "Output format: console, json", "console").option("--output-file <path>", "Output file path (for json)").option("--score", "Calculate and display AI Readiness Score (0-100)", true).option("--no-score", "Disable calculating AI Readiness Score").option("--weights <weights>", "Custom scoring weights").option("--threshold <score>", "Fail CI/CD if score below threshold (0-100)").option(
2013
1870
  "--ci",
2014
1871
  "CI mode: GitHub Actions annotations, no colors, fail on threshold"
2015
1872
  ).option(
@@ -2028,28 +1885,14 @@ program.command("patterns").description("Detect duplicate code patterns that con
2028
1885
  ).option(
2029
1886
  "--full-scan",
2030
1887
  "Disable smart defaults for comprehensive analysis (slower)"
2031
- ).option("--include <patterns>", "File patterns to include (comma-separated)").option("--exclude <patterns>", "File patterns to exclude (comma-separated)").option("-o, --output <format>", "Output format: console, json", "console").option("--output-file <path>", "Output file path (for json)").option(
2032
- "--score",
2033
- "Calculate and display AI Readiness Score (0-100)",
2034
- true
2035
- ).option(
2036
- "--no-score",
2037
- "Disable calculating AI Readiness Score"
2038
- ).addHelpText("after", patternsHelpText).action(async (directory, options) => {
1888
+ ).option("--include <patterns>", "File patterns to include (comma-separated)").option("--exclude <patterns>", "File patterns to exclude (comma-separated)").option("-o, --output <format>", "Output format: console, json", "console").option("--output-file <path>", "Output file path (for json)").option("--score", "Calculate and display AI Readiness Score (0-100)", true).option("--no-score", "Disable calculating AI Readiness Score").addHelpText("after", patternsHelpText).action(async (directory, options) => {
2039
1889
  await patternsAction(directory, options);
2040
1890
  });
2041
1891
  program.command("context").description("Analyze context window costs and dependency fragmentation").argument("[directory]", "Directory to analyze", ".").option("--max-depth <number>", "Maximum acceptable import depth", "5").option(
2042
1892
  "--max-context <number>",
2043
1893
  "Maximum acceptable context budget (tokens)",
2044
1894
  "10000"
2045
- ).option("--include <patterns>", "File patterns to include (comma-separated)").option("--exclude <patterns>", "File patterns to exclude (comma-separated)").option("-o, --output <format>", "Output format: console, json", "console").option("--output-file <path>", "Output file path (for json)").option(
2046
- "--score",
2047
- "Calculate and display AI Readiness Score (0-100)",
2048
- true
2049
- ).option(
2050
- "--no-score",
2051
- "Disable calculating AI Readiness Score"
2052
- ).action(async (directory, options) => {
1895
+ ).option("--include <patterns>", "File patterns to include (comma-separated)").option("--exclude <patterns>", "File patterns to exclude (comma-separated)").option("-o, --output <format>", "Output format: console, json", "console").option("--output-file <path>", "Output file path (for json)").option("--score", "Calculate and display AI Readiness Score (0-100)", true).option("--no-score", "Disable calculating AI Readiness Score").action(async (directory, options) => {
2053
1896
  await contextAction(directory, options);
2054
1897
  });
2055
1898
  program.command("consistency").description("Check naming conventions and architectural consistency").argument("[directory]", "Directory to analyze", ".").option("--naming", "Check naming conventions (default: true)").option("--no-naming", "Skip naming analysis").option("--patterns", "Check code patterns (default: true)").option("--no-patterns", "Skip pattern analysis").option(
@@ -2060,14 +1903,7 @@ program.command("consistency").description("Check naming conventions and archite
2060
1903
  "-o, --output <format>",
2061
1904
  "Output format: console, json, markdown",
2062
1905
  "console"
2063
- ).option("--output-file <path>", "Output file path (for json/markdown)").option(
2064
- "--score",
2065
- "Calculate and display AI Readiness Score (0-100)",
2066
- true
2067
- ).option(
2068
- "--no-score",
2069
- "Disable calculating AI Readiness Score"
2070
- ).action(async (directory, options) => {
1906
+ ).option("--output-file <path>", "Output file path (for json/markdown)").option("--score", "Calculate and display AI Readiness Score (0-100)", true).option("--no-score", "Disable calculating AI Readiness Score").action(async (directory, options) => {
2071
1907
  await consistencyAction(directory, options);
2072
1908
  });
2073
1909
  program.command("visualise").description("Alias for visualize (British spelling)").argument("[directory]", "Directory to analyze", ".").option(
@@ -2115,22 +1951,6 @@ program.command("testability").description("Analyze test coverage and AI readine
2115
1951
  program.command("upload").description("Upload an AIReady report JSON to the platform").argument("<file>", "Report JSON file to upload").option("--api-key <key>", "Platform API key").option("--repo-id <id>", "Platform repository ID (optional)").option("--server <url>", "Custom platform URL").addHelpText("after", uploadHelpText).action(async (file, options) => {
2116
1952
  await uploadAction(file, options);
2117
1953
  });
2118
- var clawmart = program.command("clawmart").description("Manage ClawMart personas and skills").addHelpText("after", clawmartHelpText);
2119
- clawmart.command("me").description("Show my ClawMart creator profile").option("--api-key <key>", "ClawMart API key").option("--server <url>", "Custom ClawMart API server").action(async (options) => {
2120
- await clawmartMeAction(options);
2121
- });
2122
- clawmart.command("listings").description("Show my ClawMart listings").option("-q, --query <string>", "Search query").option("-t, --type <type>", "Filter by type: skill, persona").option("-l, --limit <number>", "Limit results", "10").option("--api-key <key>", "ClawMart API key").option("--server <url>", "Custom ClawMart API server").action(async (options) => {
2123
- await clawmartListingsAction(options);
2124
- });
2125
- clawmart.command("create").description("Create a new listing on ClawMart").requiredOption("--name <string>", "Listing name").requiredOption("--tagline <string>", "Short tagline").option("--about <string>", "Full description").option("--category <string>", "Category", "Utility").option("--capabilities <string>", "Comma-separated list of capabilities").option("--price <number>", "Price in USD", "0").option("--type <type>", "Product type: skill, persona", "skill").option("--api-key <key>", "ClawMart API key").option("--server <url>", "Custom ClawMart API server").action(async (options) => {
2126
- await clawmartCreateAction(options);
2127
- });
2128
- clawmart.command("upload").description("Upload content to a listing").argument("<id>", "Listing ID").argument("<files...>", "Files or directories to upload").option("--api-key <key>", "ClawMart API key").option("--server <url>", "Custom ClawMart API server").action(async (id, files, options) => {
2129
- await clawmartUploadAction(id, files, options);
2130
- });
2131
- clawmart.command("download").description("Download a package from ClawMart").argument("<idOrSlug>", "Listing ID or Slug").option("--outDir <path>", "Output directory").option("--api-key <key>", "ClawMart API key").option("--server <url>", "Custom ClawMart API server").action(async (idOrSlug, options) => {
2132
- await clawmartDownloadAction(idOrSlug, options);
2133
- });
2134
1954
  program.command("bug").description("Report a bug or provide feedback (Agent-friendly)").argument("[message]", "Short description of the issue").option("-t, --type <type>", "Issue type: bug, feature, metric", "bug").option("--submit", "Submit the issue directly using the GitHub CLI (gh)").addHelpText("after", bugHelpText).action(async (message, options) => {
2135
1955
  await bugAction(message, options);
2136
1956
  });
package/dist/cli.mjs CHANGED
@@ -1520,7 +1520,11 @@ Type: ${type}
1520
1520
  return;
1521
1521
  } catch (error) {
1522
1522
  console.error(chalk11.red("\n\u274C Failed to submit via gh CLI."));
1523
- console.log(chalk11.yellow(' Make sure gh is installed and run "gh auth login".\n'));
1523
+ console.log(
1524
+ chalk11.yellow(
1525
+ ' Make sure gh is installed and run "gh auth login".\n'
1526
+ )
1527
+ );
1524
1528
  console.log(chalk11.dim(" Falling back to URL generation..."));
1525
1529
  }
1526
1530
  }
@@ -1563,152 +1567,6 @@ EXAMPLES:
1563
1567
  $ aiready bug "Fix typo in scan output" --submit # Submit directly via gh CLI
1564
1568
  `;
1565
1569
 
1566
- // src/commands/clawmart.ts
1567
- import chalk12 from "chalk";
1568
- import fs2 from "fs";
1569
- import { resolve as resolvePath8 } from "path";
1570
- import {
1571
- ClawMartClient
1572
- } from "@aiready/clawmart";
1573
- function getClient(options) {
1574
- const apiKey = options.apiKey || process.env.CLAWMART_API_KEY;
1575
- if (!apiKey) {
1576
- console.error(chalk12.red("\u274C ClawMart API Key is required."));
1577
- console.log(
1578
- chalk12.dim(
1579
- " Set CLAWMART_API_KEY environment variable or use --api-key flag."
1580
- )
1581
- );
1582
- process.exit(1);
1583
- }
1584
- return new ClawMartClient(apiKey, options.server);
1585
- }
1586
- async function clawmartMeAction(options) {
1587
- const client = getClient(options);
1588
- try {
1589
- const me = await client.getMe();
1590
- console.log(chalk12.blue("\n\u{1F464} ClawMart Profile:"));
1591
- console.log(` Name: ${chalk12.bold(me.name)}`);
1592
- console.log(` Email: ${me.email}`);
1593
- console.log(` Role: ${me.isCreator ? "Creator" : "User"}`);
1594
- console.log(
1595
- ` Sub: ${me.subscriptionActive ? chalk12.green("Active") : chalk12.red("Inactive")}`
1596
- );
1597
- } catch (error) {
1598
- console.error(chalk12.red(`\u274C Failed to fetch profile: ${error.message}`));
1599
- }
1600
- }
1601
- async function clawmartListingsAction(options) {
1602
- const client = getClient(options);
1603
- try {
1604
- let listings;
1605
- if (options.query) {
1606
- listings = await client.searchListings(
1607
- options.query,
1608
- options.type,
1609
- options.limit
1610
- );
1611
- } else {
1612
- listings = await client.getListings();
1613
- }
1614
- if (listings.length === 0) {
1615
- console.log(chalk12.yellow("\n\u{1F4ED} No listings found."));
1616
- return;
1617
- }
1618
- console.log(chalk12.blue(`
1619
- \u{1F3E0} ClawMart Listings (${listings.length}):`));
1620
- listings.forEach((l) => {
1621
- const status = l.published ? chalk12.green("Published") : chalk12.yellow("Draft");
1622
- console.log(` - ${chalk12.bold(l.name)} (${chalk12.dim(l.id)})`);
1623
- console.log(` ${chalk12.italic(l.tagline)}`);
1624
- console.log(
1625
- ` Price: $${l.price} | Type: ${l.productType} | Status: ${status}`
1626
- );
1627
- console.log("");
1628
- });
1629
- } catch (error) {
1630
- console.error(chalk12.red(`\u274C Failed to fetch listings: ${error.message}`));
1631
- }
1632
- }
1633
- async function clawmartCreateAction(options) {
1634
- const client = getClient(options);
1635
- try {
1636
- const data = {
1637
- name: options.name,
1638
- tagline: options.tagline,
1639
- about: options.about || "",
1640
- category: options.category || "Utility",
1641
- capabilities: options.capabilities ? options.capabilities.split(",") : [],
1642
- price: parseFloat(options.price) || 0,
1643
- productType: options.type
1644
- };
1645
- const listing = await client.createListing(data);
1646
- console.log(chalk12.green(`
1647
- \u2705 Listing created successfully!`));
1648
- console.log(` ID: ${listing.id}`);
1649
- console.log(` Name: ${listing.name}`);
1650
- } catch (error) {
1651
- console.error(chalk12.red(`\u274C Failed to create listing: ${error.message}`));
1652
- }
1653
- }
1654
- async function clawmartUploadAction(id, files, options) {
1655
- const client = getClient(options);
1656
- try {
1657
- const fileData = files.map((f) => {
1658
- const path = resolvePath8(process.cwd(), f);
1659
- if (!fs2.existsSync(path)) {
1660
- throw new Error(`File not found: ${f}`);
1661
- }
1662
- return {
1663
- path: f,
1664
- content: fs2.readFileSync(path, "utf-8")
1665
- };
1666
- });
1667
- await client.uploadVersion(id, fileData);
1668
- console.log(
1669
- chalk12.green(`
1670
- \u2705 New version uploaded successfully to listing ${id}!`)
1671
- );
1672
- } catch (error) {
1673
- console.error(chalk12.red(`\u274C Failed to upload version: ${error.message}`));
1674
- }
1675
- }
1676
- async function clawmartDownloadAction(idOrSlug, options) {
1677
- const client = getClient(options);
1678
- try {
1679
- const pkg = await client.downloadPackage(idOrSlug);
1680
- const outDir = options.outDir || `./clawmart-${pkg.slug}`;
1681
- if (!fs2.existsSync(outDir)) {
1682
- fs2.mkdirSync(outDir, { recursive: true });
1683
- }
1684
- pkg.files.forEach((f) => {
1685
- const filePath = resolvePath8(outDir, f.path);
1686
- const dir = resolvePath8(filePath, "..");
1687
- if (!fs2.existsSync(dir)) {
1688
- fs2.mkdirSync(dir, { recursive: true });
1689
- }
1690
- fs2.writeFileSync(filePath, f.content);
1691
- });
1692
- console.log(
1693
- chalk12.green(`
1694
- \u2705 Package ${idOrSlug} downloaded to ${outDir}`)
1695
- );
1696
- } catch (error) {
1697
- console.error(chalk12.red(`\u274C Failed to download package: ${error.message}`));
1698
- }
1699
- }
1700
- var clawmartHelpText = `
1701
- EXAMPLES:
1702
- $ aiready clawmart me
1703
- $ aiready clawmart listings --query "marketing"
1704
- $ aiready clawmart create --name "SEO Booster" --tagline "Boost your SEO" --type skill --price 10
1705
- $ aiready clawmart upload <listing-id> SKILL.md rules/
1706
- $ aiready clawmart download <listing-id-or-slug> --outDir ./my-skill
1707
-
1708
- ENVIRONMENT VARIABLES:
1709
- CLAWMART_API_KEY Your ClawMart creator API key
1710
- `;
1711
-
1712
1570
  // src/cli.ts
1713
1571
  var getDirname = () => {
1714
1572
  if (typeof __dirname !== "undefined") return __dirname;
@@ -1768,10 +1626,7 @@ program.command("scan").description(
1768
1626
  ).option(
1769
1627
  "--compare-to <path>",
1770
1628
  "Compare results against a previous AIReady report JSON"
1771
- ).option("--include <patterns>", "File patterns to include (comma-separated)").option("--exclude <patterns>", "File patterns to exclude (comma-separated)").option("-o, --output <format>", "Output format: console, json", "console").option("--output-file <path>", "Output file path (for json)").option("--score", "Calculate and display AI Readiness Score (0-100)", true).option(
1772
- "--no-score",
1773
- "Disable calculating AI Readiness Score"
1774
- ).option("--weights <weights>", "Custom scoring weights").option("--threshold <score>", "Fail CI/CD if score below threshold (0-100)").option(
1629
+ ).option("--include <patterns>", "File patterns to include (comma-separated)").option("--exclude <patterns>", "File patterns to exclude (comma-separated)").option("-o, --output <format>", "Output format: console, json", "console").option("--output-file <path>", "Output file path (for json)").option("--score", "Calculate and display AI Readiness Score (0-100)", true).option("--no-score", "Disable calculating AI Readiness Score").option("--weights <weights>", "Custom scoring weights").option("--threshold <score>", "Fail CI/CD if score below threshold (0-100)").option(
1775
1630
  "--ci",
1776
1631
  "CI mode: GitHub Actions annotations, no colors, fail on threshold"
1777
1632
  ).option(
@@ -1790,28 +1645,14 @@ program.command("patterns").description("Detect duplicate code patterns that con
1790
1645
  ).option(
1791
1646
  "--full-scan",
1792
1647
  "Disable smart defaults for comprehensive analysis (slower)"
1793
- ).option("--include <patterns>", "File patterns to include (comma-separated)").option("--exclude <patterns>", "File patterns to exclude (comma-separated)").option("-o, --output <format>", "Output format: console, json", "console").option("--output-file <path>", "Output file path (for json)").option(
1794
- "--score",
1795
- "Calculate and display AI Readiness Score (0-100)",
1796
- true
1797
- ).option(
1798
- "--no-score",
1799
- "Disable calculating AI Readiness Score"
1800
- ).addHelpText("after", patternsHelpText).action(async (directory, options) => {
1648
+ ).option("--include <patterns>", "File patterns to include (comma-separated)").option("--exclude <patterns>", "File patterns to exclude (comma-separated)").option("-o, --output <format>", "Output format: console, json", "console").option("--output-file <path>", "Output file path (for json)").option("--score", "Calculate and display AI Readiness Score (0-100)", true).option("--no-score", "Disable calculating AI Readiness Score").addHelpText("after", patternsHelpText).action(async (directory, options) => {
1801
1649
  await patternsAction(directory, options);
1802
1650
  });
1803
1651
  program.command("context").description("Analyze context window costs and dependency fragmentation").argument("[directory]", "Directory to analyze", ".").option("--max-depth <number>", "Maximum acceptable import depth", "5").option(
1804
1652
  "--max-context <number>",
1805
1653
  "Maximum acceptable context budget (tokens)",
1806
1654
  "10000"
1807
- ).option("--include <patterns>", "File patterns to include (comma-separated)").option("--exclude <patterns>", "File patterns to exclude (comma-separated)").option("-o, --output <format>", "Output format: console, json", "console").option("--output-file <path>", "Output file path (for json)").option(
1808
- "--score",
1809
- "Calculate and display AI Readiness Score (0-100)",
1810
- true
1811
- ).option(
1812
- "--no-score",
1813
- "Disable calculating AI Readiness Score"
1814
- ).action(async (directory, options) => {
1655
+ ).option("--include <patterns>", "File patterns to include (comma-separated)").option("--exclude <patterns>", "File patterns to exclude (comma-separated)").option("-o, --output <format>", "Output format: console, json", "console").option("--output-file <path>", "Output file path (for json)").option("--score", "Calculate and display AI Readiness Score (0-100)", true).option("--no-score", "Disable calculating AI Readiness Score").action(async (directory, options) => {
1815
1656
  await contextAction(directory, options);
1816
1657
  });
1817
1658
  program.command("consistency").description("Check naming conventions and architectural consistency").argument("[directory]", "Directory to analyze", ".").option("--naming", "Check naming conventions (default: true)").option("--no-naming", "Skip naming analysis").option("--patterns", "Check code patterns (default: true)").option("--no-patterns", "Skip pattern analysis").option(
@@ -1822,14 +1663,7 @@ program.command("consistency").description("Check naming conventions and archite
1822
1663
  "-o, --output <format>",
1823
1664
  "Output format: console, json, markdown",
1824
1665
  "console"
1825
- ).option("--output-file <path>", "Output file path (for json/markdown)").option(
1826
- "--score",
1827
- "Calculate and display AI Readiness Score (0-100)",
1828
- true
1829
- ).option(
1830
- "--no-score",
1831
- "Disable calculating AI Readiness Score"
1832
- ).action(async (directory, options) => {
1666
+ ).option("--output-file <path>", "Output file path (for json/markdown)").option("--score", "Calculate and display AI Readiness Score (0-100)", true).option("--no-score", "Disable calculating AI Readiness Score").action(async (directory, options) => {
1833
1667
  await consistencyAction(directory, options);
1834
1668
  });
1835
1669
  program.command("visualise").description("Alias for visualize (British spelling)").argument("[directory]", "Directory to analyze", ".").option(
@@ -1877,22 +1711,6 @@ program.command("testability").description("Analyze test coverage and AI readine
1877
1711
  program.command("upload").description("Upload an AIReady report JSON to the platform").argument("<file>", "Report JSON file to upload").option("--api-key <key>", "Platform API key").option("--repo-id <id>", "Platform repository ID (optional)").option("--server <url>", "Custom platform URL").addHelpText("after", uploadHelpText).action(async (file, options) => {
1878
1712
  await uploadAction(file, options);
1879
1713
  });
1880
- var clawmart = program.command("clawmart").description("Manage ClawMart personas and skills").addHelpText("after", clawmartHelpText);
1881
- clawmart.command("me").description("Show my ClawMart creator profile").option("--api-key <key>", "ClawMart API key").option("--server <url>", "Custom ClawMart API server").action(async (options) => {
1882
- await clawmartMeAction(options);
1883
- });
1884
- clawmart.command("listings").description("Show my ClawMart listings").option("-q, --query <string>", "Search query").option("-t, --type <type>", "Filter by type: skill, persona").option("-l, --limit <number>", "Limit results", "10").option("--api-key <key>", "ClawMart API key").option("--server <url>", "Custom ClawMart API server").action(async (options) => {
1885
- await clawmartListingsAction(options);
1886
- });
1887
- clawmart.command("create").description("Create a new listing on ClawMart").requiredOption("--name <string>", "Listing name").requiredOption("--tagline <string>", "Short tagline").option("--about <string>", "Full description").option("--category <string>", "Category", "Utility").option("--capabilities <string>", "Comma-separated list of capabilities").option("--price <number>", "Price in USD", "0").option("--type <type>", "Product type: skill, persona", "skill").option("--api-key <key>", "ClawMart API key").option("--server <url>", "Custom ClawMart API server").action(async (options) => {
1888
- await clawmartCreateAction(options);
1889
- });
1890
- clawmart.command("upload").description("Upload content to a listing").argument("<id>", "Listing ID").argument("<files...>", "Files or directories to upload").option("--api-key <key>", "ClawMart API key").option("--server <url>", "Custom ClawMart API server").action(async (id, files, options) => {
1891
- await clawmartUploadAction(id, files, options);
1892
- });
1893
- clawmart.command("download").description("Download a package from ClawMart").argument("<idOrSlug>", "Listing ID or Slug").option("--outDir <path>", "Output directory").option("--api-key <key>", "ClawMart API key").option("--server <url>", "Custom ClawMart API server").action(async (idOrSlug, options) => {
1894
- await clawmartDownloadAction(idOrSlug, options);
1895
- });
1896
1714
  program.command("bug").description("Report a bug or provide feedback (Agent-friendly)").argument("[message]", "Short description of the issue").option("-t, --type <type>", "Issue type: bug, feature, metric", "bug").option("--submit", "Submit the issue directly using the GitHub CLI (gh)").addHelpText("after", bugHelpText).action(async (message, options) => {
1897
1715
  await bugAction(message, options);
1898
1716
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aiready/cli",
3
- "version": "0.13.6",
3
+ "version": "0.13.7",
4
4
  "description": "Unified CLI for AIReady analysis tools",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",
@@ -13,15 +13,14 @@
13
13
  "commander": "^14.0.0",
14
14
  "@aiready/agent-grounding": "0.12.0",
15
15
  "@aiready/consistency": "0.19.0",
16
- "@aiready/clawmart": "0.1.2",
17
16
  "@aiready/context-analyzer": "0.20.0",
18
- "@aiready/doc-drift": "0.12.0",
19
17
  "@aiready/core": "0.22.1",
18
+ "@aiready/deps": "0.12.0",
19
+ "@aiready/doc-drift": "0.12.0",
20
20
  "@aiready/pattern-detect": "0.15.0",
21
21
  "@aiready/change-amplification": "0.12.0",
22
- "@aiready/deps": "0.12.0",
23
- "@aiready/ai-signal-clarity": "0.12.0",
24
22
  "@aiready/testability": "0.5.0",
23
+ "@aiready/ai-signal-clarity": "0.12.0",
25
24
  "@aiready/visualizer": "0.5.0"
26
25
  },
27
26
  "devDependencies": {