CLI deploy · Updated 2026-09-14 · Demox team
Deploy a static site from the CLI
Direct answer: The Demox CLI publishes a local folder to a public HTTPS URL. Install with npm install -g @demox-site/cli@latest. Run demox login, then demox deploy ./dist. The folder or ZIP must contain index.html at the root. You can also deploy a single HTML file, a PDF, or a Markdown file. Version 1.1.6 and later include functions, env, and alias commands for Node handlers. The npm package is @demox-site/cli. This path is for terminals and CI. MCP is the path for AI agents.
How to do it
- Step 1. npm install -g @demox-site/cli@latest
- Step 2. demox login
- Step 3. demox deploy ./dist
- Step 4. Copy the HTTPS URL from the command output.
FAQ
What does demox deploy ./dist do?
It uploads the dist folder and returns a public site URL. Use --id WEBSITE_ID to update an existing site.
Can CI use it?
Yes. Non-interactive runs can use a DEMOX_TOKEN environment variable.
用 CLI 发布静态网站
安装 @demox-site/cli,登录后执行 demox deploy ./dist。目录根必须有 index.html。也可以发单个 HTML、PDF 或 Markdown。
按这个顺序做
- 01 npm install -g @demox-site/cli@latest
- 02 demox login
- 03 demox deploy ./dist
- 04 从命令输出复制 HTTPS 地址。
常见问题
demox deploy ./dist 做什么?
上传 dist 目录并返回公开站点地址。更新已有站点时加 --id WEBSITE_ID。
CI 能用吗?
可以。非交互环境用 DEMOX_TOKEN 环境变量。