Skip to content

richardwhatever/shipyard

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

⚡ shipyard

Auto-serve dev previews for default branches and open GitHub PRs. Zero dependencies, single Node.js file.

What it does

  • Registers local repos and watches them for changes
  • Spins up dev servers for the default branch and every open PR
  • Polls GitHub for new/updated/closed PRs and updates automatically
  • Provides a polished dark dashboard to manage everything

Quick Start

node shipyard.js
# or with a custom port
node shipyard.js --port 9000

Then open http://localhost:8090 and click Add Repo.

How It Works

  • Config stored at ~/.shipyard/config.json
  • State tracked at ~/.shipyard/state.json
  • Workspaces cloned to ~/.shipyard/workspaces/
  • Logs written to ~/.shipyard/logs/

Port Convention

  • basePort + 0 → default branch
  • basePort + PR_number → PR preview

Dev Command

Use {{port}} as the port placeholder in your dev command:

npx vite --port {{port}} --host

Requirements

  • Node.js 18+
  • git CLI
  • gh CLI (for PR detection)

API

Method Endpoint Description
GET / Dashboard
GET /api/status Full state JSON
POST /api/repos Add repo
PUT /api/repos/:name Update repo
DELETE /api/repos/:name Delete repo
POST /api/repos/:name/restart Restart servers
POST /api/poll Trigger immediate poll

Screenshot

License

MIT

About

Auto-serve dev previews for main branches and open PRs

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors