claude-code-remote-pilot 0.1.4 → 0.1.5

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.
@@ -79,13 +79,15 @@ async function setupTelegram() {
79
79
  }
80
80
 
81
81
  function printGuide() {
82
- const session = process.env.CLAUDE_SESSION || 'claude';
82
+ const session = process.env.CLAUDE_SESSION;
83
+ const workdir = process.env.CLAUDE_WORKDIR;
83
84
  console.log(`
84
85
  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
85
86
  Claude Code Remote Pilot — Ready
86
87
  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
87
88
 
88
- The watcher is starting in the background.
89
+ Session : ${session}
90
+ Dir : ${workdir}
89
91
 
90
92
  To talk to Claude:
91
93
  tmux attach -t ${session}
@@ -124,21 +126,38 @@ if (process.argv.includes('--help') || process.argv.includes('-h')) {
124
126
  Claude Code Remote Pilot
125
127
 
126
128
  Usage:
127
- claude-remote-pilot
129
+ claude-remote-pilot [--session <name>]
130
+
131
+ Options:
132
+ --session <name> Name for this Claude session (defaults to current directory name)
128
133
 
129
134
  Environment variables:
130
135
  TELEGRAM_BOT_TOKEN
131
136
  TELEGRAM_CHAT_ID
132
- CLAUDE_SESSION
133
137
  CLAUDE_COMMAND
134
138
 
135
139
  Example:
136
- TELEGRAM_BOT_TOKEN=xxx TELEGRAM_CHAT_ID=123456 claude-remote-pilot
140
+ claude-remote-pilot --session my-project
141
+ TELEGRAM_BOT_TOKEN=xxx TELEGRAM_CHAT_ID=123456 claude-remote-pilot --session api
137
142
 
138
- Attach to tmux:
139
- tmux attach -t claude
143
+ Attach to session:
144
+ tmux attach -t <name>
140
145
  `);
141
146
  process.exit(0);
142
147
  }
143
148
 
149
+ // Parse --session flag, fall back to current directory name
150
+ const sessionFlagIndex = process.argv.indexOf('--session');
151
+ const sessionName = sessionFlagIndex !== -1
152
+ ? process.argv[sessionFlagIndex + 1]
153
+ : path.basename(process.cwd());
154
+
155
+ if (!sessionName || sessionName.startsWith('--')) {
156
+ console.error('Error: --session requires a name, e.g. --session my-project');
157
+ process.exit(1);
158
+ }
159
+
160
+ process.env.CLAUDE_SESSION = sessionName;
161
+ process.env.CLAUDE_WORKDIR = process.cwd();
162
+
144
163
  main();
package/claude-pilot.sh CHANGED
@@ -23,6 +23,7 @@ set -u
23
23
 
24
24
  CLAUDE_SESSION="${CLAUDE_SESSION:-claude}"
25
25
  CLAUDE_COMMAND="${CLAUDE_COMMAND:-claude}"
26
+ CLAUDE_WORKDIR="${CLAUDE_WORKDIR:-$PWD}"
26
27
  CHECK_INTERVAL_SECONDS="${CHECK_INTERVAL_SECONDS:-30}"
27
28
  LIMIT_FALLBACK_WAIT_SECONDS="${LIMIT_FALLBACK_WAIT_SECONDS:-300}"
28
29
  POST_RESUME_COOLDOWN_SECONDS="${POST_RESUME_COOLDOWN_SECONDS:-180}"
@@ -146,8 +147,8 @@ ensure_tmux_session() {
146
147
  exit 1
147
148
  fi
148
149
 
149
- tmux new-session -d -s "$CLAUDE_SESSION" "$CLAUDE_COMMAND"
150
- log "Started tmux session '$CLAUDE_SESSION' with command: $CLAUDE_COMMAND"
150
+ tmux new-session -d -s "$CLAUDE_SESSION" -c "$CLAUDE_WORKDIR" "$CLAUDE_COMMAND"
151
+ log "Started tmux session '$CLAUDE_SESSION' in $CLAUDE_WORKDIR"
151
152
  send_telegram "Claude Pilot: started tmux session '$CLAUDE_SESSION'."
152
153
  }
153
154
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-code-remote-pilot",
3
- "version": "0.1.4",
3
+ "version": "0.1.5",
4
4
  "description": "Interactive Claude Code supervisor with tmux, Telegram notifications, and auto-resume after usage limits.",
5
5
  "type": "commonjs",
6
6
  "bin": {