Skip to content

Commit 880e08a

Browse files
MrFlounderclaude
andauthored
docs: add crab env snapshot/restore to README (#59)
## Summary - Add "Environment Migration (`crab env`)" section documenting the snapshot/restore workflow for capturing and restoring dev environments - Update "New Computer Setup" section with a fast-path restore option using `crab env restore` ## Test plan - [ ] Verify markdown renders correctly on GitHub - [ ] Confirm code blocks and formatting look correct 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 22cd4e5 commit 880e08a

1 file changed

Lines changed: 29 additions & 0 deletions

File tree

README.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -290,6 +290,19 @@ crab cheat # Show cheat sheet
290290
crab update # Self-update to latest version
291291
```
292292

293+
### Environment Migration (`crab env`)
294+
295+
Capture your entire dev environment and restore it on a new machine. An AI agent explores your machine, builds a comprehensive setup recipe, and packages everything into an encrypted bundle.
296+
297+
```bash
298+
crab env snapshot # Agent explores machine → encrypted bundle
299+
crab env snapshot --dry-run # Preview what would be captured
300+
crab env restore --from FILE # Decrypt + agent sets up new machine
301+
crab env restore --from URL # Download and restore from URL
302+
```
303+
304+
The snapshot captures: Homebrew packages, Node/Python/Go versions, shell config, git identity, editor settings, database schemas, Docker config, cloud tools, project inventory, .env files, and API tokens — all encrypted with a password.
305+
293306
## Setup Flow
294307

295308
### 1. Register your project
@@ -460,6 +473,22 @@ With prefix `Ctrl+a`:
460473

461474
## New Computer Setup
462475

476+
### Fast path: Restore from snapshot
477+
478+
If you have a `crab env` snapshot from your old machine:
479+
480+
```bash
481+
# 1. Install crabcode
482+
curl -fsSL https://raw.githubusercontent.com/promptfoo/crabcode/main/install.sh | bash
483+
484+
# 2. Restore everything
485+
crab env restore --from ~/path/to/snapshot.enc
486+
```
487+
488+
The restore agent walks through each phase — installing tools, restoring configs, setting up projects — with your approval at each step.
489+
490+
### Manual setup
491+
463492
1. **Install dependencies:**
464493
```bash
465494
brew install tmux yq zip git # macOS

0 commit comments

Comments
 (0)