@atercates/claude-deck 0.2.7 → 0.2.9

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.
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # ClaudeDeck
2
2
 
3
- A mobile-first web UI for managing AI coding sessions.
3
+ Self-hosted web UI for managing Claude Code sessions.
4
4
 
5
5
  [![Discord](https://img.shields.io/badge/Discord-Join%20us-5865F2?logo=discord&logoColor=white)](https://discord.gg/cSjutkCGAh)
6
6
 
@@ -10,79 +10,110 @@ https://github.com/user-attachments/assets/0e2e66f7-037e-4739-99ec-608d1840df0a
10
10
 
11
11
  ## Installation
12
12
 
13
- ### Via npm (Recommended)
14
-
15
- If you already have Node.js 24+ installed:
16
-
17
- ```bash
18
- # Install globally
19
- npm install -g @atercates/claude-deck
20
-
21
- # Run setup (checks/installs tmux, ripgrep, builds app)
22
- claude-deck install
23
-
24
- # Start the server
25
- claude-deck start
26
- ```
27
-
28
- ### Via curl (Installs everything)
29
-
30
- For fresh installs without Node.js:
13
+ ### Quick Install
31
14
 
32
15
  ```bash
33
16
  curl -fsSL https://raw.githubusercontent.com/ATERCATES/claude-deck/main/scripts/install.sh | bash
34
- claude-deck start
35
17
  ```
36
18
 
37
- ### Desktop App
38
-
39
- Download native desktop apps from [Releases](https://github.com/ATERCATES/claude-deck/releases):
19
+ The installer will:
40
20
 
41
- - macOS (Apple Silicon): `.dmg`
42
- - Linux: `.deb` or `.AppImage`
21
+ - Install Node.js 24 if needed (via [n](https://github.com/tj/n))
22
+ - Install pnpm
23
+ - Ask for port, SSH host/port (for VS Code remote button)
24
+ - Clone, build, and start as a systemd service
25
+ - First visit prompts you to create an account
43
26
 
44
- > **Note:** The desktop app is a native wrapper around the web UI. You still need to install and run ClaudeDeck (via the installer script above) for the backend server. The desktop app just provides a convenient native window instead of using your browser.
27
+ ### Non-Interactive
45
28
 
46
- > **Don't want to self-host?** Try [ClaudeDeck Cloud](https://runagentos.com) - pre-configured cloud VMs for AI coding.
29
+ ```bash
30
+ bash install.sh --port 3011 --ssh-host myserver.com --ssh-port 22 -y
31
+ ```
47
32
 
48
33
  ### Manual Install
49
34
 
50
35
  ```bash
51
36
  git clone https://github.com/ATERCATES/claude-deck
52
37
  cd claude-deck
53
- npm install
54
- npm run dev # http://localhost:3011
38
+ pnpm install
39
+ pnpm build
40
+ pnpm start # http://localhost:3011
55
41
  ```
56
42
 
57
43
  ### Prerequisites
58
44
 
59
45
  - Node.js 24+
60
- - tmux
61
- - [ripgrep](https://github.com/BurntSushi/ripgrep) (for code search - auto-installed by installer script, or run `claude-deck update`)
62
- - At least one AI CLI: [Claude Code](https://github.com/anthropics/claude-code), [Codex](https://github.com/openai/codex), [OpenCode](https://github.com/anomalyco/opencode), [Gemini CLI](https://github.com/google-gemini/gemini-cli), [Aider](https://aider.chat/), or [Cursor CLI](https://cursor.com/cli)
46
+ - tmux (with `set -g mouse on` in `~/.tmux.conf`)
47
+ - [Claude Code](https://github.com/anthropics/claude-code)
48
+
49
+ ## Configuration
50
+
51
+ Create a `.env` file in the project root:
52
+
53
+ ```bash
54
+ PORT=3011
55
+
56
+ # SSH config for "Open in VS Code" remote button (optional)
57
+ SSH_HOST=myserver.example.com
58
+ SSH_PORT=22
59
+ ```
63
60
 
64
61
  ## Features
65
62
 
66
- - **Mobile-first** - Full functionality from your phone, not a dumbed-down responsive view
67
- - **Voice-to-text** - Dictate prompts to your coding sessions hands-free
63
+ - **Session management** - Resume, create, and organize Claude Code sessions
64
+ - **Mobile-first** - Full functionality from your phone
68
65
  - **Multi-pane layout** - Run up to 4 sessions side-by-side
66
+ - **Active session monitoring** - Real-time status (running/waiting/idle)
69
67
  - **Code search** - Fast codebase search with syntax-highlighted results (Cmd+K)
70
- - **File picker** - Browse and attach files to sessions, with direct upload from mobile
71
- - **Clone from GitHub** - Clone repos directly from the UI when creating projects
72
68
  - **Git integration** - Status, diffs, commits, PRs from the UI
73
69
  - **Git worktrees** - Isolated branches with auto-setup
74
70
  - **Dev servers** - Start/stop Node.js and Docker servers
75
71
  - **Session orchestration** - Conductor/worker model via MCP
72
+ - **VS Code integration** - Open projects in VS Code with one click (supports SSH remote)
73
+ - **Auth** - Login with username/password, optional TOTP 2FA
76
74
 
77
- ## CLI Commands
75
+ ## Service Management
78
76
 
79
77
  ```bash
80
- claude-deck run # Start and open browser
81
- claude-deck start # Start in background
82
- claude-deck stop # Stop server
83
- claude-deck status # Show URLs
84
- claude-deck logs # Tail logs
85
- claude-deck update # Update to latest
78
+ sudo systemctl start claudedeck
79
+ sudo systemctl stop claudedeck
80
+ sudo systemctl restart claudedeck
81
+ sudo systemctl status claudedeck
82
+ sudo journalctl -u claudedeck -f # tail logs
83
+ ```
84
+
85
+ ## Reverse Proxy (nginx)
86
+
87
+ For HTTPS access behind nginx:
88
+
89
+ ```nginx
90
+ map $http_upgrade $connection_upgrade {
91
+ default upgrade;
92
+ '' close;
93
+ }
94
+
95
+ server {
96
+ listen 443 ssl;
97
+ server_name claudedeck.example.com;
98
+
99
+ ssl_certificate /path/to/cert.pem;
100
+ ssl_certificate_key /path/to/key.pem;
101
+
102
+ location / {
103
+ proxy_pass http://127.0.0.1:3011;
104
+ proxy_set_header Host $host;
105
+ proxy_set_header X-Real-IP $remote_addr;
106
+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
107
+ proxy_set_header X-Forwarded-Proto $scheme;
108
+
109
+ proxy_http_version 1.1;
110
+ proxy_set_header Upgrade $http_upgrade;
111
+ proxy_set_header Connection $connection_upgrade;
112
+
113
+ proxy_read_timeout 86400s;
114
+ proxy_send_timeout 86400s;
115
+ }
116
+ }
86
117
  ```
87
118
 
88
119
  ## Mobile Access
@@ -95,12 +126,17 @@ Use [Tailscale](https://tailscale.com) for secure access from your phone:
95
126
 
96
127
  ## Documentation
97
128
 
98
- For configuration and advanced usage, see the [docs](https://www.runagentos.com/docs).
129
+ Detailed technical docs are in `docs/`:
130
+
131
+ - [`docs/architecture.md`](docs/architecture.md) - System overview, data flow, directory structure
132
+ - [`docs/decisions.md`](docs/decisions.md) - Why SQLite, why tmux, why JSONL
133
+ - [`docs/troubleshooting.md`](docs/troubleshooting.md) - Common issues and fixes
134
+ - [`docs/setup.md`](docs/setup.md) - Requirements, Docker, PWA, production deployment
99
135
 
100
136
  ## Related Projects
101
137
 
102
- - **[aTerm](https://github.com/ATERCATES/aTerm)** - A Tauri-based desktop terminal workspace for AI-assisted coding. While ClaudeDeck is a mobile-first web UI, aTerm is a native desktop app with multi-pane layouts optimized for running AI coding agents (Claude Code, Aider, OpenCode) alongside shells, dev servers, and a built-in git panel. Choose ClaudeDeck for mobile access and browser-based workflows, or aTerm for a native desktop terminal experience.
103
- - **[LumifyHub](https://lumifyhub.io)** - Team collaboration platform with real-time chat and structured documentation. Useful alongside ClaudeDeck for coordinating multi-agent work across a team — share session context, document architectural decisions from coding sessions, and track progress across parallel agent workflows.
138
+ - **[aTerm](https://github.com/ATERCATES/aTerm)** - Native desktop terminal workspace for AI-assisted coding
139
+ - **[LumifyHub](https://lumifyhub.io)** - Team collaboration platform with real-time chat and structured documentation
104
140
 
105
141
  ## License
106
142
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atercates/claude-deck",
3
- "version": "0.2.7",
3
+ "version": "0.2.9",
4
4
  "description": "Self-hosted web UI for managing Claude Code sessions",
5
5
  "bin": {
6
6
  "claude-deck": "./scripts/claude-deck"
@@ -5,6 +5,9 @@
5
5
  # Usage:
6
6
  # curl -fsSL https://raw.githubusercontent.com/ATERCATES/claude-deck/main/scripts/install.sh | bash
7
7
  #
8
+ # Or with options:
9
+ # bash install.sh --port 3011 --ssh-host myserver.com --ssh-port 22
10
+ #
8
11
 
9
12
  set -e
10
13
 
@@ -12,37 +15,257 @@ set -e
12
15
  RED='\033[0;31m'
13
16
  GREEN='\033[0;32m'
14
17
  BLUE='\033[0;34m'
18
+ YELLOW='\033[1;33m'
15
19
  BOLD='\033[1m'
20
+ DIM='\033[2m'
16
21
  NC='\033[0m'
17
22
 
18
- log_info() { echo -e "${BLUE}==>${NC} $1"; }
23
+ log_info() { echo -e "${BLUE}==>${NC} $1"; }
19
24
  log_success() { echo -e "${GREEN}==>${NC} $1"; }
20
- log_error() { echo -e "${RED}==>${NC} $1"; }
25
+ log_warn() { echo -e "${YELLOW}==>${NC} $1"; }
26
+ log_error() { echo -e "${RED}==>${NC} $1"; }
21
27
 
28
+ INSTALL_DIR="$HOME/.claude-deck"
22
29
  REPO_URL="https://github.com/ATERCATES/claude-deck.git"
23
- INSTALL_DIR="$HOME/.claude-deck/repo"
30
+ NODE_MIN_VERSION=24
31
+
32
+ # ─── Parse CLI flags ──────────────────────────────────────────────────────────
33
+
34
+ FLAG_PORT=""
35
+ FLAG_SSH_HOST=""
36
+ FLAG_SSH_PORT=""
37
+ FLAG_NONINTERACTIVE=false
38
+
39
+ while [[ $# -gt 0 ]]; do
40
+ case "$1" in
41
+ --port) FLAG_PORT="$2"; shift 2 ;;
42
+ --ssh-host) FLAG_SSH_HOST="$2"; shift 2 ;;
43
+ --ssh-port) FLAG_SSH_PORT="$2"; shift 2 ;;
44
+ --yes|-y) FLAG_NONINTERACTIVE=true; shift ;;
45
+ *) shift ;;
46
+ esac
47
+ done
48
+
49
+ # ─── Interactive prompts ──────────────────────────────────────────────────────
50
+
51
+ ask() {
52
+ local prompt="$1" default="$2" var="$3"
53
+ if [[ -t 0 ]] && [[ "$FLAG_NONINTERACTIVE" == false ]]; then
54
+ if [[ -n "$default" ]]; then
55
+ read -rp "$(echo -e "${BOLD}$prompt${NC} ${DIM}[$default]${NC}: ")" value
56
+ eval "$var=\"${value:-$default}\""
57
+ else
58
+ read -rp "$(echo -e "${BOLD}$prompt${NC}: ")" value
59
+ eval "$var=\"$value\""
60
+ fi
61
+ else
62
+ eval "$var=\"$default\""
63
+ fi
64
+ }
65
+
66
+ # ─── Header ───────────────────────────────────────────────────────────────────
24
67
 
25
68
  echo ""
26
- echo -e "${BOLD}ClaudeDeck Installer${NC}"
69
+ echo -e "${BOLD} ClaudeDeck Installer${NC}"
70
+ echo -e "${DIM} Self-hosted web UI for Claude Code sessions${NC}"
27
71
  echo ""
28
72
 
29
- # Check for git
73
+ # ─── Check prerequisites ─────────────────────────────────────────────────────
74
+
75
+ log_info "Checking prerequisites..."
76
+
30
77
  if ! command -v git &> /dev/null; then
31
- log_error "git is required. Please install git first."
78
+ log_error "git is required. Install it with: sudo apt install git"
79
+ exit 1
80
+ fi
81
+
82
+ if ! command -v tmux &> /dev/null; then
83
+ log_warn "tmux is not installed (required for session management)"
84
+ ask "Install tmux now? (y/n)" "y" INSTALL_TMUX
85
+ if [[ "$INSTALL_TMUX" == "y" ]]; then
86
+ sudo apt install -y tmux
87
+ log_success "tmux installed"
88
+ else
89
+ log_error "tmux is required. Install it manually and re-run."
32
90
  exit 1
91
+ fi
92
+ fi
93
+
94
+ # ─── Node.js ──────────────────────────────────────────────────────────────────
95
+
96
+ install_node() {
97
+ log_info "Installing Node.js $NODE_MIN_VERSION..."
98
+ local N_PREFIX="$HOME/.n"
99
+ mkdir -p "$N_PREFIX"
100
+ curl -fsSL https://raw.githubusercontent.com/tj/n/master/bin/n -o /tmp/n
101
+ chmod +x /tmp/n
102
+ N_PREFIX="$N_PREFIX" /tmp/n "$NODE_MIN_VERSION"
103
+ rm -f /tmp/n
104
+ export PATH="$N_PREFIX/bin:$PATH"
105
+ log_success "Node.js $(node --version) installed"
106
+ }
107
+
108
+ # Check for existing node
109
+ NODE_OK=false
110
+ if command -v node &> /dev/null; then
111
+ NODE_VERSION=$(node --version | sed 's/v//' | cut -d. -f1)
112
+ if [[ "$NODE_VERSION" -ge "$NODE_MIN_VERSION" ]]; then
113
+ NODE_OK=true
114
+ log_success "Node.js $(node --version) found"
115
+ fi
33
116
  fi
34
117
 
35
- # Clone or update repo
36
- if [[ -d "$INSTALL_DIR" ]]; then
37
- log_info "Updating existing installation..."
38
- cd "$INSTALL_DIR"
39
- git pull --ff-only
118
+ # Check ~/.n/bin as well
119
+ if [[ "$NODE_OK" == false ]] && [[ -x "$HOME/.n/bin/node" ]]; then
120
+ export PATH="$HOME/.n/bin:$PATH"
121
+ NODE_VERSION=$(node --version | sed 's/v//' | cut -d. -f1)
122
+ if [[ "$NODE_VERSION" -ge "$NODE_MIN_VERSION" ]]; then
123
+ NODE_OK=true
124
+ log_success "Node.js $(node --version) found in ~/.n"
125
+ fi
126
+ fi
127
+
128
+ if [[ "$NODE_OK" == false ]]; then
129
+ install_node
130
+ fi
131
+
132
+ # pnpm
133
+ if ! command -v pnpm &> /dev/null; then
134
+ log_info "Installing pnpm..."
135
+ npm install -g pnpm > /dev/null 2>&1
136
+ log_success "pnpm $(pnpm --version) installed"
40
137
  else
41
- log_info "Downloading ClaudeDeck..."
42
- mkdir -p "$(dirname "$INSTALL_DIR")"
43
- git clone "$REPO_URL" "$INSTALL_DIR"
44
- cd "$INSTALL_DIR"
138
+ log_success "pnpm $(pnpm --version) found"
45
139
  fi
46
140
 
47
- # Run the install command
48
- exec "$INSTALL_DIR/scripts/claude-deck" install
141
+ # ─── Configuration ────────────────────────────────────────────────────────────
142
+
143
+ echo ""
144
+ log_info "Configuration"
145
+ echo ""
146
+
147
+ PORT="${FLAG_PORT}"
148
+ SSH_HOST="${FLAG_SSH_HOST}"
149
+ SSH_PORT="${FLAG_SSH_PORT}"
150
+
151
+ ask "Port" "3011" PORT
152
+ ask "SSH host for VS Code remote button (leave empty to skip)" "" SSH_HOST
153
+
154
+ if [[ -n "$SSH_HOST" ]]; then
155
+ ask "SSH port" "22" SSH_PORT
156
+ fi
157
+
158
+ echo ""
159
+
160
+ # ─── Install ──────────────────────────────────────────────────────────────────
161
+
162
+ if [[ -d "$INSTALL_DIR/repo" ]]; then
163
+ log_info "Updating existing installation..."
164
+ cd "$INSTALL_DIR/repo"
165
+ git pull --ff-only
166
+ else
167
+ log_info "Cloning ClaudeDeck..."
168
+ mkdir -p "$INSTALL_DIR"
169
+ git clone "$REPO_URL" "$INSTALL_DIR/repo"
170
+ cd "$INSTALL_DIR/repo"
171
+ fi
172
+
173
+ # Dependencies
174
+ log_info "Installing dependencies..."
175
+ pnpm install > /dev/null 2>&1
176
+
177
+ # Approve native builds if needed
178
+ if grep -q "onlyBuiltDependencies" package.json 2>/dev/null; then
179
+ : # already configured
180
+ else
181
+ node -e "
182
+ const pkg = require('./package.json');
183
+ pkg.pnpm = pkg.pnpm || {};
184
+ pkg.pnpm.onlyBuiltDependencies = ['better-sqlite3', 'esbuild', 'node-pty', 'sharp'];
185
+ require('fs').writeFileSync('package.json', JSON.stringify(pkg, null, 2) + '\n');
186
+ "
187
+ pnpm install > /dev/null 2>&1
188
+ fi
189
+
190
+ # Write .env
191
+ log_info "Writing .env..."
192
+ cat > "$INSTALL_DIR/repo/.env" << EOF
193
+ PORT=$PORT
194
+ EOF
195
+
196
+ if [[ -n "$SSH_HOST" ]]; then
197
+ echo "SSH_HOST=$SSH_HOST" >> "$INSTALL_DIR/repo/.env"
198
+ fi
199
+ if [[ -n "$SSH_PORT" ]] && [[ "$SSH_PORT" != "22" ]]; then
200
+ echo "SSH_PORT=$SSH_PORT" >> "$INSTALL_DIR/repo/.env"
201
+ fi
202
+
203
+ # Build
204
+ log_info "Building for production (this may take a minute)..."
205
+ pnpm build
206
+
207
+ # tmux config
208
+ if [[ ! -f "$HOME/.tmux.conf" ]] || ! grep -q "mouse on" "$HOME/.tmux.conf" 2>/dev/null; then
209
+ log_info "Enabling tmux mouse support..."
210
+ echo "set -g mouse on" >> "$HOME/.tmux.conf"
211
+ fi
212
+
213
+ # ─── Systemd service ─────────────────────────────────────────────────────────
214
+
215
+ NODE_BIN=$(which node)
216
+ TSX_BIN="$INSTALL_DIR/repo/node_modules/.bin/tsx"
217
+
218
+ SERVICE_FILE="[Unit]
219
+ Description=ClaudeDeck
220
+ After=network.target
221
+
222
+ [Service]
223
+ Type=simple
224
+ User=$USER
225
+ WorkingDirectory=$INSTALL_DIR/repo
226
+ Environment=NODE_ENV=production
227
+ Environment=PATH=$(dirname "$NODE_BIN"):$INSTALL_DIR/repo/node_modules/.bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
228
+ ExecStart=$TSX_BIN --env-file=.env server.ts
229
+ Restart=on-failure
230
+ RestartSec=5
231
+
232
+ [Install]
233
+ WantedBy=multi-user.target"
234
+
235
+ INSTALL_SERVICE=false
236
+ if [[ -t 0 ]] && [[ "$FLAG_NONINTERACTIVE" == false ]]; then
237
+ echo ""
238
+ ask "Install as systemd service? (y/n)" "y" INSTALL_SVC_ANSWER
239
+ [[ "$INSTALL_SVC_ANSWER" == "y" ]] && INSTALL_SERVICE=true
240
+ else
241
+ INSTALL_SERVICE=true
242
+ fi
243
+
244
+ if [[ "$INSTALL_SERVICE" == true ]]; then
245
+ log_info "Installing systemd service..."
246
+ echo "$SERVICE_FILE" | sudo tee /etc/systemd/system/claudedeck.service > /dev/null
247
+ sudo systemctl daemon-reload
248
+ sudo systemctl enable claudedeck > /dev/null 2>&1
249
+ sudo systemctl restart claudedeck
250
+ sleep 2
251
+
252
+ if systemctl is-active --quiet claudedeck; then
253
+ log_success "Service running on port $PORT"
254
+ else
255
+ log_error "Service failed to start. Check: sudo journalctl -u claudedeck -f"
256
+ fi
257
+ fi
258
+
259
+ # ─── Done ─────────────────────────────────────────────────────────────────────
260
+
261
+ echo ""
262
+ echo -e "${GREEN}${BOLD} ClaudeDeck installed!${NC}"
263
+ echo ""
264
+ echo -e " ${BOLD}Local:${NC} http://localhost:$PORT"
265
+ if [[ -n "$SSH_HOST" ]]; then
266
+ echo -e " ${BOLD}Remote:${NC} Configure your reverse proxy to point to port $PORT"
267
+ fi
268
+ echo ""
269
+ echo -e " ${DIM}First visit will prompt you to create an account.${NC}"
270
+ echo -e " ${DIM}Commands: sudo systemctl {start|stop|restart|status} claudedeck${NC}"
271
+ echo ""