claude-remote-cli 3.9.1 → 3.9.2

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,3 +1,4 @@
1
+ import crypto from 'node:crypto';
1
2
  import fs from 'node:fs';
2
3
  import http from 'node:http';
3
4
  import os from 'node:os';
@@ -166,7 +167,15 @@ async function main() {
166
167
  saveConfig(CONFIG_PATH, config);
167
168
  }
168
169
  if (!config.pinHash) {
169
- const pin = await promptPin('Set up a PIN for claude-remote-cli:');
170
+ let pin;
171
+ if (process.stdin.isTTY) {
172
+ pin = await promptPin('Set up a PIN for claude-remote-cli:');
173
+ }
174
+ else {
175
+ pin = crypto.randomInt(100000, 999999).toString();
176
+ console.log(`No interactive terminal detected. Generated PIN: ${pin}`);
177
+ console.log('Change it by deleting pinHash from your config file and restarting interactively.');
178
+ }
170
179
  config.pinHash = await auth.hashPin(pin);
171
180
  saveConfig(CONFIG_PATH, config);
172
181
  console.log('PIN set successfully.');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-remote-cli",
3
- "version": "3.9.1",
3
+ "version": "3.9.2",
4
4
  "description": "Remote web interface for Claude Code CLI sessions",
5
5
  "type": "module",
6
6
  "main": "dist/server/index.js",