Skip to main content
Deploy a slate by pushing its main branch to the ContextLayer Git remote. ContextLayer builds that commit, applies its database migrations, publishes the app and MCP tools, and installs its agent schedules. Work from the slate checkout created by init, which has origin set to the slate’s repository. You need the saved CLI login configured during Installation and permission to manage the slate. There is no separate deploy command.
1

Check the local changes

If you changed the app, run the checkout’s type check and production build:
Include any declarations, migrations, and generated database types that the code needs. Local success does not configure hosted accounts or copy local data; those are separate from the deployment.
2

Commit your changes

init already committed the starter on main. If you have not changed it, continue directly to the push. Otherwise, commit the files you want to deploy:
3

Push main

Git authenticates the push with your saved CLI login. Only the slate’s owning user or a member of its owning organization can push. Only a push to main starts a build; other branches do not deploy the slate.A successful push means the repository received the commit. The hosted app changes after the build, migrations, and publication succeed.
4

Open the hosted URL

After deployment succeeds, open the hosted URL printed by init. Its dashboard link is the management page; the hosted URL is the running app.New slates are private. Sign in with an account allowed to view the slate: its owning user or a member of its owning organization. If a coding agent is deploying for you, it should give you the hosted URL so you can open it in your browser.Check the behavior you changed in the hosted app. Configure any newly declared hosted connections or viewer secrets through the chrome when prompted.

What the pipeline does

The pipeline takes its source code, declarations, migrations, and schedules from the pushed commit, in this order:
  1. Prepare. ContextLayer reads the commit’s declarations and selects the databases to migrate.
  2. Build. An isolated sandbox installs the committed dependencies and runs pnpm build.
  3. Migrate. The commit’s Kysely migrations run against the slate’s owner-mode databases and every existing member’s viewer-mode databases.
  4. Deploy. The built app is published to the slate’s hosted URL.
  5. Schedules. The schedules of the slate’s agents are installed from the same commit.
A failed migration stops the pipeline: the commit is not deployed and its schedules are not installed. The migration is not retried automatically, and SQL statements that ran before the failure can remain applied.
Migrations run while the previous deployment is still serving, so keep them compatible with that version until the new deployment completes. See Add a database.

Configure hosted resources separately

Git carries committed source, declarations, migrations, and generated query types. It does not carry the local resources those files used during development: See Connect an account and Secrets for hosted configuration.

The hosted URL

The hosted URL is https://<name>.contextlayer.xyz/. <name> is the slate’s name, which ContextLayer chose when it created the slate. On the hosted slate, the chrome appears above the app: the ContextLayer header that shows who is signed in and what the slate still needs to be set up. See Use a slate.