<!-- CLI Static Site Deploy: demox deploy ./dist | Demox -->
Source: https://www.demox.site/cli-static-site-deploy

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

1. **Step 1.** npm install -g @demox-site/cli@latest
2. **Step 2.** demox login
3. **Step 3.** demox deploy ./dist
4. **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。

### 按这个顺序做

1. **01** npm install -g @demox-site/cli@latest
2. **02** demox login
3. **03** demox deploy ./dist
4. **04** 从命令输出复制 HTTPS 地址。

### 常见问题

### demox deploy ./dist 做什么？

上传 dist 目录并返回公开站点地址。更新已有站点时加 --id WEBSITE_ID。

### CI 能用吗？

可以。非交互环境用 DEMOX_TOKEN 环境变量。

## Related Demox pages

- [Free static website hosting with CLI and MCP](https://www.demox.site/free-static-site-hosting)
- [Deploy AI-generated websites in seconds](https://www.demox.site/ai-website-deployment)
- [Deploy a website from MCP](https://www.demox.site/mcp-website-deployment)
- [You have an AI-generated page. How do you publish it?](https://www.demox.site/deploy-ai-generated-website)
- [Deploy a website from Claude Code](https://www.demox.site/claude-code-deploy-website)
- [Deploy a website from Cursor](https://www.demox.site/cursor-deploy-website)
- [CLI and MCP docs](https://www.demox.site/doc)
- [When to use Demox](https://www.demox.site/when-to-use-demox)

[Upload and publish](https://www.demox.site/console/projects) · [Read the docs](https://www.demox.site/doc)
