pagehaus

Guides

Publish a website from Cursor, Claude Code or Codex

A coding agent such as Cursor, Windsurf, Claude Code or Codex can build a whole website in a folder on your computer. The last step, putting it online, can be the agent's job too. Set it up once, and "publish it" becomes one more thing you ask for.

First: is it plain files, or a project to build?

Option 1: the pagehaus command (the simplest)

  1. Create a free Pagehaus site and install the pagehaus tool.
  2. Run pagehaus login once and paste a token from Account → API.
  3. Tell the agent how to publish. Put this in the project's AGENTS.md (or CLAUDE.md, or Cursor's rules) so it remembers:
    The website is in site/. Before publishing, run: pagehaus check site
    To publish, run: pagehaus deploy site --site yoursite
    It's live at https://yoursite.pagehaus.site/

Now "publish the site" works. pagehaus check catches broken links, missing images and names in the wrong case before anything goes up, and pagehaus serve previews the site on your computer exactly as it will be online.

Option 2: connect the agent to Pagehaus

Agents that support MCP (Claude Code, Codex, Cursor, VS Code) can work on your site directly: write pages, check the site for problems, read your form messages and write blog posts. The setup for each is in connect an AI assistant. For Claude Code it's one line:

claude mcp add --transport http pagehaus https://pagehaus.app/mcp

Option 3: its own SFTP login

For agents that prefer to copy files, give them an SFTP login and key of their own that you can switch off at any time: let an AI agent manage your site.

Publishing from GitHub

If the project is on GitHub, the Deploy to Pagehaus action publishes the site on every push, so the agent only commits. See the pagehaus tool.

Staying in control

Something broken once it's online? See why an AI-made website works on your computer but not online.