Skip to main content
This page is part of an AI coding agent skill and is written for agents, not humans. For the human-readable Base44 docs, see the developer documentation.

Base44 CLI

Create and manage Base44 apps (projects) using the Base44 CLI tool.

⚡ IMMEDIATE ACTION REQUIRED - Read This First

This skill activates on ANY mention of “base44” or when a base44/ folder exists. DO NOT read documentation files or search the web before acting. Your first action MUST be:
  1. Check if base44/config.jsonc exists in the current directory
  2. If YES (existing project scenario):
    • Transfer to base44-sdk skill for implementation
    • This skill only handles CLI commands (login, deploy, entities push)
  3. If NO, decide between two initialization paths:
    • Provisioned app — the Base44 app already exists because it was just provisioned through a Stripe Projects / projects.dev flow, OR BASE44_APP_ID (or BASE44_PROJECTS_BASE44_APP_ID) is present in the environment or a .env/.env.local file:
      • Run npx base44 scaffold to set up local files for that existing app
      • DO NOT run npx base44 create — that creates a second, duplicate app. See scaffold.md.
    • New project — no app exists yet and none was provisioned:
      • This skill (base44-cli) handles the request; guide the user through npx base44 create
      • Do NOT activate base44-sdk yet

Critical: Local Installation Only

NEVER call base44 directly. The CLI is installed locally as a dev dependency and must be accessed via a package manager:
  • npx base44 <command> (npm - recommended)
  • yarn base44 <command> (yarn)
  • pnpm base44 <command> (pnpm)
WRONG: base44 login RIGHT: npx base44 login

MANDATORY: Authentication Check at Session Start

CRITICAL: At the very start of every AI session when this skill is activated, you MUST:
  1. Check authentication status by running:
  2. If the user is logged in (command succeeds and shows an email):
    • Continue with the requested task
  3. If the user is NOT logged in (command fails or shows an error):
    • STOP immediately
    • DO NOT proceed with any CLI operations
    • Ask the user to login manually by running:
This check is mandatory and must happen before executing any other Base44 CLI commands. Provisioned via Stripe Projects / projects.dev? When the app was provisioned through that flow, the CLI seeds authentication from the BASE44_ACCESS_TOKEN / BASE44_REFRESH_TOKEN environment variables it injects (the BASE44_PROJECTS_*-prefixed names are normalized automatically). In that case npx base44 whoami already succeeds and you do not need an interactive npx base44 login. Workspace API key set? If the BASE44_API_KEY environment variable is set to a workspace API key (prefixed b44k_), the CLI authenticates with it directly — npx base44 whoami and other commands succeed without an interactive login.

Overview

The Base44 CLI provides command-line tools for authentication, creating projects, managing entities, and deploying Base44 applications. It is framework-agnostic and works with popular frontend frameworks like Vite, Next.js, and Create React App, Svelte, Vue, and more.

When to Use This Skill vs base44-sdk

Use base44-cli when:
  • Creating a NEW Base44 project from scratch
  • Initializing a project in an empty directory
  • Setting up local files for an existing app that was provisioned externally (e.g., through a Stripe Projects / projects.dev flow) → use scaffold
  • Directory is missing base44/config.jsonc
  • User mentions: “create a new project”, “initialize project”, “setup a project”, “start a new Base44 app”
  • Deploying, pushing entities, or authenticating via CLI
  • Working with CLI commands (npx base44 ...)
Use base44-sdk when:
  • Building features in an EXISTING Base44 project
  • base44/config.jsonc already exists
  • Writing JavaScript/TypeScript code using Base44 SDK
  • Implementing functionality, components, or features
  • User mentions: “implement”, “build a feature”, “add functionality”, “write code”
Skill Dependencies:
  • base44-cli is a prerequisite for base44-sdk in new projects
  • If user wants to “create an app” and no Base44 project exists, use base44-cli first
  • base44-sdk assumes a Base44 project is already initialized
State Check Logic: Before selecting a skill, check:
  • IF (user mentions “create/build app” OR “make a project”):
    • IF (base44/config.jsonc exists): → Use base44-sdk (project exists, build features)
    • ELSE IF (app was provisioned externally — BASE44_APP_ID/BASE44_PROJECTS_BASE44_APP_ID set, or a Stripe Projects / projects.dev flow just ran): → Use base44-clinpx base44 scaffold (set up local files for the existing app; do NOT create)
    • ELSE: → Use base44-clinpx base44 create (new project initialization needed)

