Create the slate
This walkthrough creates a slate owned by your personal account. To create it for an organization you belong to, check If Git has no author identity,
npx @usecontextlayer/cli init --help and select the organization before running init. The Owner is the person or organization that will manage the slate.init creates a private slate and writes a starter app using React Router, Tailwind, and shadcn into my-slate. It installs the dependencies, commits the starter on main, and sets the checkout’s Git remote to the slate’s repository.Keep the two links it prints: the dashboard link opens the slate’s management page, and the hosted URL opens the app after its first deployment.my-slate is the local directory name. ContextLayer assigns the slate’s hosted name separately; that name becomes the first label of its hosted URL.init stops and prints Git’s configuration commands. The name and email are the person’s own. Set them, then run init again.Run it locally
pnpm dev prints a local URL. Open it and create a note in the starter app. This exercises both the page and its notes database. The screen lives in app/routes/home.tsx; edit that file to start building your own app.Local database contents stay local. Deployment applies your code and migrations to hosted storage; it does not upload the notes you create during development.Give your coding agent the checkout’s AGENTS.md for authoring instructions; CLAUDE.md imports it for Claude Code. Use the checkout’s README.md for local development, connected services, databases, and deployment.Deploy
To deploy the unchanged starter, push the commit that If you edited the app, commit those changes before pushing:Pushing
init already created:main starts a build. ContextLayer builds that commit, applies its database migrations, and deploys the result. A successful push starts this work; the hosted app is ready after deployment finishes.Open the deployed slate
After deployment finishes, open the hosted URL that
init printed. The slate is private, so sign in to ContextLayer with an account allowed to view it. CLI sign-in and browser sign-in are separate steps.If a coding agent is following this guide, it should give you the hosted URL so you can open it in your browser. You now have the slate running locally and deployed privately, with separate local and hosted databases.Next steps
What a slate is
The app, agents and MCPs in a slate, and the resources they declare.
Connect an account
Use Gmail, Slack and other services from your slate.
Build an agent
Write instructions, give an agent resources, and run your first job.
Add a database
Add another database, write its migration, and query it from the app.