Skip to content

Commit d0139a7

Browse files
authored
Merge pull request #2493 from nanocoai/fix/2484-2485-v1-name-hardcoding
fix(cli,skills): use per-install slug for service names
2 parents e603236 + 2abb34b commit d0139a7

29 files changed

Lines changed: 242 additions & 96 deletions

File tree

.claude/skills/add-atomic-chat-tool/SKILL.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -182,9 +182,12 @@ ATOMIC_CHAT_API_KEY=sk-...
182182

183183
### Restart the service
184184

185+
Run from your NanoClaw project root:
186+
185187
```bash
186-
launchctl kickstart -k gui/$(id -u)/com.nanoclaw # macOS
187-
# Linux: systemctl --user restart nanoclaw
188+
source setup/lib/install-slug.sh
189+
launchctl kickstart -k gui/$(id -u)/$(launchd_label) # macOS
190+
# Linux: systemctl --user restart $(systemd_unit)
188191
```
189192

190193
## Phase 4: Verify

.claude/skills/add-dashboard/SKILL.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,10 +93,13 @@ Generate the secret: `node -e "console.log('nc-' + require('crypto').randomBytes
9393

9494
### 6. Build and restart
9595

96+
Run from your NanoClaw project root:
97+
9698
```bash
9799
pnpm run build
98-
systemctl --user restart nanoclaw # Linux
99-
# or: launchctl kickstart -k gui/$(id -u)/com.nanoclaw # macOS
100+
source setup/lib/install-slug.sh
101+
systemctl --user restart $(systemd_unit) # Linux
102+
# or: launchctl kickstart -k gui/$(id -u)/$(launchd_label) # macOS
100103
```
101104

102105
### 7. Verify

.claude/skills/add-deltachat/REMOVE.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,17 @@ DC_SMTP_PORT
2323

2424
## 3. Rebuild and restart
2525

26+
Run from your NanoClaw project root:
27+
2628
```bash
2729
pnpm run build
30+
source setup/lib/install-slug.sh
2831

2932
# Linux
30-
systemctl --user restart nanoclaw
33+
systemctl --user restart $(systemd_unit)
3134

3235
# macOS
33-
launchctl kickstart -k gui/$(id -u)/com.nanoclaw
36+
launchctl kickstart -k gui/$(id -u)/$(launchd_label)
3437
```
3538

3639
## 4. Remove account data (optional)

.claude/skills/add-deltachat/SKILL.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,12 +98,16 @@ The `/set-avatar` command (send an image with that caption) is the easiest way t
9898

9999
### Restart
100100

101+
Run from your NanoClaw project root:
102+
101103
```bash
104+
source setup/lib/install-slug.sh
105+
102106
# Linux
103-
systemctl --user restart nanoclaw
107+
systemctl --user restart $(systemd_unit)
104108

