> ## Documentation Index
> Fetch the complete documentation index at: https://docs.usecontextlayer.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Quickstart

> Create a slate, run it locally, push it, and open the deployed slate.

Create a private slate, run its starter app locally, and deploy it to a hosted URL. Before you start, finish [Installation](https://docs.usecontextlayer.com/installation.md) so the required tools are available and the CLI is signed in.

A person supplies the Git identity, chooses the slate's Owner, and signs in to view the private deployment. If a coding agent is following this guide, it should leave those choices and approvals to you.

## 1. Create the slate

This walkthrough creates a slate owned by your personal account. To create it for an organization you belong to, check `npx @usecontextlayer/cli init --help` and select the organization before running `init`. The Owner is the person or organization that will manage the slate.

```sh theme={null}
npx @usecontextlayer/cli init my-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.

> [!NOTE]
>
> `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.

If Git has no author identity, `init` stops and prints Git's configuration commands. The name and email are the person's own. Set them, then run `init` again.

## 2. Run it locally

```sh theme={null}
cd my-slate
pnpm dev
```

`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.

## 3. Deploy

To deploy the unchanged starter, push the commit that `init` already created:

```sh theme={null}
git push -u origin main
```

If you edited the app, commit those changes before pushing:

```sh theme={null}
git add .
git commit
git push -u origin main
```

Pushing `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.

## 4. 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](https://docs.usecontextlayer.com/core-concepts/slate)**
>
> The app, agents and MCPs in a slate, and the resources they declare.

> **[Connect an account](https://docs.usecontextlayer.com/how-to/connect-an-account.md)**
>
> Use Gmail, Slack and other services from your slate.

> **[Build an agent](https://docs.usecontextlayer.com/how-to/build-an-agent.md)**
>
> Write instructions, give an agent resources, and run your first job.

> **[Add a database](https://docs.usecontextlayer.com/how-to/add-a-database.md)**
>
> Add another database, write its migration, and query it from the app.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.