wit up and wit down commands provide a simple way to start and stop the complete wit platform, including the database, API server, and web UI.
wit up
Start the complete wit platform with a single command.Options
| Option | Description |
|---|---|
--port <port> | API server port (default: 3000) |
--db-port <port> | Database port (default: 5432) |
--no-web | Don’t start the web UI |
--no-db | Use external database (requires DATABASE_URL) |
--data-dir <dir> | Data directory (default: ~/.wit) |
-h, --help | Show help message |
Examples
What wit up Does
When you runwit up, it:
- Starts PostgreSQL (via Docker) - unless
--no-dbis specified - Runs database migrations - ensures schema is up to date
- Starts the API server - Git HTTP server and tRPC API
- Starts the web UI - React development server (unless
--no-web)
Example Output
wit down
Stop all wit platform services.Options
| Option | Description |
|---|---|
--keep-db | Don’t stop the database |
--remove-data | Remove all data (DESTRUCTIVE) |
-h, --help | Show help message |
Examples
Example Output
Data Directory
By default, wit stores all data in~/.wit/:
Custom Data Directory
Requirements
Docker
wit up uses Docker to run PostgreSQL. Ensure Docker is installed and running:
External Database
If you can’t use Docker or prefer an external database:Ports
Default ports used by wit:| Service | Default Port | Environment Variable |
|---|---|---|
| API Server | 3000 | PORT |
| Web UI (Vite) | 5173 | - |
| PostgreSQL | 5432 | - |
Custom Ports
Process Management
wit runs services in the background and tracks their process IDs:Checking Status
Logs
Logs are stored in~/.wit/logs/:
| File | Contents |
|---|---|
server.log | API server output |
web.log | Web UI (Vite) output |
Viewing Logs
Workflow Examples
Daily Development
Quick API Testing
Fresh Start
Keep Database Between Restarts
Troubleshooting
wit is already running
wit is already running
Docker not found
Docker not found
Database failed to start
Database failed to start
Check if the port is in use:Either stop the conflicting process or use a different port:
Web UI failed to start
Web UI failed to start
Check if port 5173 is in use:Check the web logs:Try without web UI:
Server won't stop
Server won't stop
If
wit down doesn’t stop services:Environment Variables
| Variable | Description |
|---|---|
DATABASE_URL | PostgreSQL connection string (when using —no-db) |
PORT | API server port (alternative to —port) |
REPOS_DIR | Repository storage directory |
BETTER_AUTH_SECRET | Authentication secret (for production) |
Related Commands
wit serve- Start just the API serverwit token- Create API tokenswit collaborator- Manage collaborators