Quick Start
Command Reference
| Option | Description | Default |
|---|---|---|
--port <number> | Port to listen on | 3000 |
--repos <path> | Directory to store repositories | ./repos |
--host <hostname> | Hostname to bind to | 0.0.0.0 |
--verbose | Enable verbose logging | false |
-h, --help | Show help message | - |
Examples
Basic Usage
Production Setup
Using the Server
Once the server is running, you can interact with it using standard git commands.Clone a Repository
Push to Create a New Repository
Repositories are created automatically on first push:Fetch and Pull
Server Output
When you start the server, you’ll see:API Endpoints
The server exposes several endpoints:| Endpoint | Description |
|---|---|
GET /health | Health check with database status |
GET /repos | List all repositories |
POST /sync | Sync filesystem repos to database |
/trpc/* | tRPC API endpoints |
/:owner/:repo.git/* | Git Smart HTTP protocol |
Health Check
List Repositories
Database Integration
For full platform features (users, PRs, issues), connect to PostgreSQL:- User accounts
- Pull requests
- Issues
- Activity tracking
Repository Storage
Repositories are stored as bare Git repositories:Running in Docker
Using with docker-compose
Graceful Shutdown
The server handles shutdown signals gracefully:Troubleshooting
Port already in use
Port already in use
Permission denied on repos directory
Permission denied on repos directory
Database connection failed
Database connection failed
Check your The server will continue without database features if connection fails.
DATABASE_URL environment variable:Push rejected
Push rejected
Make sure the repository URL matches the pattern:The owner and repo will be extracted from the URL.