Deploy from your AI agent
Deploy a site from Claude Code with Layero
Claude Code has written your site. Publish the project folder on Layero: the plugin adds a skill and MCP tools, while the CLI uploads source code for a remote build. No Git repository is required.
Connect Layero Try the example1. Connect the platform
Run these commands in your terminal to add the Layero marketplace and install the layero plugin. Then start a new Claude Code session in your project folder. The plugin combines platform instructions and the MCP connection.
claude plugin marketplace add LayeroInfra/layero-agents && claude plugin install layero@layeroIn the new session, ask Claude Code to find the Layero instructions and search its documentation. Search works without signing in. For account operations, complete the Layero sign-in offered by the client. Do not paste passwords or tokens into the conversation.
The Layero CLI needs Node.js 20 or newer and npm access. Model access, subscriptions and client availability are governed by the client provider and are not included in Layero plans.
2. Give the agent a task
Open the app root. In a monorepo, identify the app folder first. For a repository already connected to Layero, use the Git deployment workflow. Example request for a new project:
Inspect this project folder and the Layero instructions. Show the deploy --dry-run --json plan. If this is a new project, publish it with the Layero CLI and check the URL from ready. If it is already linked to a live site, explain what the deploy will replace first. Do not create a Git repository just to publish.3. Try a minimal example
Download a single HTML file and publish it from a new folder. No dependencies, build tool or layero.json file are required. The commands use Bash/zsh; on Windows, use WSL or Git Bash. Run them in the agent terminal or your own shell.
mkdir layero-agent-demo
cd layero-agent-demo
curl -fsS https://layero.ru/examples/agent-deploy/index.html -o index.html
npx layero@latest deploy --dry-run --json
npx layero@latest deploy --jsonThe dry-run plan uploads nothing. When sign-in is needed, the CLI emits auth_required: open its URL and authorize access. Wait for ready and open its URL rather than constructing an address from the project name.
Download the HTML example · Open the deployed resultChecked on October 25, 2026: CLI 0.11.10 detected static, completed a real deployment and returned ready. The published site responds with HTTP 200 and contains Hello from Layero. This validates the CLI workflow, not model performance or a deployment-time guarantee.
Deploying your own app
For Vite, Next.js, Astro, Node.js or Python, run the CLI from the source folder. Layero detects the project and builds it remotely. If dry-run returns confident: false, follow next_action: you may need a different folder or a layero.json setting.
MCP publish_site uploads prebuilt static files with index.html. Use the CLI for server apps or projects that still need a build. Update a connected Git repository by pushing to the appropriate branch.
Next.js support and limits · CLI for agentsLimits to check before publishing
| Repeat deployments | A direct CLI upload replaces the live CLI project. For an isolated preview, connect a repository and push a separate branch. Archive uploads do not support --branch. |
|---|---|
| Without an account | Explicit --claim only: a static site or SPA for one hour, with a random address and indexing disabled. SSR and server apps need an account. Give the person ready.url and claim_url. |
| Search and domains | Free does not include search indexing. A permanent indexed site and custom domain require Pro; enable indexing separately in project settings. |
| Secrets and permissions | Keep tokens and secret .env files out of published files. Set project environment variables separately and store LAYERO_TOKEN as a CI secret. The agent remains subject to client and Layero account permissions. |
Troubleshooting
If Claude Code cannot find Layero, check that the plugin is installed and start a new session. If the environment blocks terminal commands, approve the required action in the client or run the CLI yourself. Installing the plugin does not bypass access controls.
npx layero@latest diagnose
npx layero@latest logs --runtimeCheck whether the failure happened during dependency installation, build or launch. Read diagnose first; runtime logs help with launch failures. A command that ended without ready has not confirmed a successful publication.
CLI events and error codes