Skip to Content
CLI — Develop locally

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@next

Then run commands directly:

bool link --project <id>

Note: The CLI currently ships on the next channel, so the @next tag is required until the first stable release. Once bool-sdk publishes a stable version, plain npm install -g bool-sdk will 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

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 types

Updates 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/entities

Schema 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 deploy

What it does:

  1. Zips your source code and schemas
  2. Uploads to Bool
  3. 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_xxxxx

Environment Variables

BOOL_TOKEN

Personal access token for CLI authentication.

export BOOL_TOKEN=bool_live_xxxxx

Get it from Bool → SettingsAccess 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 deploy

Troubleshooting

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@next

If 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_xxxxx

Get 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 types

Learn More

Last updated on