nuabase 3.1.0 → 3.1.1

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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # nuabase
2
2
 
3
+ ## 3.1.1
4
+
5
+ ### Patch Changes
6
+
7
+ - dd9b28e: Update `localAgentSetupGuide()` to each agent's current install command for the machine it runs on, with links to each agent's install page. Pi's npm package is now `@earendil-works/pi-coding-agent`.
8
+
3
9
  ## 3.1.0
4
10
 
5
11
  ### Minor Changes
@@ -940,25 +940,41 @@ const AGENTS = {
940
940
  "claude-code": {
941
941
  name: "Claude Code",
942
942
  worksWith: "Claude Pro or Max, or an Anthropic Console account",
943
- install: "npm install -g @anthropic-ai/claude-code",
943
+ install: {
944
+ macos: "brew install --cask claude-code",
945
+ linux: "curl -fsSL https://claude.ai/install.sh | bash",
946
+ other: "npm install -g @anthropic-ai/claude-code"
947
+ },
944
948
  signIn: "Run `claude`",
945
- docsUrl: "https://github.com/anthropics/claude-code"
949
+ docsUrl: "https://code.claude.com/docs/en/setup"
946
950
  },
947
951
  codex: {
948
952
  name: "Codex",
949
953
  worksWith: "ChatGPT Plus, Pro or Business, or an OpenAI API key",
950
- install: "npm install -g @openai/codex",
954
+ install: {
955
+ macos: "brew install --cask codex",
956
+ linux: "curl -fsSL https://chatgpt.com/codex/install.sh | sh",
957
+ other: "npm install -g @openai/codex"
958
+ },
951
959
  signIn: "Run `codex login`",
952
- docsUrl: "https://github.com/openai/codex"
960
+ docsUrl: "https://learn.chatgpt.com/docs/codex/cli"
953
961
  },
954
962
  pi: {
955
963
  name: "Pi",
956
964
  worksWith: "Many providers, including a Claude or ChatGPT plan",
957
- install: "npm install -g @mariozechner/pi-coding-agent",
965
+ install: {
966
+ macos: "npm install -g --ignore-scripts @earendil-works/pi-coding-agent",
967
+ linux: "curl -fsSL https://pi.dev/install.sh | sh",
968
+ other: "npm install -g --ignore-scripts @earendil-works/pi-coding-agent"
969
+ },
958
970
  signIn: "Run `pi`, then type `/login`",
959
- docsUrl: "https://github.com/badlogic/pi-mono"
971
+ docsUrl: "https://pi.dev/docs/latest/quickstart"
960
972
  }
961
973
  };
