claude-code-handoff 1.2.0 → 1.2.1

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 (3) hide show
  1. package/README.md +24 -0
  2. package/package.json +2 -1
  3. package/update.sh +75 -0
package/README.md CHANGED
@@ -331,6 +331,30 @@ The installer adds a `session-continuity.md` rules file that Claude auto-loads o
331
331
 
332
332
  ---
333
333
 
334
+ ## Update
335
+
336
+ Update commands and rules to the latest version without touching your handoff data:
337
+
338
+ ```bash
339
+ cd your-project
340
+ npx claude-code-handoff@latest
341
+ ```
342
+
343
+ Or via curl:
344
+
345
+ ```bash
346
+ cd your-project
347
+ curl -fsSL https://raw.githubusercontent.com/eximIA-Ventures/claude-code-handoff/main/update.sh | bash
348
+ ```
349
+
350
+ This will:
351
+ - Overwrite command files with the latest versions
352
+ - Update the rules file
353
+ - Remove legacy Portuguese commands if present (`retomar`, `salvar-handoff`, `trocar-contexto`)
354
+ - **Not touch** your `.claude/handoffs/` data
355
+
356
+ ---
357
+
334
358
  ## Uninstall
335
359
 
336
360
  ```bash
package/package.json CHANGED
@@ -1,12 +1,13 @@
1
1
  {
2
2
  "name": "claude-code-handoff",
3
- "version": "1.2.0",
3
+ "version": "1.2.1",
4
4
  "description": "Session continuity for Claude Code — 4 slash commands to save, resume, and switch workstreams across /clear",
5
5
  "bin": "./cli.js",
6
6
  "files": [
7
7
  "cli.js",
8
8
  "install.sh",
9
9
  "uninstall.sh",
10
+ "update.sh",
10
11
  "commands/",
11
12
  "rules/",
12
13
  "LICENSE",
package/update.sh ADDED
@@ -0,0 +1,75 @@
1
+ #!/bin/bash
2
+ # claude-code-handoff — Update
3
+ # Usage: curl -fsSL https://raw.githubusercontent.com/eximIA-Ventures/claude-code-handoff/main/update.sh | bash
4
+
5
+ set -e
6
+
7
+ GREEN='\033[0;32m'
8
+ YELLOW='\033[1;33m'
9
+ CYAN='\033[0;36m'
10
+ RED='\033[0;31m'
11
+ NC='\033[0m'
12
+
13
+ REPO="eximIA-Ventures/claude-code-handoff"
14
+ BRANCH="main"
15
+ RAW_BASE="https://raw.githubusercontent.com/$REPO/$BRANCH"
16
+ PROJECT_DIR="$(pwd)"
17
+ CLAUDE_DIR="$PROJECT_DIR/.claude"
18
+
19
+ echo ""
20
+ echo -e "${CYAN}━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━${NC}"
21
+ echo -e "${CYAN} claude-code-handoff — Update${NC}"
22
+ echo -e "${CYAN}━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━${NC}"
23
+ echo ""
24
+ echo -e " Project: ${GREEN}$PROJECT_DIR${NC}"
25
+ echo ""
26
+
27
+ # Check if installed
28
+ if [ ! -d "$CLAUDE_DIR/commands" ] || [ ! -f "$CLAUDE_DIR/commands/resume.md" ]; then
29
+ echo -e " ${RED}claude-code-handoff is not installed in this project.${NC}"
30
+ echo -e " Run: npx claude-code-handoff"
31
+ exit 1
32
+ fi
33
+
34
+ # Detect if running from cloned repo or via curl
35
+ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}" 2>/dev/null)" 2>/dev/null && pwd 2>/dev/null || echo "")"
36
+
37
+ download_file() {
38
+ local src="$1"
39
+ local dst="$2"
40
+ if [ -n "$SCRIPT_DIR" ] && [ -f "$SCRIPT_DIR/$src" ]; then
41
+ cp "$SCRIPT_DIR/$src" "$dst"
42
+ else
43
+ curl -fsSL "$RAW_BASE/$src" -o "$dst"
44
+ fi
45
+ }
46
+
47
+ # 1. Update commands
48
+ echo -e " ${YELLOW}[1/3]${NC} Updating commands..."
49
+ download_file "commands/handoff.md" "$CLAUDE_DIR/commands/handoff.md"
50
+ download_file "commands/resume.md" "$CLAUDE_DIR/commands/resume.md"
51
+ download_file "commands/save-handoff.md" "$CLAUDE_DIR/commands/save-handoff.md"
52
+ download_file "commands/switch-context.md" "$CLAUDE_DIR/commands/switch-context.md"
53
+
54
+ # 2. Update rules
55
+ echo -e " ${YELLOW}[2/3]${NC} Updating rules..."
56
+ download_file "rules/session-continuity.md" "$CLAUDE_DIR/rules/session-continuity.md"
57
+
58
+ # 3. Remove legacy Portuguese commands if present
59
+ echo -e " ${YELLOW}[3/3]${NC} Cleaning up legacy files..."
60
+ CLEANED=0
61
+ for f in retomar.md salvar-handoff.md trocar-contexto.md; do
62
+ if [ -f "$CLAUDE_DIR/commands/$f" ]; then
63
+ rm -f "$CLAUDE_DIR/commands/$f"
64
+ CLEANED=$((CLEANED + 1))
65
+ fi
66
+ done
67
+
68
+ echo ""
69
+ echo -e "${GREEN} Updated successfully!${NC}"
70
+ if [ "$CLEANED" -gt 0 ]; then
71
+ echo -e " Removed $CLEANED legacy command(s)"
72
+ fi
73
+ echo ""
74
+ echo -e " Handoff data in .claude/handoffs/ was ${CYAN}not touched${NC}."
75
+ echo ""