npx skills add ...
npx skills add base44/skills --skill base44-cli
The base44 CLI is used for EVERYTHING related to base44 projects: resource configuration (entities, backend functions, ai agents), initialization and actions (resource creation, deployment). This skill is the place for learning about how to configure resources. When you plan or implement a feature, you must learn this skill
npx skills add base44/skills --skill base44-cli
Create and manage Base44 apps (projects) using the Base44 CLI tool.
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:
base44/config.jsonc exists in the current directoryBASE44_APP_ID (or BASE44_PROJECTS_BASE44_APP_ID) is present in the environment or a .env/.env.local file:
npx base44 scaffold to set up local files for that existing appnpx base44 create — that creates a second, duplicate app. See scaffold.md.npx base44 createNEVER 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
CRITICAL: At the very start of every AI session when this skill is activated, you MUST:
Check authentication status by running:
If the user is logged in (command succeeds and shows an email):
If the user is NOT logged in (command fails or shows an error):
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.
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.
Use base44-cli when:
scaffoldbase44/config.jsoncnpx base44 ...)Use base44-sdk when:
base44/config.jsonc already existsSkill Dependencies:
base44-cli is a prerequisite for base44-sdk in new projectsbase44-cli firstbase44-sdk assumes a Base44 project is already initializedState Check Logic: Before selecting a skill, check:
base44/config.jsonc exists):
→ Use base44-sdk (project exists, build features)BASE44_APP_ID/BASE44_PROJECTS_BASE44_APP_ID set, or a Stripe Projects / projects.dev flow just ran):
→ Use base44-cli → npx base44 scaffold (set up local files for the existing app; do NOT create)npx base44 create (new project initialization needed)A Base44 project combines a standard frontend project with a base44/ configuration folder:
Key files:
base44/config.jsonc - Project name, description, site build settingsbase44/entities/*.jsonc - Data model schemas (see Entity Schema section)base44/functions/*/entry.ts - Backend function entry pointbase44/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 useconfig.jsonc example:
Config properties:
| Property | Description | Default |
|---|---|---|
name | Project name (required) | - |
description | Project description | - |
visibility | App visibility: public, private, or workspace | - |
entitiesDir | Directory for entity schemas | "entities" |
functionsDir | Directory for backend functions | "functions" |
agentsDir | Directory for agent configs | "agents" |
agentSkillsDir | Directory for agent skill instructions | "agent-skills" |
connectorsDir | Directory for connector configs | "connectors" |
site.installCommand | Command to install dependencies | - |
site.buildCommand | Command to build the project | - |
site.serveCommand | Command to run dev server | - |
site.outputDirectory | Build output directory for deployment | - |
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.
--app-id OptionThe 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-idbase44 dev runs from a linked local project, so it rejects --app-idbase44 deploy still requires a local project directory because it reads local resources--json OptionThe 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.
| Command | Description | Reference |
|---|---|---|
base44 login | Authenticate with Base44 using device code flow | auth-login.md |
base44 logout | Logout from current device | auth-logout.md |
base44 whoami | Display current authenticated user | auth-whoami.md |
| Command | Description | Reference |
|---|---|---|
base44 create | Create a new Base44 project from a template | create.md ⚠️ MUST READ |
base44 scaffold | Scaffold a local project for an existing Base44 app (by app ID) | scaffold.md |
base44 link | Link an existing local project to Base44 | link.md |
base44 eject | Download the code for an existing Base44 project | eject.md |
base44 dashboard open | Open the app dashboard in your browser | dashboard.md |
base44 visibility <level> | Set the app's visibility on the server (public, private, or workspace) | visibility.md |
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.
| Command | Description | Reference |
|---|---|---|
base44 workspace list | List the workspaces you belong to | workspace-list.md |
base44 workspace get <workspace-id> | Show details for a single workspace by ID | workspace-get.md |
base44 workspace move [workspace-id] | Move the current app to another workspace | workspace-move.md |
| Command | Description | Reference |
|---|---|---|
base44 dev | Start local development for your Base44 backend, and your frontend too when site.serveCommand is configured | dev.md |
base44 dev --remote | Serve the frontend locally against the production backend | dev.md |
| Command | Description | Reference |
|---|---|---|
base44 build | Build the site with its app id injected — use instead of a bare npm run build | — |
base44 deploy | Deploy all resources (entities, functions, agents, agent skills, connectors, auth config, and site); asks whether to build first, or pass --build / --no-build | deploy.md |
| Action / Command | Description | Reference |
|---|---|---|
| Create Entities | Define entities in base44/entities folder | entities-create.md |
base44 entities push | Push local entities to Base44 | entities-push.md |
| RLS Patterns | Row-level security examples and operators | rls-examples.md ⚠️ READ FOR RLS |
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.
| Action / Command | Description | Reference |
|---|---|---|
| Create Functions | Define functions in base44/functions | functions-create.md |
base44 functions deploy [names...] [--force] | Deploy local functions to Base44; optionally target specific functions or prune removed ones | functions-deploy.md |
base44 functions delete <names...> | Delete one or more deployed functions from Base44 | functions-delete.md |
base44 functions list | List all deployed functions on Base44 remote | functions-list.md |
base44 functions pull [name] | Pull deployed functions from Base44 to local files | functions-pull.md |
Workflows are the automation system (cron schedules, entity triggers, connector events, in-app agent actions). These commands are read-only: they answer "what workflows exist" and "did my scheduled work fail, and why".
| Command | Description | Reference |
|---|---|---|
base44 workflows list | List this app's workflows with status and run summary | workflows-list.md |
base44 workflows runs [--status <s>] [--since <t>] | List workflow runs, newest first; failed runs include the underlying error | workflows-runs.md |
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.
| Action / Command | Description | Reference |
|---|---|---|
| Create Agents | Define agents in base44/agents folder | See Agent Schema below |
base44 agents pull | Pull remote agents to local files | agents-pull.md |
base44 agents push | Push local agents to Base44 | agents-push.md |
Note: Agent commands perform full synchronization - pushing replaces all remote agents with local ones, and pulling replaces all local agents with remote ones.
File naming: base44/agents/{agent_name}.jsonc (e.g., support_agent.jsonc)
Schema template:
Naming rules:
/^[a-z0-9_]+$/ (lowercase alphanumeric with underscores, 1-100 chars)support_agent, order_botSupport-Agent, OrderBotRequired fields: name, description, instructions
Optional fields: tool_configs (defaults to []), memory_config, whatsapp_greeting
Tool config types:
entity_name + allowed_operations (array of: read, create, update, delete)function_name + descriptionMemory 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 are reusable Markdown instructions that extend what your app's AI agents know how to do. Use these commands to manage them.
| Action / Command | Description | Reference |
|---|---|---|
| Create Agent Skills | Define skills in base44/agent-skills folder | agent-skills-push.md |
base44 agent-skills pull | Pull remote agent skills to local files | agent-skills-pull.md |
base44 agent-skills push | Push local agent skills to Base44 | agent-skills-push.md |
Note: Agent skill commands perform full synchronization - pushing replaces all remote skills with local ones, and pulling replaces all local skills with remote ones.
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)
pdf-export, order-lookupPdfExport, pdf_exportRequired fields: description (frontmatter, 1-1024 chars), body (Markdown content, 1-15000 chars)
For complete documentation, see agent-skills-push.md.
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.
| Action / Command | Description | Reference |
|---|---|---|
| Create Connectors | Define connectors in base44/connectors folder | connectors-create.md |
base44 connectors list-available | List all available integration types from Base44 | connectors-list-available.md |
base44 connectors initiate --integration-type <t> [--scopes <s...>] | Initialize a connector and start its OAuth flow; works projectless with --app-id | connectors-initiate.md |
base44 connectors pull | Pull remote connectors to local files | connectors-pull.md |
base44 connectors push | Push local connectors to Base44 | connectors-push.md |
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.
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.
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.
| Command | Description | Reference |
|---|---|---|
base44 auth password-login <enable|disable> | Enable or disable username & password authentication | auth-password-login.md |
base44 auth social-login <provider> <enable|disable> | Enable or disable social login (google, microsoft, facebook, apple) | auth-social-login.md |
base44 auth sso <enable|disable> | Configure SSO identity provider (google, microsoft, github, okta, custom) | auth-sso.md |
base44 auth pull | Pull auth config from Base44 to local files | auth-pull.md |
base44 auth push | Push local auth config to Base44 | auth-push.md |
Note: Auth config is also deployed as part of base44 deploy.
Manage project secrets (environment variables stored securely in Base44). These commands are hidden from --help output but are fully functional.
| Command | Description | Reference |
|---|---|---|
base44 secrets list | List the names of all secrets | secrets-list.md |
base44 secrets set | Set one or more secrets (KEY=VALUE or --env-file) | secrets-set.md |
base44 secrets delete <key> | Delete a secret by name | secrets-delete.md |
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.
| Command | Description | Reference |
|---|---|---|
base44 exec | Run a script (via stdin) with the Base44 SDK pre-authenticated | exec.md |
| Command | Description | Reference |
|---|---|---|
base44 types generate | Generate TypeScript types (types.d.ts) from entities, functions, agents, and connectors | types-generate.md |
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.
| Command | Description | Reference |
|---|---|---|
base44 site deploy | Deploy built site files to Base44 hosting | site-deploy.md |
base44 site open | Open the deployed site in your browser | site-open.md |
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).
Install the CLI in your project:
Authenticate with Base44:
Create a new project (ALWAYS provide name and --path flag):
Run local development:
Build and deploy everything:
Or deploy individual resources:
npx base44 entities push - Push entities onlynpx base44 functions deploy - Deploy functions onlynpx base44 functions delete <name> - Delete a deployed functionnpx base44 functions list - List all deployed functionsnpx base44 functions pull - Pull deployed functions to local filesnpx base44 agents push - Push agents onlynpx base44 agent-skills push - Push agent skills onlynpx base44 connectors pull - Pull connectors from Base44npx base44 connectors push - Push connectors onlynpx base44 auth pull - Pull auth config from Base44npx base44 auth push - Push auth config onlynpx base44 site deploy -y - Deploy site only⚠️ MANDATORY: Before running base44 create, you MUST read create.md for:
backend-and-client vs backend-only)Failure to follow the create.md instructions will result in broken project scaffolding.
Always run through the CLI — two modes:
| Command | Backend + data |
|---|---|
npx base44 dev | local — throwaway, empty each start, gone on stop |
npx base44 dev --remote | production — the real app's live data |
base44 dev starts the local backend (entities, functions, auth) and also serves your frontend when
base44/config.jsonc sets site.serveCommand; a backend-only project needs nothing else.
--remote runs only the frontend against the real backend, so it needs both a linked project and
site.serveCommand.
Don't run npm run dev yourself: without the env vars the CLI injects, the app has no backend to
reach — the dev server prints which command to use instead.
Default to npx base44 dev. Under --remote every write hits the live app. The vite startup
line names the backend either way: [base44] Proxy enabled: /api -> <target>. Say which you
started. Options: dev.md.
Build through the CLI, not with npm run build: npx base44 build injects VITE_BASE44_APP_ID,
which a bare npm run build leaves unset — the bundle then can't resolve its own app and every API
call on the deployed site fails. npx base44 deploy asks whether to build first; --build /
--no-build answers up front (non-interactive defaults to upload-only, so CI is unchanged).
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.
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.
| Error | Solution |
|---|---|
| Not authenticated | Run npx base44 login first |
| No entities found | Ensure entities exist in base44/entities/ directory |
| Entity not recognized | Ensure file uses kebab-case naming (e.g., team-member.jsonc not TeamMember.jsonc) |
| No functions found | Ensure functions exist in base44/functions/ with entry.ts or entry.js |
| No agents found | Ensure agents exist in base44/agents/ directory with valid .jsonc configs |
| Invalid agent name | Agent names must be lowercase alphanumeric with underscores only |
| No agent skills found | Ensure skill files exist in base44/agent-skills/ directory with valid .md files |
| Invalid skill file | Skill file name must be lowercase-hyphenated and include a description in its frontmatter |
| Push cancelled / requires --yes | agents push, agent-skills push, entities push, and connectors push are destructive full-syncs — confirm interactively or pass -y/--yes in CI/non-interactive mode |
| No connectors found | Ensure connectors exist in base44/connectors/ directory with valid .jsonc configs |
| Invalid connector type | Run npx base44 connectors list-available to see valid types |
| Duplicate connector type | Each connector type can only be defined once per project |
| Connector authorization timeout | Re-run npx base44 connectors push and complete the OAuth flow in your browser |
| No site configuration found | Check that site.outputDirectory is configured in project config |
| Site deployment fails | Ensure the site was built first (npx base44 build, or npx base44 deploy --build) and the build succeeded |
| Deployed site's API calls all fail | The bundle was built without its app id — rebuild with npx base44 build, not a bare npm run build, and redeploy |
| Update available message | If prompted to update, run npm install -g base44@latest (or use npx for local installs) |