← 返回 Skills 市场
flowerwrong

one line HTTP static server

作者 浮生 · GitHub ↗ · v2026.3.10 · MIT-0
cross-platform ✓ 安全检测通过
267
总下载
0
收藏
1
当前安装
1
版本数
在 OpenClaw 中安装
/install http-static-server
功能描述
Start a local HTTP static file server in the current or specified directory using one-line commands compatible with 25+ languages and tools, auto-detecting r...
使用说明 (SKILL.md)

HTTP Static Server One-Liners

Start an ad-hoc HTTP static file server serving the current (or specified) directory. Default: http://localhost:8000

Reference: \x3Chttps://gist.github.com/willurd/5720255> Detailed per-language docs: {baseDir}/references/

When to use this skill

  • User needs to quickly serve static files (HTML/CSS/JS/images) locally
  • User asks "how do I start a local web server" or similar
  • User wants to preview a static site, share files over LAN, or test frontend assets
  • User needs a quick HTTP server for development or testing

Quick Reference Table

Language/Tool Command Dir Listing Install Needed
Python 3 python3 -m http.server 8000 Yes No
Python 2 python -m SimpleHTTPServer 8000 Yes No
Twisted twistd -n web -p 8000 --path . Yes pip install twisted
Node.js (npx) npx http-server -p 8000 Yes No
Node.js (serve) npx serve -l 8000 Yes No
node-static npx node-static -p 8000 No No
Deno deno run --allow-net --allow-read jsr:@std/http/file-server Yes No
PHP php -S 127.0.0.1:8000 No No
Ruby ruby -run -ehttpd . -p8000 Yes No
Ruby (WEBrick) ruby -rwebrick -e'WEBrick::HTTPServer.new(:Port=>8000,:DocumentRoot=>Dir.pwd).start' Yes No
Ruby (adsf) adsf -p 8000 No gem install adsf
Ruby (Sinatra) ruby -rsinatra -e'set :public_folder,".";set :port,8000' No gem install sinatra
Go go run github.com/goware/webify@latest -port 8000 . Yes No
Java 18+ jwebserver -d . -b 0.0.0.0 -p 8000 Yes No
Java (module) java -m jdk.httpserver -d . -b 0.0.0.0 -p 8000 Yes No
Rust miniserve -p 8000 . Yes cargo install miniserve
Perl (Plack) plackup -MPlack::App::Directory -e 'Plack::App::Directory->new(root=>".");' -p 8000 Yes cpan Plack
Perl (Brick) perl -MHTTP::Server::Brick -e '$s=HTTP::Server::Brick->new(port=>8000);$s->mount("/"=>{path=>"."});$s->start' Yes cpan HTTP::Server::Brick
Perl (Mojo) perl -MMojolicious::Lite -MCwd -e 'app->static->paths->[0]=getcwd;app->start' daemon -l http://*:8000 No cpan Mojolicious::Lite
Erlang erl -s inets -eval 'inets:start(httpd,[...]).' No No
Elixir elixir --no-halt -e 'Application.start(:inets);:inets.start(:httpd,...)' No No
BusyBox busybox httpd -f -p 8000 Yes No
lighttpd lighttpd -Df - \x3C\x3C\x3C ... Configurable brew install lighttpd
webfs webfsd -F -p 8000 Yes apt install webfs
Algernon algernon -x . :8000 Yes brew install algernon
Docker (Nginx) docker run --rm -v "$PWD":/usr/share/nginx/html:ro -p 8000:80 nginx Configurable Docker
Docker (PHP) docker run -it --rm -v "$PWD":/app -w /app -p 8000:8000 php:8.2-cli php -S 0.0.0.0:8000 No Docker
PowerShell (Pode) Start-PodeStaticServer -Port 8000 -FileBrowser -Address 0.0.0.0 Yes Install-Module Pode
IIS Express iisexpress.exe /path:C:\MyWeb /port:8000 No Windows

Decision guide for the agent

  1. Detect runtimes: Check which runtimes are available (python3 --version, node --version, deno --version, etc.).
  2. Default to Python 3 — pre-installed on most Linux/macOS systems.
  3. Node.js project context — prefer npx serve or npx http-server.
  4. Deno project context — use the jsr:@std/http/file-server.
  5. Minimal environment (containers, embedded) — use busybox httpd.
  6. Windows without WSL — use PowerShell (Pode) or IIS Express.
  7. Need features (upload, auth, HTTPS) — recommend miniserve (Rust) or Algernon.
  8. No runtime available — suggest Docker approach.
  9. Always confirm the desired port (default 8000) and directory (default .).
  10. For per-language details, flags, and advanced usage, see {baseDir}/references/\x3Clanguage>.md.

Common options

