搜索

PythonReactSEOPDF
OpenClaw

dev-serve

Start and manage tmux-backed dev servers exposed through Caddy at wildcard subdomains.

brennerspear0 来源安装数☆ 0 仓库 Stars

安装与使用

请根据来源仓库和你的 AI 工具说明安装此技能。先阅读技能文件和依赖要求,再添加到工作流。

SkillHub CLI

skillhub install brennerspear/dev-serve

打开来源仓库,查看说明和兼容环境后,按来源提供的命令或步骤安装。

将来源链接提供给你的 Agent,让它先读取说明、核对依赖,并向你说明将执行的安装步骤。

查看来源 ↗使用指南

技能说明

dev-serve — One-Command Dev Server Hosting

Start a dev server in a tmux session and expose it via Caddy at <project>.YOUR_DOMAIN. One command up, one command down.

Setup

  1. Install the script:

    cp scripts/dev-serve.sh ~/.local/bin/dev-serve
    chmod +x ~/.local/bin/dev-serve
    
  2. Set your domain (one of):

    • Export DEV_SERVE_DOMAIN in your shell profile
    • Or edit the DOMAIN variable in the script
  3. Requirements:

    • Caddy running with wildcard DNS + TLS (see caddy skill)
    • tmux, jq, curl
    • Caddy admin API on localhost:2019

CLI

dev-serve up <repo-path> [port]      # Start dev server + add Caddy route
dev-serve down <name>                # Stop dev server + remove Caddy route
dev-serve ls                         # List active dev servers
dev-serve restart <name>             # Restart dev server (keep Caddy route)

How It Works

  1. Derives subdomain from the repo folder name (~/projects/myapp → myapp.YOUR_DOMAIN)
  2. Detects the dev command from package.json scripts.dev (supports vite, next, nuxt, sveltekit)
  3. Auto-patches Vite allowedHosts if a vite config file exists
  4. Starts the dev server in a tmux session named dev-<name> with --host 0.0.0.0 --port <port>
  5. Adds a Caddy route + dashboard link to the Caddyfile
  6. Reloads Caddy via admin API (no sudo, no restart)
  7. Verifies end-to-end: waits for the dev server to listen, then polls HTTPS until 2xx/3xx (up to 90s)

Examples

# Start with auto-assigned port (starts at 5200, skips used ports)
dev-serve up ~/projects/myapp
# → https://myapp.YOUR_DOMAIN

# Explicit port
dev-serve up ~/projects/myapp 5200

# Override dev command
DEV_CMD="bun dev" dev-serve up ~/projects/myapp 5300

# Stop and clean up
dev-serve down myapp

# List what's running
dev-serve ls

Configuration

Variable Default Description
DEV_SERVE_DOMAIN...

来源信息

Source
github
Repository
openclaw/skills
Path
skills/brennerspear/dev-serve
Version
—
Commit
da80f348df22f168d689fa613be40f3654ef791a
分类来源
rules
状态
active
可见性
public

这些信息来自收录时的来源分析,可能滞后;使用前请核对最新来源文件。

来源内容

SKILL.md
# dev-serve — One-Command Dev Server Hosting

Start a dev server in a tmux session and expose it via Caddy at `<project>.YOUR_DOMAIN`. One command up, one command down.

## Setup

1. **Install the script:**
   ```bash
   cp scripts/dev-serve.sh ~/.local/bin/dev-serve
   chmod +x ~/.local/bin/dev-serve
   ```

2. **Set your domain** (one of):
   - Export `DEV_SERVE_DOMAIN` in your shell profile
   - Or edit the `DOMAIN` variable in the script

3. **Requirements:**
   - Caddy running with wildcard DNS + TLS (see [caddy](https://clawhub.com/skills/caddy) skill)
   - `tmux`, `jq`, `curl`
   - Caddy admin API on `localhost:2019`

## CLI

```bash
dev-serve up <repo-path> [port]      # Start dev server + add Caddy route
dev-serve down <name>                # Stop dev server + remove Caddy route
dev-serve ls                         # List active dev servers
dev-serve restart <name>             # Restart dev server (keep Caddy route)
```

## How It Works

1. Derives subdomain from the repo folder name (`~/projects/myapp` → `myapp.YOUR_DOMAIN`)
2. Detects the dev command from `package.json` `scripts.dev` (supports vite, next, nuxt, sveltekit)
3. Auto-patches Vite `allowedHosts` if a vite config file exists
4. Starts the dev server in a tmux session named `dev-<name>` with `--host 0.0.0.0 --port <port>`
5. Adds a Caddy route + dashboard link to the Caddyfile
6. Reloads Caddy via admin API (no sudo, no restart)
7. Verifies end-to-end: waits for the dev server to listen, then polls HTTPS until 2xx/3xx (up to 90s)

## Examples

```bash
# Start with auto-assigned port (starts at 5200, skips used ports)
dev-serve up ~/projects/myapp
# → https://myapp.YOUR_DOMAIN

# Explicit port
dev-serve up ~/projects/myapp 5200

# Override dev command
DEV_CMD="bun dev" dev-serve up ~/projects/myapp 5300

# Stop and clean up
dev-serve down myapp

# List what's running
dev-serve ls
```

## Configuration

| Variable | Default | Description |
|----------|---------|-------------|
| `DEV_SERVE_DOMAIN`...

相关技能

OpenClaw

humanpages

human-pages-ai

Search and hire real humans for tasks — photography, delivery, research, and more

OpenClaw

openclaw-skills

zseven-w

Reusable skill templates for OpenClaw AI agents. Templates for API integration, data processing, web scraping, CLI tools, and file processing.

OpenClaw

0xarchive

0xfantommenace

Query historical crypto market data from 0xArchive across Hyperliquid, Lighter.xyz, and HIP-3. Covers orderbooks, trades, candles, funding rates, open interest, liquidations, and data quality. Use when the user...

OpenClaw

1sec-security

cutmob

Install, configure, and manage 1-SEC — an open-source, all-in-one cybersecurity platform (16 modules, single binary) on Linux servers and VPS instances. Use when the user asks to secure a server, install securi...