Bool CLI — Develop Locally
Develop your app on your machine and publish to Bool hosting using the command-line interface.
Installation
Install once, globally, to get the bool command on your PATH:
npm install -g bool-sdk@nextThen run commands directly:
bool link --project <id>Note: The CLI currently ships on the
nextchannel, so the@nexttag is required until the first stable release. Oncebool-sdkpublishes a stable version, plainnpm install -g bool-sdkwill pick up the CLI too.
Prefer not to install globally? Add bool-sdk as a dev dependency and prefix
every command with npx (npx bool link --project <id>). The rest of this page
uses the global bool form.
Commands
bool link --project <id>
Connect your local app to a Bool project.
export BOOL_TOKEN=bool_live_xxxxx # from Bool → Settings → Access tokens
bool link --project <id>Creates:
bool.config.json— project configuration (commit this).env.bool— admin key (add to .gitignore)bool/types.d.ts— TypeScript types for your schema
Next steps:
import { createBoolClient } from "bool-sdk";
import config from "./bool.config.json";
export const bool = createBoolClient({
supabaseUrl: config.supabaseUrl,
supabaseAnonKey: config.supabaseAnonKey,
schema: config.schema,
appOrigin: config.appOrigin,
slug: config.slug,
apiKey: process.env.BOOL_API_KEY, // from .env.bool
});bool types
Refresh TypeScript types after schema changes.
bool typesUpdates bool/types.d.ts to match your latest schema.
bool entities
Manage your data model.
# List all entities
bool entities
# Pull schemas from Bool to local files
bool entities pull
# Push local schema changes to Bool
bool entities push --dir bool/entitiesSchema files live in bool/entities/ as JSON Schema:
{
"type": "object",
"properties": {
"id": { "type": "string" },
"title": { "type": "string" },
"user_id": { "type": "string" },
"done": { "type": "boolean" }
},
"required": ["id", "title", "user_id", "done"],
"x-private": true
}bool deploy
Publish your app to https://<slug>.bool.so.
bool deployWhat it does:
- Zips your source code and schemas
- Uploads to Bool
- Publishes live
Size limit: 65 KB compressed (includes source + schemas + config).
Options:
# Deploy from a subdirectory
bool deploy --dir ./apps/my-app
# Use explicit token (instead of BOOL_TOKEN env var)
bool deploy --token bool_live_xxxxxEnvironment Variables
BOOL_TOKEN
Personal access token for CLI authentication.
export BOOL_TOKEN=bool_live_xxxxxGet it from Bool → Settings → Access tokens.
BOOL_API_KEY
Admin data key (in .env.bool after linking). Use in development only.
// In your app
const bool = createBoolClient({
// ...
apiKey: process.env.BOOL_API_KEY,
});Never ship this in client code. End-users authenticate via Bool Auth instead.
Local Development Workflow
# 1. Link your project
bool link --project <id>
# 2. Define your schema
echo '{...}' > bool/entities/tasks.json
# 3. Push to Bool
bool entities push --dir bool/entities
# 4. Develop locally
npm run dev
# 5. Deploy when ready
bool deployTroubleshooting
command not found: bool
The global install didn’t land on your PATH. Make sure you installed with the
-g flag and the @next tag:
npm install -g bool-sdk@nextIf it still isn’t found, your npm global bin directory may not be on PATH —
check npm bin -g and add that directory to your shell profile. Or skip the
global install and prefix commands with npx (npx bool <command>).
”No access token”
export BOOL_TOKEN=bool_live_xxxxxGet your token from Bool → Settings → Access tokens.
”Project not found”
- Check the project ID (copy from Bool editor)
- Verify you own the project or have access
- Run
bool link --project <id>again
”Zip too large”
Your app is over 65 KB. Options:
- Remove unused dependencies
- Use code splitting / dynamic imports
- Move large assets to a CDN
- Simplify your schema (combine tables, shorter field names)
Types not updating
bool typesLearn More
- Publishing — how deploys go live and control who can see your app
- Database — entities, records, and your data model
- Connect your AI (MCP) — give coding agents the same CLI powers