Need Solution
Custom port Replace 8000 with desired port in any command
Serve a specific directory Append the path or use the tool's directory flag
Bind to all interfaces (LAN) Use 0.0.0.0 as the bind address
CORS headers npx http-server --cors or add middleware
HTTPS miniserve --tls-cert/--tls-key, reverse proxy, or openssl s_server
Directory listings Python, http-server, Plack, miniserve, BusyBox support by default
File upload miniserve --upload-files
Authentication miniserve --auth user:password
Docker (no local runtime) See {baseDir}/references/docker.md

Per-language reference docs

Detailed documentation with full flags, install instructions, and advanced usage:

  • {baseDir}/references/python.md — Python 3, Python 2, Twisted
  • {baseDir}/references/nodejs.md — http-server, serve, node-static, inline
  • {baseDir}/references/deno.md — std/http file-server
  • {baseDir}/references/php.md — Built-in dev server, Docker
  • {baseDir}/references/ruby.md — ruby -run, WEBrick, adsf, Sinatra
  • {baseDir}/references/go.md — webify, inline Go
  • {baseDir}/references/rust.md — miniserve, http
  • {baseDir}/references/java.md — jwebserver, jdk.httpserver, inline
  • {baseDir}/references/perl.md — Plack, HTTP::Server::Brick, Mojolicious
  • {baseDir}/references/erlang.md — inets
  • {baseDir}/references/elixir.md — :inets, Plug
  • {baseDir}/references/busybox.md — busybox httpd
  • {baseDir}/references/docker.md — Nginx, PHP, Python, Alpine
  • {baseDir}/references/powershell.md — Pode, .NET HttpListener, IIS Express
  • {baseDir}/references/lighttpd.md — inline config, config file
  • {baseDir}/references/webfs.md — webfsd
  • {baseDir}/references/algernon.md — static mode, Lua scripting
安全使用建议
This skill is an instruction-only guide for starting local static servers and appears internally consistent. Before running any suggested command, confirm the port and directory. Be aware that several recommended one-liners will fetch or execute code from remote package registries or start containers (e.g., npx, go run, deno run, pip/cargo installs, docker run) — only run those if you trust the upstream packages. Also note bind addresses like 0.0.0.0 expose the server to your LAN; use 127.0.0.1 or bind to a specific IP if you only want local access. Prefer read-only Docker mounts when sharing files into containers and inspect any unfamiliar commands before executing.
功能分析
Type: OpenClaw Skill Name: http-static-server Version: 2026.3.10 The skill bundle is a legitimate utility designed to help an AI agent start local HTTP static file servers using standard one-line commands across various environments (Python, Node.js, Docker, etc.). The commands provided in SKILL.md and the references/ directory are well-known, industry-standard methods for ad-hoc file serving and match the stated purpose of the skill. No evidence of malicious intent, data exfiltration, or harmful prompt injection was found.
能力评估
Purpose & Capability
The name/description (one-line HTTP static server) matches the content: SKILL.md and references provide one-liner commands across many runtimes. No unrelated credentials, binaries, or install steps are requested.
Instruction Scope
The runtime instructions are focused on detecting available runtimes, choosing an option (default Python 3), and returning an exact one-liner. They do recommend commands that change networking exposure (binding to 0.0.0.0) and use package managers/remote registries (npx, go run, deno run, pip, cargo, etc.) and Docker mounts; these are expected for the task but are worth calling out because they can fetch/execute remote code or expose files to containers or the LAN.
Install Mechanism
Instruction-only skill with no install spec and no code files. The skill itself does not write or install anything. It does suggest developer tooling commands that, when executed by a user/agent, may install or run packages from registries — that is appropriate for this utility but not performed by the skill itself.
Credentials
The skill requests no environment variables or credentials. It only asks the agent to detect available runtimes (e.g., `python3 --version`) and confirm port/directory, which is proportionate to its purpose.
Persistence & Privilege
always is false and there are no install hooks or modifications to other skills or system config. Autonomous invocation is allowed (default) but this is normal for skills; no elevated persistence is requested.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install http-static-server
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /http-static-server 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v2026.3.10
- Initial release of http-static-server skill. - Instantly start a local HTTP static file server in the current directory with one-line commands for 25+ languages and tools. - Auto-detects installed runtimes and recommends the best option (Python, Node, Deno, PHP, Go, Rust, etc.). - Includes a detailed quick reference table, decision guide, and common options (custom port, CORS, HTTPS, upload/auth). - Links to per-language reference docs for usage details, install instructions, and advanced features.
元数据
Slug http-static-server
版本 2026.3.10
许可证 MIT-0
累计安装 1
当前安装数 1
历史版本数 1
常见问题

one line HTTP static server 是什么?

Start a local HTTP static file server in the current or specified directory using one-line commands compatible with 25+ languages and tools, auto-detecting r... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 267 次。

如何安装 one line HTTP static server?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install http-static-server」即可一键安装,无需额外配置。

one line HTTP static server 是免费的吗?

是的,one line HTTP static server 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

one line HTTP static server 支持哪些平台?

one line HTTP static server 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 one line HTTP static server?

由 浮生(@flowerwrong)开发并维护,当前版本 v2026.3.10。

💬 留言讨论