105109
# macOS
106-
launchctl kickstart -k gui/$(id -u)/com.nanoclaw
110+
launchctl kickstart -k gui/$(id -u)/$(launchd_label)
107111
```
108112

109113
On first start the adapter configures the email account (IMAP/SMTP credentials, calls `configure()`). Subsequent starts skip straight to `startIo()`. Account data is stored in `dc-account/` in the project root (or your `DC_ACCOUNT_DIR`).
@@ -232,7 +236,7 @@ Set `DC_SMTP_SECURITY=1` and `DC_SMTP_PORT=465` in `.env`, then restart.
232236

233237
```bash
234238
rm -f dc-account/accounts.lock
235-
systemctl --user restart nanoclaw
239+
systemctl --user restart "$(. setup/lib/install-slug.sh && systemd_unit)"
236240
```
237241

238242
### Bot not responding after restart

.claude/skills/add-emacs/SKILL.md

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -162,10 +162,13 @@ If you changed `EMACS_CHANNEL_PORT` from the default:
162162

163163
## Restart NanoClaw
164164

165+
Run from your NanoClaw project root:
166+
165167
```bash
166168
pnpm run build
167-
launchctl kickstart -k gui/$(id -u)/com.nanoclaw # macOS
168-
# systemctl --user restart nanoclaw # Linux
169+
source setup/lib/install-slug.sh
170+
launchctl kickstart -k gui/$(id -u)/$(launchd_label) # macOS
171+
# systemctl --user restart $(systemd_unit) # Linux
169172
```
170173

171174
## Verify
@@ -240,7 +243,7 @@ grep -q "import './emacs.js'" src/channels/index.ts && echo "imported" || echo "
240243

241244
### No response from agent
242245

243-
1. NanoClaw running: `launchctl list | grep nanoclaw` (macOS) / `systemctl --user status nanoclaw` (Linux)
246+
1. NanoClaw running: `launchctl list | grep "$(. setup/lib/install-slug.sh && launchd_label)"` (macOS) / `systemctl --user status "$(. setup/lib/install-slug.sh && systemd_unit)"` (Linux)
244247
2. Messaging group wired: `pnpm exec tsx scripts/q.ts data/v2.db "SELECT mg.platform_id, ag.folder FROM messaging_groups mg JOIN messaging_group_agents mga ON mg.id = mga.messaging_group_id JOIN agent_groups ag ON ag.id = mga.agent_group_id WHERE mg.channel_type = 'emacs'"`
245248
3. Logs show inbound: `grep 'channel_type=emacs\|Emacs' logs/nanoclaw.log | tail -20`
246249

@@ -282,13 +285,16 @@ If an agent outputs org-mode directly, markers get double-converted and render i
282285

283286
## Removal
284287

288+
Run from your NanoClaw project root:
289+
285290
```bash
286291
rm src/channels/emacs.ts src/channels/emacs.test.ts emacs/nanoclaw.el
287292
# Remove the `import './emacs.js';` line from src/channels/index.ts
288293
# Remove EMACS_* lines from .env
289294
pnpm run build
290-
launchctl kickstart -k gui/$(id -u)/com.nanoclaw # macOS
291-
# systemctl --user restart nanoclaw # Linux
295+
source setup/lib/install-slug.sh
296+
launchctl kickstart -k gui/$(id -u)/$(launchd_label) # macOS
297+
# systemctl --user restart $(systemd_unit) # Linux
292298

293299
# Remove the NanoClaw block from your Emacs config
294300
# Optionally clean up the messaging group:

.claude/skills/add-gcal-tool/SKILL.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -175,8 +175,14 @@ Run from your NanoClaw project root (where `data/v2.db` lives). The `$[#]` place
175175

176176
```bash
177177
pnpm run build
178-
systemctl --user restart nanoclaw # Linux
179-
# launchctl kickstart -k gui/$(id -u)/com.nanoclaw # macOS
178+
```
179+
180+
Run from your NanoClaw project root:
181+
182+
```bash
183+
source setup/lib/install-slug.sh
184+
launchctl kickstart -k gui/$(id -u)/$(launchd_label) # macOS
185+
systemctl --user restart $(systemd_unit) # Linux
180186
```
181187

