Claude Code builds the site; one command puts it online. Ask it to "deploy this", and it runs npx -y lobsite --yes, which finds the built folder, uploads it and prints a line meant for Claude to pass on, with the address and the link that keeps the site. No account, no login prompt, no config file to write first.
How it works
- Ask Claude Code to build and deploy. It runs your build (
npm run buildor similar), thennpx -y lobsite --yesin the project folder. - The CLI sees it's under Claude Code (from the
CLAUDECODEvariable Claude Code sets), so it never asks a question and prints plain lines with no colours or spinners. - Claude relays the last line: the live URL, when the temporary site expires, and the claim link. You open the link and sign in to keep the site; the address stays the same.
Make it the project's way to deploy
Add one line to the project's CLAUDE.md, so every session deploys the same way without being told:
Deploy with `npx -y lobsite --yes` and relay the "Tell the user:" line from the output.
The first deploy writes lobsite.toml with the site's name and folder. Commit it: the next deploy, from any session, updates the same site instead of making a new one.
A /deploy command
A custom slash command makes it one keystroke. Save this as .claude/commands/deploy.md:
Build the site, then deploy it with `npx -y lobsite --yes`.
If the build or the deploy fails, read the error's fix line and follow it.
When it succeeds, tell me the "Tell the user:" line word for word.
Then type /deploy. To let it run without asking for permission each time, allow the command in .claude/settings.json:
{ "permissions": { "allow": ["Bash(npx -y lobsite:*)"] } }
Or the MCP server
The MCP server gives Claude Code tools instead of a shell command: deploy, list_sites, list_deploys, rollback, promote and whoami.
claude mcp add lobsite -- npx -y lobsite@latest mcp
With it, "roll the site back to yesterday's deploy" works too: Claude lists the deploys and promotes the one you mean. Logging in and deleting sites aren't tools on purpose; one needs you in a browser, the other can't be undone. More on the MCP page.
No prompts under an agent, and a Tell the user: line with the URL and the claim link.
npx lobsite mcp for coding agents, lobsite.com/api/mcp for chat assistants.
Files are stored by their hash. Redeploying an unchanged site uploads 0 bytes.
Preview before going live. Roll back in one click, redirects and all.
A deploy without an account is live for 6 hours. The claim link keeps it, free.
Redirects, headers and forms live in lobsite.toml and travel with each deploy.
Deploying from Claude Code: Lobsite and GitHub Pages
| Lobsite | GitHub Pages | |
|---|---|---|
| Before the first deploy | Nothing: the site lives 6 hours until you claim it | A GitHub account, a repository and Pages turned on |
| What Claude runs | One command | Commit, push, and a Pages workflow for a build step |
| Questions on the way | None under an agent | Git may ask for credentials |
| Upload | Only the files that changed | The whole build, each time |
| Preview a deploy | --preview gives it its own URL |
Not built in |
| Custom domain | Paid plan, coming soon | Yes, free |
| Private source | Only the built files are uploaded | Pages from a private repository needs a paid GitHub plan |
If the project already lives on GitHub with a custom domain, GitHub Pages is a fine home. Lobsite fits when you want a link now, from the session you're in.
Frequently asked questions
Does Claude Code need an account to deploy?
No. Without an account the site lasts 6 hours, and Claude gives you the claim link that keeps it. To deploy into your account instead, run npx lobsite login once yourself: it opens a browser to sign in, which an agent can't do for you.
Which folder does it deploy?
The first of dist/, build/, out/, _site/ or public/ that exists, or the folder you name (npx -y lobsite --yes site/). The choice is saved in lobsite.toml.
Will it upload my .env file?
No. Secret files (.env*, private keys, .npmrc and similar) stop the deploy with an error until they're removed or listed in .lobsiteignore. Never pass --include-secrets from an agent.
Can Claude Code deploy a preview without changing the live site?
Yes: npx -y lobsite --yes --preview gives the deploy its own URL. Promote it later with npx lobsite promote <id> or the MCP's promote tool.
What does Claude see when a deploy fails?
An error that says what happened, why, and what to do, with a code that never changes. Add --json for machine-readable output; see Errors.