Skip to content

Commit 3a44b53

Browse files
committed
docs: add development workflow documentation to knowledge.md
1 parent d6ff512 commit 3a44b53

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

knowledge.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,39 @@ eval "$(codebuff shims env)"
6363
base-lite "fix this bug" # Works right away!
6464
```
6565

66+
## Development Workflow
67+
68+
### Starting the Development Environment
69+
70+
```bash
71+
# Full development environment (services + CLI)
72+
bun dev # Starts db, studio, sdk, web, then CLI
73+
# Ctrl+C stops everything
74+
75+
# Or run services and CLI separately
76+
bun start-services # Start services in background, exits when ready
77+
bun start-cli # Start CLI in foreground
78+
bun stop-services # Stop background services
79+
```
80+
81+
**Services started:**
82+
- `db` - PostgreSQL database (via Docker)
83+
- `studio` - Drizzle Studio for database inspection
84+
- `sdk` - SDK build (one-time)
85+
- `web` - Next.js web server
86+
87+
**Logs:** All service logs are written to `debug/console/`:
88+
- `db.log`, `studio.log`, `sdk.log`, `web.log`
89+
90+
**Worktree Support:** Each worktree can run on different ports. Create `.env.development.local` with:
91+
```
92+
PORT=3001
93+
NEXT_PUBLIC_WEB_PORT=3001
94+
NEXT_PUBLIC_CODEBUFF_APP_URL=http://localhost:3001
95+
```
96+
97+
The `stop-services` command is worktree-safe - it only kills services on the port configured for that worktree.
98+
6699
## Package Management
67100

68101
- Use Bun for all package management operations

0 commit comments

Comments
 (0)