shovelbasedocs

Quick start

From zero to a working app backend. Start by connecting your AI client — after that it can do the rest of this page for you. Steps 2–4 are the same work by hand, and worth skimming either way: they're what the assistant is actually doing.

1. Connect your AI client

Create a project in the portal — New project on the dashboard, about a minute to provision — then open its Settings → API tab and create an MCP access token. The token is shown once, with the connect snippet ready to paste:

terminal
claude mcp add --transport http shovelbase-my-app \
https://shovelbase.com/api/mcp/my-app \
--header "Authorization: Bearer sb_mcp_..."

That's the setup. Your assistant can now run migrations, deploy functions, set secrets, create buckets and queues, publish websites and read logs — and these docs come down the same connection, so it follows the platform's patterns instead of guessing at them. Ask it for the todos table below and it will write the policy too. MCP has the full tool catalogue and what a token can't reach.

Creating the project is the one step a token can't do for you: tokens are scoped to a single project, so an agent can never reach — or create — another one.

2. Install the CLI and log in

For working by hand, and for CI.

terminal
# version-pinned tarball, served from shovelbase.com (not the npm registry)
npm install -g https://shovelbase.com/cli/shovelbase-0.3.0.tgz
shovelbase user login --url https://shovelbase.com
# Sign in with your organization's admin account
# the CLI can create projects too — an MCP token can't
shovelbase projects create my-app
shovelbase projects keys my-app
# SHOVELBASE_URL=https://my-app.shovelbase.com
# SHOVELBASE_ANON_KEY=eyJhbGciOi…
# SHOVELBASE_SERVICE_ROLE_KEY=eyJhbGciOi…

3. Define your schema

terminal
cd ~/code/my-app
shovelbase link --project my-app # writes shovelbase.json
shovelbase migration create create_todos # creates shovelbase/migrations/<ts>_create_todos.sql
shovelbase/migrations/20260706120000_create_todos.sql
create table public.todos (
id bigint generated always as identity primary key,
title text not null,
done boolean not null default false,
user_id uuid not null default auth.uid(),
created_at timestamptz not null default now()
);
alter table public.todos enable row level security;
create policy "own rows" on public.todos
for all to authenticated
using (user_id = auth.uid()) with check (user_id = auth.uid());
terminal
shovelbase db push

4. Talk to it from your app

terminal
# version-pinned tarball, served from shovelbase.com (not the npm registry)
npm install https://shovelbase.com/js/shovelbase-js-0.3.0.tgz
app.js
import { createClient } from 'shovelbase-js';
const shovelbase = createClient(
process.env.SHOVELBASE_URL, // https://my-app.shovelbase.com
process.env.SHOVELBASE_ANON_KEY,
);
await shovelbase.auth.signUp({ email: 'me@example.com', password: 'secret123' });
await shovelbase.from('todos').insert({ title: 'ship it' });
const { data } = await shovelbase.from('todos').select('*');

shovelbase.json and shovelbase/migrations/ reappear throughout these docs — see CLI reference and Migrations.