974
+ function installCommand(commands, platform) {
975
+ if (platform === "darwin") return commands.macos;
976
+ return platform === "linux" ? commands.linux : commands.other;
977
+ }
962
978
  function setupPrompt(agents) {
963
979
  return [
964
980
  "I use an app that runs a coding agent's command-line program (CLI) on this computer. Please install one of these CLIs here and help me sign in to it:",
@@ -970,8 +986,12 @@ function setupPrompt(agents) {
970
986
  "Pick the one that works with the plan or account I already have, and ask me if you can't tell. Signing in is interactive, so if you can't do it yourself, tell me the command to run in a terminal. Once the CLI runs and is signed in, tell me, so I can check again in the app."
971
987
  ].join("\n");
972
988
  }
973
- function localAgentSetupGuide() {
974
- const agents = LOCAL_AGENT_IDS.map((agent) => ({ agent, ...AGENTS[agent] }));
989
+ function localAgentSetupGuide(platform = process.platform) {
990
+ const agents = LOCAL_AGENT_IDS.map((agent) => ({
991
+ agent,
992
+ ...AGENTS[agent],
993
+ install: installCommand(AGENTS[agent].install, platform)
994
+ }));
975
995
  return {
976
996
  missing: "No coding agent is set up on this computer.",
977
997
  cliOnly: "This app runs the agent's command-line program (CLI). A desktop app, browser chat or editor extension, such as the Claude or ChatGPT app, isn't enough on its own.",
@@ -917,25 +917,41 @@ const AGENTS = {
917
917
  "claude-code": {
918
918
  name: "Claude Code",
919
919
  worksWith: "Claude Pro or Max, or an Anthropic Console account",
920
- install: "npm install -g @anthropic-ai/claude-code",
920
+ install: {
921
+ macos: "brew install --cask claude-code",
922
+ linux: "curl -fsSL https://claude.ai/install.sh | bash",
923
+ other: "npm install -g @anthropic-ai/claude-code"
924
+ },
921
925
  signIn: "Run `claude`",
922
- docsUrl: "https://github.com/anthropics/claude-code"
926
+ docsUrl: "https://code.claude.com/docs/en/setup"
923
927
  },
924
928
  codex: {
925
929
  name: "Codex",
926
930
  worksWith: "ChatGPT Plus, Pro or Business, or an OpenAI API key",
927
- install: "npm install -g @openai/codex",
931
+ install: {
932
+ macos: "brew install --cask codex",
933
+ linux: "curl -fsSL https://chatgpt.com/codex/install.sh | sh",
934
+ other: "npm install -g @openai/codex"
935
+ },
928
936
  signIn: "Run `codex login`",
929
- docsUrl: "https://github.com/openai/codex"
937
+ docsUrl: "https://learn.chatgpt.com/docs/codex/cli"
930
938
  },
931
939
  pi: {
932
940
  name: "Pi",
933
941
  worksWith: "Many providers, including a Claude or ChatGPT plan",
934
- install: "npm install -g @mariozechner/pi-coding-agent",
942
+ install: {
943
+ macos: "npm install -g --ignore-scripts @earendil-works/pi-coding-agent",
944
+ linux: "curl -fsSL https://pi.dev/install.sh | sh",
945
+ other: "npm install -g --ignore-scripts @earendil-works/pi-coding-agent"
946
+ },
935
947
  signIn: "Run `pi`, then type `/login`",
936
- docsUrl: "https://github.com/badlogic/pi-mono"
948
+ docsUrl: "https://pi.dev/docs/latest/quickstart"
937
949
  }
938
950
  };
951
+ function installCommand(commands, platform) {
952
+ if (platform === "darwin") return commands.macos;
953
+ return platform === "linux" ? commands.linux : commands.other;
954
+ }
939
955
  function setupPrompt(agents) {
940
956
  return [
941
957
  "I use an app that runs a coding agent's command-line program (CLI) on this computer. Please install one of these CLIs here and help me sign in to it:",
@@ -947,8 +963,12 @@ function setupPrompt(agents) {
947
963
  "Pick the one that works with the plan or account I already have, and ask me if you can't tell. Signing in is interactive, so if you can't do it yourself, tell me the command to run in a terminal. Once the CLI runs and is signed in, tell me, so I can check again in the app."
948
964
  ].join("\n");
949
965
  }
950
- function localAgentSetupGuide() {
951
- const agents = LOCAL_AGENT_IDS.map((agent) => ({ agent, ...AGENTS[agent] }));
966
+ function localAgentSetupGuide(platform = process.platform) {
967
+ const agents = LOCAL_AGENT_IDS.map((agent) => ({
968
+ agent,
969
+ ...AGENTS[agent],
970
+ install: installCommand(AGENTS[agent].install, platform)
971
+ }));
952
972
  return {
953
973
  missing: "No coding agent is set up on this computer.",
954
974
  cliOnly: "This app runs the agent's command-line program (CLI). A desktop app, browser chat or editor extension, such as the Claude or ChatGPT app, isn't enough on its own.",
@@ -82,8 +82,8 @@ type LocalAgentSetupGuide = {
82
82
  */
83
83
  setupPrompt: string;
84
84
  };
85
- /** Pure: how to set up a supported coding agent, for people who have none. */
86
- declare function localAgentSetupGuide(): LocalAgentSetupGuide;
85
+ /** How to set up a supported coding agent on this machine, for people who have none. */
86
+ declare function localAgentSetupGuide(platform?: NodeJS.Platform): LocalAgentSetupGuide;
87
87
 
88
88
  /**
89
89
  * How a session can be started on this platform:
@@ -82,8 +82,8 @@ type LocalAgentSetupGuide = {
82
82
  */
83
83
  setupPrompt: string;
84
84
  };
85
- /** Pure: how to set up a supported coding agent, for people who have none. */
86
- declare function localAgentSetupGuide(): LocalAgentSetupGuide;
85
+ /** How to set up a supported coding agent on this machine, for people who have none. */
86
+ declare function localAgentSetupGuide(platform?: NodeJS.Platform): LocalAgentSetupGuide;
87
87
 
88
88
  /**
89
89
  * How a session can be started on this platform:
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "nuabase",
3
3
  "description": "Nuabase TypeScript client to create typed functions from LLM prompts",
4
- "version": "3.1.0",
4
+ "version": "3.1.1",
5
5
  "type": "module",
6
6
  "author": "Jasim A Basheer <jasim@nuabase.com>",
7
7
  "engines": {