nous-token 0.3.2 → 0.3.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/cli/setup.ts +5 -4
- package/package.json +1 -1
package/cli/setup.ts
CHANGED
|
@@ -156,10 +156,10 @@ const tools: Tool[] = [
|
|
|
156
156
|
// ── Shell env helper ──
|
|
157
157
|
|
|
158
158
|
// Collect env vars to set — don't write to shell rc file
|
|
159
|
-
const envCommands: string
|
|
159
|
+
const envCommands: Map<string, string> = new Map();
|
|
160
160
|
|
|
161
161
|
function setShellEnv(key: string, value: string, toolName: string): ConfigResult {
|
|
162
|
-
envCommands.
|
|
162
|
+
envCommands.set(key, `export ${key}="${value}"`);
|
|
163
163
|
return { success: true, message: `${key}` };
|
|
164
164
|
}
|
|
165
165
|
|
|
@@ -233,13 +233,14 @@ for (const tool of tools) {
|
|
|
233
233
|
console.log("");
|
|
234
234
|
|
|
235
235
|
if (configured > 0) {
|
|
236
|
+
const cmds = [...envCommands.values()];
|
|
236
237
|
console.log(` \x1b[32m${configured} tool(s) detected.\x1b[0m\n`);
|
|
237
238
|
console.log(" \x1b[1mThis terminal only:\x1b[0m");
|
|
238
|
-
console.log(` \x1b[36m${
|
|
239
|
+
console.log(` \x1b[36m${cmds.join(" && ")}\x1b[0m\n`);
|
|
239
240
|
console.log(" \x1b[1mAll terminals (permanent):\x1b[0m");
|
|
240
241
|
const shell = process.env.SHELL || "/bin/bash";
|
|
241
242
|
const rcFile = shell.includes("zsh") ? "~/.zshrc" : "~/.bashrc";
|
|
242
|
-
console.log(` \x1b[36mecho '${
|
|
243
|
+
console.log(` \x1b[36mecho '${cmds.join("\\n")}' >> ${rcFile} && source ${rcFile}\x1b[0m\n`);
|
|
243
244
|
console.log(` See your usage at \x1b[4mhttps://token.nousai.cc\x1b[0m`);
|
|
244
245
|
} else {
|
|
245
246
|
console.log(" No AI tools found. Install Claude Code, Cursor, or any OpenAI-compatible tool.");
|