anywhere-ai 0.0.6 → 0.0.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.
Files changed (2) hide show
  1. package/dist/cli.js +5 -10
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -66,18 +66,13 @@ async function ensureClaudeAuth() {
66
66
  return;
67
67
  }
68
68
  console.log("\nClaude Code not authenticated. Running setup-token...\n");
69
- const result = spawnSync("claude", ["setup-token"], {
70
- stdio: ["inherit", "pipe", "inherit"],
71
- encoding: "utf-8"
72
- });
73
- const output = result.stdout || "";
74
- const match = output.match(/(sk-ant-\S+)/);
75
- if (!match) {
76
- console.error("Could not extract token from setup-token output.");
77
- console.error("Run `claude setup-token` manually and set CLAUDE_CODE_OAUTH_TOKEN.");
69
+ spawnSync("claude", ["setup-token"], { stdio: "inherit" });
70
+ console.log();
71
+ const token = await ask("Paste the token from above (sk-ant-...): ");
72
+ if (!token || !token.startsWith("sk-ant-")) {
73
+ console.error("Invalid token. Run `claude setup-token` manually and set CLAUDE_CODE_OAUTH_TOKEN.");
78
74
  process.exit(1);
79
75
  }
80
- const token = match[1];
81
76
  config2.claudeOAuthToken = token;
82
77
  await fs.writeFile(CONFIG_PATH, JSON.stringify(config2, null, 2));
83
78
  process.env.CLAUDE_CODE_OAUTH_TOKEN = token;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "anywhere-ai",
3
- "version": "0.0.6",
3
+ "version": "0.0.7",
4
4
  "type": "module",
5
5
  "description": "Code on any repo from your phone",
6
6
  "bin": {