Skip to content

Commit 24c2997

Browse files
Improve README and add developer documentation
- Rewrite README to be user-focused with Claude Code first philosophy - Add complete CLI and configuration documentation - Move Chinese/z.ai mentions to bottom - Extract developer docs into DEVELOPMENT.md - Fix missing `done` action in current-task CLI command - Bump version to 1.13.1
1 parent f14e83c commit 24c2997

4 files changed

Lines changed: 215 additions & 61 deletions

File tree

DEVELOPMENT.md

Lines changed: 125 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,125 @@
1+
# Development
2+
3+
## Prerequisites
4+
5+
- [mise](https://mise.jdx.dev/) for task running and tool management
6+
- [Bun](https://bun.sh/) (installed automatically via mise)
7+
8+
## Getting Started
9+
10+
```bash
11+
# Install tools and dependencies
12+
mise install
13+
14+
# Start both frontend and backend (recommended)
15+
mise run dev
16+
17+
# Or run separately:
18+
mise run server # Backend (port 3333, with auto-reload)
19+
mise run client # Frontend (port 5173, proxies to backend)
20+
```
21+
22+
Development mode defaults to `~/.vibora/dev` (port 3222) to keep development data separate from production.
23+
24+
## Available Tasks
25+
26+
```bash
27+
mise run dev # Start frontend and backend dev servers
28+
mise run server # Start backend dev server with auto-reload
29+
mise run client # Start frontend dev server
30+
mise run build # Build for production
31+
mise run start # Run production server
32+
mise run up # Build and start production server as daemon
33+
mise run down # Stop the daemon server
34+
mise run check # Run all checks (lint + typecheck)
35+
mise run lint # Run ESLint
36+
mise run typecheck # Check TypeScript types
37+
mise run preview # Preview production build
38+
39+
# Database operations
40+
mise run db:push # Sync schema to database
41+
mise run db:studio # Open Drizzle Studio GUI
42+
mise run db:generate # Generate migrations
43+
mise run db:migrate # Apply migrations
44+
45+
# CLI package
46+
mise run cli:build # Bundle server, copy frontend, generate migrations
47+
mise run cli:publish # Publish to npm (runs cli:build first)
48+
49+
# Version management
50+
mise run bump # Bump patch version (or: bump major, bump minor)
51+
```
52+
53+
## Architecture
54+
55+
### Frontend (`src/`)
56+
- **React 19** with TanStack Router (file-based routing in `src/routes/`)
57+
- **TanStack React Query** for server state
58+
- **shadcn/ui** (v4 with baseui support) for UI components
59+
- **xterm.js** for terminal emulation
60+
- Components organized by feature: `kanban/`, `terminal/`, `viewer/`, `ui/`
61+
- Path alias: `@``./src/`
62+
63+
### Backend (`server/`)
64+
- **Hono.js** framework on Bun runtime
65+
- **SQLite** database with Drizzle ORM
66+
- **WebSocket** for real-time terminal I/O (`@hono/node-ws`)
67+
- **bun-pty** for PTY management
68+
69+
### Key Data Flows
70+
- REST API (`/api/*`) for task CRUD, git operations, config
71+
- WebSocket (`/ws/terminal`) for terminal I/O multiplexing
72+
- Frontend uses relative URLs - Vite proxies to backend in dev
73+
74+
## Database
75+
76+
- Default location: `~/.vibora/vibora.db` (SQLite with WAL mode)
77+
- Schema: `server/db/schema.ts`
78+
79+
### Tables
80+
81+
- **tasks** - Task metadata, git worktree paths, status, Linear integration, PR tracking
82+
- **repositories** - Saved git repositories with startupScript and copyFiles patterns
83+
- **terminalTabs** - First-class tab entities for terminal organization
84+
- **terminals** - Terminal instances with dtach session backing
85+
- **terminalViewState** - Singleton UI state persistence (active tab, focused terminals)
86+
87+
Task statuses: `IN_PROGRESS`, `IN_REVIEW`, `DONE`, `CANCELED`
88+
89+
## File Organization
90+
91+
```
92+
src/
93+
routes/ # Pages (TanStack Router)
94+
components/ # React components by feature
95+
hooks/ # Custom hooks (use-tasks, use-terminal-ws, etc.)
96+
server/
97+
routes/ # REST API handlers (/api/*)
98+
services/ # Business logic (pr-monitor, linear, task-status, notifications)
99+
terminal/ # PTY management (pty-manager, buffer-manager)
100+
websocket/ # WebSocket protocol for terminal I/O (/ws/terminal)
101+
db/ # Drizzle schema and initialization
102+
lib/ # Shared utilities (settings, etc.)
103+
shared/ # Shared types (frontend, backend, CLI)
104+
cli/
105+
src/ # CLI source (commands, utils)
106+
server/ # Bundled server (generated)
107+
dist/ # Frontend build (generated)
108+
drizzle/ # SQL migrations (generated)
109+
```
110+
111+
## CLI Package
112+
113+
The `@vibora/cli` package provides a global CLI for running Vibora as a daemon. The built CLI package includes:
114+
115+
- `cli/server/index.js` - Bundled server
116+
- `cli/dist/` - Pre-built frontend assets
117+
- `cli/drizzle/` - SQL migrations
118+
- `cli/lib/librust_pty.so` - Native PTY library
119+
120+
### Building
121+
122+
```bash
123+
mise run cli:build # Bundle server, copy frontend, generate migrations
124+
mise run cli:publish # Publish to npm (runs cli:build first)
125+
```

README.md

Lines changed: 87 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,11 @@
22

33
![vibora](https://github.com/user-attachments/assets/fed72bab-0e66-42f3-91ac-8e024372685c)
44

5-
65
The Vibe Engineer's Cockpit. Vibora marries basic project management with actual software development by embedding terminals directly into the workflow.
76

8-
Available in English and Chinese. Works with [z.ai](https://z.ai) for Claude Code proxy integration.
9-
107
## Philosophy
118

12-
- **Terminal-first AI agent orchestration**Agents (Claude Code, Codex, etc.) run in terminals as-is. No abstraction layer, no wrapper APIs, no feature parity maintenance as agents evolve.
9+
- **Claude Code first**Built for developers who prefer working in the terminal with CLI agents. Vibora is designed with Claude Code in mind, though it works with other CLI agents (Codex, Gemini CLI, etc.). No abstraction layer, no wrapper APIs—agents run in terminals as-is.
1310
- **Opinionated with few opinions** — Provides structure without dictating workflow.
1411
- **Git worktree isolation** — Tasks create isolated git worktrees, with architecture supporting evolution toward more general task types.
1512

@@ -21,113 +18,144 @@ Requires [Node.js](https://nodejs.org/). Run the latest vibora with a single com
2118
npx vibora@latest up
2219
```
2320

24-
This starts the vibora server as a daemon. Open http://localhost:3333 in your browser. The `up` command will help you install any missing dependencies.
21+
This starts the Vibora server as a daemon. Open http://localhost:3333 in your browser. The `up` command will help you install any missing dependencies.
2522

2623
```bash
2724
npx vibora@latest down # Stop the server
2825
npx vibora@latest status # Check if running
2926
```
3027

31-
## Tech Stack
32-
33-
- **Frontend**: React 19, TanStack Router & Query, xterm.js, Tailwind CSS, shadcn/ui (v4 with baseui support)
34-
- **Backend**: Hono.js on Bun, SQLite with Drizzle ORM, WebSocket for terminal I/O
35-
3628
## Configuration
3729

38-
Settings are stored in `.vibora/settings.json`.
30+
Settings are stored in `.vibora/settings.json`. The vibora directory is resolved in this order:
31+
32+
1. `VIBORA_DIR` environment variable (explicit override)
33+
2. `.vibora` in current working directory (per-worktree isolation)
34+
3. `~/.vibora` (default)
3935

4036
| Setting | Env Var | Default |
4137
|---------|---------|---------|
42-
| (base directory) | `VIBORA_DIR` | .vibora in CWD or ~/.vibora |
4338
| port | `PORT` | 3333 |
4439
| defaultGitReposDir | `VIBORA_GIT_REPOS_DIR` | ~ |
4540
| taskCreationCommand | `VIBORA_TASK_CREATION_COMMAND` | `claude --dangerously-skip-permissions` |
4641
| hostname | `VIBORA_HOSTNAME` | (empty) |
4742
| sshPort | `VIBORA_SSH_PORT` | 22 |
43+
| basicAuthUsername | `VIBORA_BASIC_AUTH_USERNAME` | null |
44+
| basicAuthPassword | `VIBORA_BASIC_AUTH_PASSWORD` | null |
4845
| linearApiKey | `LINEAR_API_KEY` | null |
4946
| githubPat | `GITHUB_PAT` | null |
47+
| language || null (auto-detect) |
5048

51-
Notification settings (sound, Slack, Discord, Pushover) are configured via the Settings UI and stored in `settings.json`.
49+
Notification settings (sound, Slack, Discord, Pushover) are configured via the Settings UI or CLI and stored in `settings.json`.
5250

5351
Precedence: environment variable → settings.json → default
5452

55-
## Development
56-
57-
### Prerequisites
58-
59-
- [mise](https://mise.jdx.dev/) for task running and tool management
60-
- [Bun](https://bun.sh/) (installed automatically via mise)
53+
### Linear Integration
6154

62-
### Development
55+
Vibora can sync task status with Linear tickets. Configure `linearApiKey` in settings or set the `LINEAR_API_KEY` environment variable.
6356

6457
```bash
65-
# Install tools and dependencies
66-
mise install
67-
68-
# Start both frontend and backend (recommended)
69-
mise run dev
70-
71-
# Or run separately:
72-
mise run server # Backend (port 3333, with auto-reload)
73-
mise run client # Frontend (port 5173, proxies to backend)
58+
# Link current task to a Linear ticket
59+
vibora current-task linear https://linear.app/team/issue/TEAM-123
7460
```
7561

76-
### Available Tasks
62+
When a task status changes in Vibora, the linked Linear ticket status is updated automatically.
7763

78-
```bash
79-
mise run dev # Start frontend and backend dev servers
80-
mise run server # Start backend dev server with auto-reload
81-
mise run client # Start frontend dev server
82-
mise run build # Build for production
83-
mise run start # Run production server
84-
mise run lint # Run ESLint
85-
mise run preview # Preview production build
86-
87-
# Database operations
88-
mise run db:push # Sync schema to database
89-
mise run db:studio # Open Drizzle Studio GUI
90-
mise run db:generate # Generate migrations
91-
mise run db:migrate # Apply migrations
92-
```
64+
### Basic Auth
65+
66+
Set `basicAuthUsername` and `basicAuthPassword` (via settings or environment variables) to require authentication. Useful when exposing Vibora over a network.
9367

9468
## CLI
9569

9670
The CLI lets AI agents (like Claude Code) working inside task worktrees query and update task status.
9771

98-
### Usage
72+
### Server Management
9973

10074
```bash
101-
# Get current task (auto-detected from worktree path)
102-
vibora current-task
75+
vibora up # Start server daemon
76+
vibora down # Stop server
77+
vibora status # Check server status
78+
vibora health # Check server health
79+
```
80+
81+
### Current Task (auto-detected from worktree)
10382

104-
# Update task status
83+
```bash
84+
vibora current-task # Get current task info
10585
vibora current-task in-progress # Mark as IN_PROGRESS
10686
vibora current-task review # Mark as IN_REVIEW
10787
vibora current-task done # Mark as DONE
108-
vibora current-task cancel # Mark as CANCELLED
88+
vibora current-task cancel # Mark as CANCELED
89+
vibora current-task pr <url> # Associate a PR with current task
90+
vibora current-task linear <url> # Link to a Linear ticket
91+
```
10992

110-
# Server management
111-
vibora up # Start server daemon
112-
vibora down # Stop server
113-
vibora status # Check server status
93+
### Task Management
11494

115-
# Task management
95+
```bash
11696
vibora tasks list # List all tasks
11797
vibora tasks get <id> # Get task by ID
98+
vibora tasks create # Create a new task
99+
vibora tasks update <id> # Update a task
100+
vibora tasks move <id> # Move task to different status
101+
vibora tasks delete <id> # Delete a task
102+
```
103+
104+
### Git Operations
118105

119-
# Git operations
106+
```bash
120107
vibora git status # Git status for current worktree
121108
vibora git diff # Git diff for current worktree
109+
vibora git branches # List branches in a repo
110+
```
111+
112+
### Worktrees
113+
114+
```bash
115+
vibora worktrees list # List all worktrees
116+
vibora worktrees delete # Delete a worktree
117+
```
118+
119+
### Configuration
120+
121+
```bash
122+
vibora config get <key> # Get a config value
123+
vibora config set <key> <value> # Set a config value
122124
```
123125

124-
### Options
126+
### Notifications
125127

126128
```bash
127-
--port=<port> # Server port (default: 3333)
128-
--pretty # Pretty-print JSON output
129+
vibora notifications # Show notification settings
130+
vibora notifications enable # Enable notifications
131+
vibora notifications disable # Disable notifications
132+
vibora notifications test <ch> # Test a channel (sound, slack, discord, pushover)
133+
vibora notifications set <ch> <key> <value>
134+
# Set a channel config
135+
136+
vibora notify <title> [message] # Send a notification to all enabled channels
129137
```
130138

139+
### Global Options
140+
141+
```bash
142+
--port=<port> # Server port (default: 3333)
143+
--url=<url> # Override full server URL
144+
--pretty # Pretty-print JSON output
145+
```
146+
147+
## Internationalization
148+
149+
Available in English and Chinese. Set the `language` setting or let it auto-detect from your browser.
150+
151+
## z.ai Integration
152+
153+
Works with [z.ai](https://z.ai) for Claude Code proxy integration. Configure via the Settings UI.
154+
155+
## Development
156+
157+
See [DEVELOPMENT.md](DEVELOPMENT.md) for development setup, architecture, and contributing guidelines.
158+
131159
## License
132160

133161
[PolyForm Shield 1.0.0](LICENSE)

cli/src/commands/current-task.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import type { TaskStatus } from '@shared/types'
55

66
const STATUS_MAP: Record<string, TaskStatus> = {
77
review: 'IN_REVIEW',
8+
done: 'DONE',
89
cancel: 'CANCELED',
910
'in-progress': 'IN_PROGRESS',
1011
}
@@ -103,7 +104,7 @@ export async function handleCurrentTaskCommand(
103104
if (!newStatus) {
104105
throw new CliError(
105106
'INVALID_ACTION',
106-
`Unknown action: ${action}. Valid actions: review, cancel, in-progress, pr, linear`,
107+
`Unknown action: ${action}. Valid actions: in-progress, review, done, cancel, pr, linear`,
107108
ExitCodes.INVALID_ARGS
108109
)
109110
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "vibora",
33
"private": true,
4-
"version": "1.13.0",
4+
"version": "1.13.1",
55
"description": "The Vibe Engineer's Cockpit",
66
"license": "PolyForm-Shield-1.0.0",
77
"type": "module",

0 commit comments

Comments
 (0)