You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs: update README and cheat sheet for multi-project support
Update README with multi-project setup flow, directory structure,
FAQ, and config examples. Move MULTI-PROJECT section to top of
cheat sheet with expanded command reference.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
crab projects rm <alias> # Remove a project registration
149
+
crab default pf # Set default project
150
+
crab default # Show current default
151
+
```
152
+
153
+
Project configs live in `~/.crabcode/projects/<alias>.yaml`. When you run commands from a workspace directory, crabcode auto-detects which project you're in.
154
+
129
155
### Config Commands
130
156
131
157
```bash
132
-
crab init # Minimal setup (2 questions)
158
+
crab init # Register a project (3 questions)
133
159
crab config scan # Auto-detect .env files and ports
134
160
crab config # Show current configuration
135
161
```
@@ -164,17 +190,20 @@ crab cheat # Show cheat sheet
164
190
165
191
## Setup Flow
166
192
167
-
### 1. Initialize (minimal)
193
+
### 1. Register your project
168
194
169
195
```bash
170
196
cd ~/Dev/my-project
171
197
crab init
172
198
```
173
199
174
-
You'll be asked 2 questions:
200
+
You'll be asked 3 questions:
175
201
- **Main repo path** - where your project lives (defaults to current dir)
202
+
- **Project alias** - short name like `pf`, `cb` (defaults to repo dirname)
176
203
- **Workspace directory** - where to create worktrees (defaults to `<repo>-workspaces`)
177
204
205
+
This creates `~/.crabcode/projects/<alias>.yaml`.
206
+
178
207
### 2. Scan for ports
179
208
180
209
```bash
@@ -185,17 +214,36 @@ This scans your repo for `.env` and `.env.example` files, finds port variables,
185
214
186
215
### 3. Customize config
187
216
188
-
Edit `~/.crabcode/config.yaml` to set:
217
+
Edit `~/.crabcode/projects/<alias>.yaml` to set:
189
218
- **Layout panes** - your dev server command, main tool
190
219
- **Shared volume** - persistent storage across resets
191
220
- **Submodules** - if your project has git submodules
crab init #3 questions: repo path, alias, workspace dir
334
382
crab config scan # auto-detect .env files and ports
335
383
```
336
384
337
385
6.**Edit config for your project:**
338
386
```bash
339
-
# Set your layout commands in ~/.crabcode/config.yaml
387
+
# Set your layout commands in ~/.crabcode/projects/<alias>.yaml
340
388
# - server pane: your dev server (e.g., pnpm dev)
341
389
# - main pane: your main tool (e.g., claude)
342
390
```
@@ -354,7 +402,14 @@ With branches, switching context means stashing changes, checking out, reinstall
354
402
355
403
### Can I use crabcode with multiple projects?
356
404
357
-
Yes! Each project gets its own `~/.crabcode/config.yaml`. Run `crab init` in each project directory. Crabcode detects which project you're in based on your current directory.
405
+
Yes! Each project gets an alias and its own config at `~/.crabcode/projects/<alias>.yaml`. Run `crab init` in each project directory. Use `crab @alias <cmd>` to target a specific project, or just run commands from a workspace directory — crabcode auto-detects which project you're in.
0 commit comments