Introduction
nanobase is an ultra-lightweight, single-binary, Supabase-compatible backend engineered in Rust. It compresses the functionality of the official 12-container Supabase Docker stack into a single, high-performance process with near-instant cold-starts.
It is designed specifically for autonomous coding agents (Claude Code, Cursor, Codex) and scale-to-zero multi-tenant cloud hosting on platforms like Fly.io.
Installation & CLI
Install nanobase with the one-line installer:
curl -fsSL https://nanobase.dev/install.sh | bash
Verify the installation:
nanobase --version
nanobase keys
Project Quickstart & Lifecycle
Initialize nanobase inside any fresh or existing project directory:
cd my-app
nanobase init
This creates nanobase.yaml and .env.local with pre-configured keys and prints the Admin Studio token.
Mode 1: Unified App & Backend Lifecycle (nanobase dev)
Run both your application and the backend together with auto-injected Supabase environment variables and unified teardown:
# Run alongside Next.js, Node, Vite, etc.
nanobase dev -- npm start
# Or in package.json: "dev": "nanobase dev -- next dev"
Mode 2: Standalone Terminal Lifecycle (nanobase start)
Run the backend and Web Studio in a dedicated terminal:
nanobase start
Open http://localhost:54321/_/ (or over Tailscale LAN at http://mini:54321/_/) to access Web Studio.
Multi-Project Discovery (nanobase projects)
Discover and check status of all nanobase workspaces across your machine:
nanobase projects
PostgREST REST API (`/rest/v1/*`)
nanobase implements the PostgREST URL query grammar. Connect with @supabase/supabase-js:
import { createClient } from '@supabase/supabase-js'
const supabase = createClient('http://localhost:54321', 'ANON_KEY')
// Query with filters, embedded joins, and ordering
const { data, error } = await supabase
.from('todos')
.select('*, author:users(name)')
.eq('done', false)
.order('created_at', { ascending: false })
GoTrue Authentication (`/auth/v1/*`)
Complete authentication lifecycle backed by Argon2id password hashing and HS256 JWT tokens:
// Sign up
const { data, error } = await supabase.auth.signUp({
email: 'dev@nanobase.dev',
password: 'SuperSecretPassword123!'
})
// Sign in
const { data: session } = await supabase.auth.signInWithPassword({
email: 'dev@nanobase.dev',
password: 'SuperSecretPassword123!'
})
Realtime CDC Hub (`/realtime/v1/*`)
Subscribe to database mutations over Phoenix WebSockets in real time:
supabase
.channel('public:todos')
.on('postgres_changes', { event: '*', schema: 'public', table: 'todos' }, (payload) => {
console.log('Change received:', payload)
})
.subscribe()
Model Context Protocol (MCP) for Agents
nanobase includes an embedded MCP server exposing 26 tools. Connect Claude Code, Cursor, or Codex by adding to your MCP configuration:
{
"mcpServers": {
"nanobase": {
"command": "nanobase",
"args": ["mcp"]
}
}
}