182188
Kill any existing agent containers so they respawn with the new mcpServers config:
@@ -220,7 +226,7 @@ Common signals:
220226
WHERE agent_group_id = '<group-id>';"
221227
```
222228
3. Remove `CALENDAR_MCP_VERSION` ARG and the calendar package from the Dockerfile install block.
223-
4. `pnpm run build && ./container/build.sh && systemctl --user restart nanoclaw`.
229+
4. `pnpm run build && ./container/build.sh && systemctl --user restart "$(. setup/lib/install-slug.sh && systemd_unit)"`.
224230
5. Optional: `rm -rf ~/.calendar-mcp/` and `onecli apps disconnect --provider google-calendar`.
225231

226232
No `TOOL_ALLOWLIST` removal step — Phase 2 no longer edits it.

.claude/skills/add-github/SKILL.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,15 @@ Use `per-thread` session mode so each PR/issue gets its own agent session.
136136

137137
If you're in the middle of `/setup`, return to the setup flow now.
138138

139-
Otherwise, restart the service (`systemctl --user restart nanoclaw` or `launchctl kickstart -k gui/$(id -u)/com.nanoclaw`) to pick up the new channel.
139+
Otherwise, restart the service to pick up the new channel.
140+
141+
Run from your NanoClaw project root:
142+
143+
```bash
144+
source setup/lib/install-slug.sh
145+
launchctl kickstart -k gui/$(id -u)/$(launchd_label) # macOS
146+
systemctl --user restart $(systemd_unit) # Linux
147+
```
140148

141149
## Channel Info
142150

.claude/skills/add-gmail-tool/SKILL.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -192,8 +192,14 @@ Run from your NanoClaw project root (where `data/v2.db` lives). The `$[#]` place
192192

193193
```bash
194194
pnpm run build
195-
systemctl --user restart nanoclaw # Linux
196-
# launchctl kickstart -k gui/$(id -u)/com.nanoclaw # macOS
195+
```
196+
197+
Run from your NanoClaw project root:
198+
199+
```bash
200+
source setup/lib/install-slug.sh
201+
launchctl kickstart -k gui/$(id -u)/$(launchd_label) # macOS
202+
systemctl --user restart $(systemd_unit) # Linux
197203
```
198204

199205
## Phase 5: Verify
@@ -235,7 +241,7 @@ Common signals:
235241
WHERE agent_group_id = '<group-id>';"
236242
```
237243
3. Remove the `GMAIL_MCP_VERSION` ARG and the `pnpm install -g @gongrzhe/server-gmail-autoauth-mcp` block from `container/Dockerfile`.
238-
4. `pnpm run build && ./container/build.sh && systemctl --user restart nanoclaw`.
244+
4. `pnpm run build && ./container/build.sh && systemctl --user restart "$(. setup/lib/install-slug.sh && systemd_unit)"`.
239245
5. (Optional) `rm -rf ~/.gmail-mcp/` if no other host-side tool needs the stubs.
240246
6. (Optional) Disconnect Gmail in OneCLI: `onecli apps disconnect --provider gmail`.
241247

.claude/skills/add-karpathy-llm-wiki/SKILL.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,12 @@ If yes, ask the agent to schedule the lint task using the `schedule_task` MCP to
7575

7676
## Step 6: Restart
7777

78+
Run from your NanoClaw project root:
79+
7880
```bash
79-
launchctl kickstart -k gui/$(id -u)/com.nanoclaw # macOS
80-
# Linux: systemctl --user restart nanoclaw
81+
source setup/lib/install-slug.sh
82+
launchctl kickstart -k gui/$(id -u)/$(launchd_label) # macOS
83+
systemctl --user restart $(systemd_unit) # Linux
8184
```
8285

8386
Tell the user to test by sending a source to the wiki group.

.claude/skills/add-linear/SKILL.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,15 @@ The `platform_id` must be `linear:<TEAM_KEY>` matching the `LINEAR_TEAM_KEY` env
156156

157157
If you're in the middle of `/setup`, return to the setup flow now.
158158

159-
Otherwise, restart the service (`systemctl --user restart nanoclaw` or `launchctl kickstart -k gui/$(id -u)/com.nanoclaw`) to pick up the new channel.
159+
Otherwise, restart the service to pick up the new channel.
160+
161+
Run from your NanoClaw project root:
162+
163+
```bash
164+
source setup/lib/install-slug.sh
165+
launchctl kickstart -k gui/$(id -u)/$(launchd_label) # macOS
166+
systemctl --user restart $(systemd_unit) # Linux
167+
```
160168

161169
## Channel Info
162170

0 commit comments

Comments
 (0)