star-sdk-cli 0.1.3 → 0.1.4

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.
Files changed (2) hide show
  1. package/dist/cli.mjs +13 -5
  2. package/package.json +1 -1
package/dist/cli.mjs CHANGED
@@ -1662,7 +1662,7 @@ ${colors.bright}Star SDK CLI${colors.reset} v${VERSION}
1662
1662
  ${colors.dim}Commands:${colors.reset}
1663
1663
  ${colors.cyan}init <name>${colors.reset} Register a new game
1664
1664
  ${colors.cyan}install [agent]${colors.reset} Install Star SDK docs for AI coding agents
1665
- ${colors.cyan}docs [topic]${colors.reset} Print API documentation to stdout
1665
+ ${colors.cyan}docs [topic]${colors.reset} Print API documentation (default: all docs)
1666
1666
  ${colors.cyan}whoami${colors.reset} Show current configuration
1667
1667
 
1668
1668
  ${colors.dim}Supported agents:${colors.reset}
@@ -1691,8 +1691,9 @@ ${colors.dim}Examples:${colors.reset}
1691
1691
  npx star-sdk install aider ${colors.dim}# Aider${colors.reset}
1692
1692
 
1693
1693
  ${colors.dim}# Print API docs (works with any LLM)${colors.reset}
1694
- npx star-sdk docs
1695
- npx star-sdk docs audio
1694
+ npx star-sdk docs ${colors.dim}# All docs${colors.reset}
1695
+ npx star-sdk docs audio ${colors.dim}# Just audio API${colors.reset}
1696
+ npx star-sdk docs skill ${colors.dim}# Just main skill file${colors.reset}
1696
1697
 
1697
1698
  ${colors.dim}Learn more:${colors.reset} https://buildwithstar.com/docs
1698
1699
  `);
@@ -1809,6 +1810,12 @@ function whoamiCommand() {
1809
1810
  }
1810
1811
  log("");
1811
1812
  }
1813
+ function transformForStdout(content) {
1814
+ return content.replace(/\[(\w+)\.md\]\(\.\/\1\.md\)/g, "$1 (`npx star-sdk docs $1`)").replace(/see (\w+)\.md/g, "run `npx star-sdk docs $1`").replace(
1815
+ /For detailed API documentation, see the linked files above\./,
1816
+ "For detailed API docs: `npx star-sdk docs <topic>` where topic is audio, canvas, leaderboard, or multiplayer."
1817
+ );
1818
+ }
1812
1819
  function getAllDocsContent() {
1813
1820
  return `${SKILL_CONTENT}
1814
1821
 
@@ -1966,19 +1973,20 @@ function installCommand(agent = "claude", scope = "global") {
1966
1973
  }
1967
1974
  function docsCommand(topic) {
1968
1975
  const docs = {
1976
+ skill: SKILL_CONTENT,
1969
1977
  audio: AUDIO_DOCS,
1970
1978
  canvas: CANVAS_DOCS,
1971
1979
  leaderboard: LEADERBOARD_DOCS,
1972
1980
  multiplayer: MULTIPLAYER_DOCS
1973
1981
  };
1974
1982
  if (!topic) {
1975
- console.log(SKILL_CONTENT);
1983
+ console.log(transformForStdout(SKILL_CONTENT));
1976
1984
  } else if (docs[topic]) {
1977
1985
  console.log(docs[topic]);
1978
1986
  } else {
1979
1987
  error(`Unknown topic: ${topic}`);
1980
1988
  log("");
1981
- log("Available topics: audio, canvas, leaderboard, multiplayer");
1989
+ log("Available topics: skill, audio, canvas, leaderboard, multiplayer");
1982
1990
  process.exit(1);
1983
1991
  }
1984
1992
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "star-sdk-cli",
3
- "version": "0.1.3",
3
+ "version": "0.1.4",
4
4
  "description": "CLI tool for Star SDK - register games and manage leaderboards",
5
5
  "type": "module",
6
6
  "bin": {