Skip to content

deploy

Deploy an HTML file or inline HTML to a live URL.

bash
npx based-page deploy [options]

Options

FlagDescription
--html <string>Inline HTML content to deploy
--file <path>Path to an HTML file to deploy
--slug <name>URL slug - becomes {slug}.based.page. Generated if omitted.
--title <title>Page title (browser tab, search results, OG preview)
--description <text>Meta description (search results, OG preview)
--favicon <emoji>Favicon emoji. Defaults to .
--spaEnable SPA routing - 404s fall back to index.html
--protectMake the page private. Returns a share_url.
--password <pass>Add a password gate for visitors without the share link

Either --html or --file is required.

Examples

Deploy an HTML file

bash
npx based-page deploy --file index.html --slug my-site --title "My Site"

Deploy inline HTML

bash
npx based-page deploy --html '<h1>Hello World</h1>' --slug hello --title "Hello"

Deploy with full metadata

bash
npx based-page deploy \
  --file index.html \
  --slug my-app \
  --title "My App" \
  --description "The best app in the world" \
  --favicon "🚀"

Deploy a React SPA

bash
npx based-page deploy --file dist/index.html --slug my-spa --spa

Deploy a private page

bash
npx based-page deploy --file report.html --slug q1-report --protect --password secret123

Returns a share_url - send it to recipients for automatic access.

Output

Deployed successfully!

URL: https://my-site.based.page
ID:  dep_abc123

Slug Rules

  • Lowercase letters, numbers, and hyphens only
  • Must be unique across all deployments
  • If the slug is taken, the deploy fails with a conflict error
  • Omit --slug to get an auto-generated slug like bright-forest-x7k2.based.page

Notes

  • Metadata (title, description, favicon, OG tags) is injected into the HTML automatically - you don't need to add <meta> tags yourself.
  • Multi-file deploys (separate CSS, JS, images) are only supported via the MCP tool. Use the deploy MCP tool for those.
  • No build step - HTML is served as-is. Link to Tailwind, Alpine.js, or any other library via CDN.

Deploy apps from conversation.