Sitemd launch
Launch the sitemd dev server. Usage: /launch [demo|scratch]. No args serves the user's project.
install
source · Clone the upstream repo
git clone https://github.com/sitemd-cc/sitemd
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/sitemd-cc/sitemd "$T" && mkdir -p ~/.claude/skills && cp -r "$T/.claude/skills/launch" ~/.claude/skills/sitemd-cc-sitemd-launch-33867f && rm -rf "$T"
manifest:
.claude/skills/launch/SKILL.mdsource content
Launch Site
Starts the dev server with file watching and live build sync, then opens in the default browser.
Input
Optional target from arguments:
$ARGUMENTS
- No arguments → serve the user's project (
)sitemd/
→ serve the demo component showcase (demo
)sitemd/templates/demo/
→ serve the blank-slate template (scratch
)sitemd/templates/scratch/
Procedure
Determine the target
- Parse
for "demo" or "scratch"$ARGUMENTS - If demo: set root to
, read port from itssitemd/templates/demo/
(default 4848)settings/build.md - If scratch: set root to
, read port from itssitemd/templates/scratch/
(default 4747)settings/build.md - If no arguments: set root to
, read port from itssitemd/
(default 4747)settings/build.md
Check binary
- Check if
binary exists in the projectsitemd/sitemd - If missing, run
to download it./sitemd/install
Check dependencies
- Check if
exists (where<root>/node_modules/
is the target directory from step 1)<root> - If missing or if
is newer thanpackage.json
, runnode_modules/
fromnpm install<root> - If install fails, warn the user but continue launching — some features (icons, OG images) may not work
Launch the server
- Kill any existing process on the determined port:
lsof -ti:<port> | xargs kill 2>/dev/null; true - Start the dev server in background:
(for demo/scratch, usecd <root> && ./sitemd/sitemd launch &
from inside the target directory)SITEMD_PROJECT_ROOT="$(pwd)" ./sitemd/sitemd launch & - Wait 1 second for the server to start, then open in browser:
- If Chrome is installed (
exists), open with a dedicated debugging profile and DevTools:/Applications/Google Chrome.appsleep 1 && open -na "Google Chrome" --args --user-data-dir="/tmp/sitemd-chrome-debug" --auto-open-devtools-for-tabs http://localhost:<port> - Otherwise:
sleep 1 && open http://localhost:<port>
- If Chrome is installed (
- Tell the user what's running:
- Demo: "Demo showcase is live at http://localhost:<port> — browse to see what sitemd can do"
- Scratch: "Blank-slate template is live at http://localhost:<port>"
- Project: "Your site is live at http://localhost:<port> with live build sync — file changes auto-rebuild"
Rules
- No permission required — Execute immediately without asking
- Read the port from the target's settings — do not hardcode ports
- Set
when launching demo/scratch — tells the binary the actual project rootSITEMD_PROJECT_ROOT - Use
— the compiled binary, not./sitemd/sitemd launchnode engine/build --serve - Background the server so the terminal stays usable