Project Structure

A Base44 project combines a standard frontend project with a base44/ configuration folder:
Key files:
  • base44/config.jsonc - Project name, description, site build settings
  • base44/entities/*.jsonc - Data model schemas (see Entity Schema section)
  • base44/functions/*/entry.ts - Backend function entry point
  • base44/agents/*.jsonc - Agent configurations (optional)
  • base44/agent-skills/*.md - Agent skill instructions (optional)
  • base44/.types/types.d.ts - Auto-generated TypeScript types for entities, functions, and agents (created by npx base44 types generate)
  • base44/connectors/*.jsonc - OAuth connector configurations (optional)
  • src/api/base44Client.js - Pre-configured SDK client for frontend use
config.jsonc example:
Config properties:

Installation

Install the Base44 CLI as a dev dependency in your project:
Important: Never assume or hardcode the base44 package version. Always install without a version specifier to get the latest version. Then run commands using npx:
Note: All commands in this documentation use npx base44. You can also use yarn base44, or pnpm base44 if preferred.

Global --app-id Option

The CLI has a global --app-id <id> option for commands that only need an app context, not local project files. Resolution order: --app-id flag → BASE44_APP_ID environment variable → local base44/.app.jsonc This is useful when you want to inspect or operate on an app without switching into a linked project directory. Common examples:
Use --app-id for app-scoped commands like exec and logs. Do not use --app-id for commands that need local project files:
  • base44 create creates a new app, so it rejects --app-id
  • base44 dev runs from a linked local project, so it rejects --app-id
  • base44 deploy still requires a local project directory because it reads local resources

Global --json Option

The CLI has a global --json option that makes commands emit a machine-readable JSON document on stdout instead of human-oriented output. It also forces non-interactive mode (spinners/status messages/logs move to stderr), so stdout stays pure JSON — safe to pipe into jq or another program.

Available Commands

Authentication

Project Management

Workspace Management

Workspaces (a.k.a. organizations) group apps under shared membership. By default base44 create/base44 link --create use your personal workspace; pass -w, --workspace <id> to target another one.

Development

Deployment

Entity Management

Entity Schema (Quick Reference)

ALWAYS follow this exact structure when creating entity files: File naming: base44/entities/{kebab-case-name}.jsonc (e.g., team-member.jsonc for TeamMember) Schema template:
Field types: string, number, integer, boolean, array, object, binary String formats: date, date-time, time, email, uri, hostname, ipv4, ipv6, uuid, file, regex, richtext For enums: Add "enum": ["value1", "value2"] and optionally "default": "value1" Entity names: Must be alphanumeric only (pattern: /^[a-zA-Z0-9]+$/) For complete documentation, see entities-create.md.

Function Management

Agent Management

Agents are conversational AI assistants that can interact with users, access your app’s entities, and call backend functions. Use these commands to manage agent configurations. Note: Agent commands perform full synchronization - pushing replaces all remote agents with local ones, and pulling replaces all local agents with remote ones.

Agent Schema (Quick Reference)

File naming: base44/agents/{agent_name}.jsonc (e.g., support_agent.jsonc) Schema template:
Naming rules:
  • Agent names must match pattern: /^[a-z0-9_]+$/ (lowercase alphanumeric with underscores, 1-100 chars)
  • Valid: support_agent, order_bot
  • Invalid: Support-Agent, OrderBot
Required fields: name, description, instructions Optional fields: tool_configs (defaults to []), memory_config, whatsapp_greeting Tool config types:
  • Entity tools: entity_name + allowed_operations (array of: read, create, update, delete)
  • Backend function tools: function_name + description
Memory config fields (all optional, see agents-push.md for details): enabled (bool, default true), scope (global|user|both, default both), include_other_conversation_context (bool, default false), instructions (string|null, default null)

Agent Skills Management

Agent skills are reusable Markdown instructions that extend what your app’s AI agents know how to do. Use these commands to manage them. Note: Agent skill commands perform full synchronization - pushing replaces all remote skills with local ones, and pulling replaces all local skills with remote ones.

Agent Skill Schema (Quick Reference)

File naming: base44/agent-skills/{skill-name}.md (e.g., pdf-export.md) Schema template:
Naming rules: Skill names (the file name minus .md) must match pattern /^[a-z0-9]+(-[a-z0-9]+)*$/ (lowercase, hyphen-separated, 1-64 chars)
  • Valid: pdf-export, order-lookup
  • Invalid: PdfExport, pdf_export
Required fields: description (frontmatter, 1-1024 chars), body (Markdown content, 1-15000 chars) For complete documentation, see agent-skills-push.md.

Connector Management

Connectors let your app connect to external services (Google Calendar, Slack, Stripe, etc.). Most connectors use OAuth to provide access tokens for backend functions to call external APIs. Stripe is the exception — it is provisioned automatically on the server side with no OAuth browser flow. Note: Connector commands perform full synchronization - pushing replaces all remote connectors with local ones (and triggers OAuth for new OAuth connectors), and pulling replaces all local connectors with remote ones.

Connector Schema (Quick Reference)

File naming: base44/connectors/{type}.jsonc (e.g., googlecalendar.jsonc, slack.jsonc) Schema template:
Required fields: type Optional fields: scopes (defaults to []) Available connector types: Run npx base44 connectors list-available to see all supported integration types. Note: stripe is also a valid connector type but is not returned by list-available. Treat it as a supported type — it is provisioned automatically by Base44 with no OAuth browser flow. See connectors-create.md for details. For complete documentation, see connectors-create.md.

Auth Configuration

Manage your app’s authentication settings (e.g., username & password login). Auth config is stored in base44/auth/ and synced with Base44 via auth push/auth pull. Note: Auth config is also deployed as part of base44 deploy.

Secrets Management

Manage project secrets (environment variables stored securely in Base44). These commands are hidden from --help output but are fully functional.

Script Execution

Run one-off scripts against your app with the Base44 SDK pre-authenticated. Use it to perform CRUD operations on entities (base44.entities.MyEntity.list/create/update/delete), call backend functions (base44.functions.invoke("myFunction", args)), invoke agents, or access any other resource exposed by the SDK — without deploying a full function. Useful for data migrations, bulk operations, debugging, and scripted workflows.

Type Generation

Output: base44/.types/types.d.ts — augments @base44/sdk module with typed registries (EntityTypeRegistry, FunctionNameRegistry, AgentNameRegistry, ConnectorTypeRegistry). No authentication required. Runs entirely locally. Automatically updates tsconfig.json to include the generated types.

Site Management

SPA only: Base44 hosting supports Single Page Applications with a single index.html entry point. All routes are served from index.html (client-side routing).

Quick Start

  1. Install the CLI in your project:
  2. Authenticate with Base44:
  3. Create a new project (ALWAYS provide name and --path flag):
  4. Run local development:
  5. Build and deploy everything:
Or deploy individual resources:
  • npx base44 entities push - Push entities only
  • npx base44 functions deploy - Deploy functions only
  • npx base44 functions delete <name> - Delete a deployed function
  • npx base44 functions list - List all deployed functions
  • npx base44 functions pull - Pull deployed functions to local files
  • npx base44 agents push - Push agents only
  • npx base44 agent-skills push - Push agent skills only
  • npx base44 connectors pull - Pull connectors from Base44
  • npx base44 connectors push - Push connectors only
  • npx base44 auth pull - Pull auth config from Base44
  • npx base44 auth push - Push auth config only
  • npx base44 site deploy -y - Deploy site only

Common Workflows

Creating a New Project

⚠️ MANDATORY: Before running base44 create, you MUST read create.md for:
  • Template selection - Choose the correct template (backend-and-client vs backend-only)
  • Correct workflow - Different templates require different setup steps
  • Common pitfalls - Avoid folder creation errors that cause failures
Failure to follow the create.md instructions will result in broken project scaffolding.

Linking an Existing Project

Running Local Development

If you want base44 dev to run your frontend too, verify base44/config.jsonc has site.serveCommand set correctly (for example, "serveCommand": "npm run dev"). When that field is present, base44 dev runs both the backend and the frontend together.

Deploying All Changes

Generating TypeScript Types

This creates base44/.types/types.d.ts with typed registries for the @base44/sdk module. Run this after changing entities, functions, agents, or connectors to keep your types in sync. No authentication required.

Deploying Individual Resources

Opening the Dashboard

Authentication

Most commands require authentication. If you’re not logged in, the CLI will automatically prompt you to login. Your session is stored locally and persists across CLI sessions.

Troubleshooting