Deploy a site from OpenCode
Ask OpenCode to deploy your project to Layero. The agent uploads the source, waits for the build and sends you the site link.
What the agent does with Layero
Once connected, the agent handles the site the way you would in the dashboard: deploys, reads logs, rolls back.
Publishes the project folder
No Git needed. The agent uploads the source, Layero detects the framework, builds the project on servers in Russia and gives you an address on layero.app.
Works with your repository
If the project is connected to GitHub, GitVerse or GitLab, the agent deploys by pushing: any branch gives a preview, the main branch updates the live site.
Investigates failed builds
The agent reads Layero logs and diagnostics, finds the cause, fixes the code and runs the build again.
Keeps the site running
Rolls back a bad deploy, connects your domain, sets environment variables and shows visit statistics.
How to connect
Three steps. The first two you do once.
Install Layero in OpenCode
Add the configuration below to opencode.json in your project folder, keeping your other settings and MCP servers. Then run the skill installation command and select OpenCode.
{
"mcp": {
"layero": {
"type": "remote",
"url": "https://mcp.layero.ru/mcp"
}
}
}npx skills add LayeroInfra/layero-agentsSign in
Run opencode mcp auth layero and authorize Layero access in your browser. Then start a new OpenCode session in your project folder.
Never paste passwords or tokens into the chat.
Ask the agent to deploy
Open the project folder and tell the agent in plain words, for example:
Deploy this project to Layero and send me the site link.
When the build finishes, the agent sends you the site address. Deploying again updates the same site.
What else you can ask
Once the site is on Layero, the agent keeps working with it on request.
Why did the last Layero build fail? Find the cause and fix it.
Roll the site back to the previous version.
Connect example.ru to the site and tell me which DNS records to add.
How many people visited the site this week?
Try a ready-made example
No project at hand? Download a single-page HTML example and publish it from the agent’s terminal or your own.
mkdir layero-demo && cd layero-demo
curl -fsS https://layero.ru/examples/agent-deploy/index.html -o index.html
npx layero@latest deployOn the first run the command asks you to sign in through the browser and prints the site address at the end. Here is the result:
What you can publish
Supported
- Static sites and SPAs: HTML, Vite, React, Astro
- Next.js and Nuxt with server-side rendering
- Node.js and Python servers, Streamlit, Gradio
- Monorepos: tell the agent which app folder to use
Good to know
- On the free plan the site lives on a
layero.appsubdomain and is not indexed by search engines - A custom domain and indexing come with Pro, 990 ₽/month, first 14 days free
- Without an account the agent can publish a static site for one hour only
- Secrets go into project settings, not into site files
FAQ
Do I need a Git repository?
How much does it cost?
Can I work without MCP?
npx layero@latest deploy. MCP provides platform tools for logs, domains, diagnostics and settings.Other agents and docs
Publish your site from OpenCode in a couple of minutes
Free plan available. Servers in Russia, payment in rubles.