base44-cli
Original:🇺🇸 English
Translated
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
9installs
Sourcebase44/skills
Added on
NPX Install
npx skill4agent add base44/skills base44-cliTags
Translated version includes tags in frontmatterSKILL.md Content
View Translation Comparison →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 folder exists. DO NOT read documentation files or search the web before acting.
base44/Your first action MUST be:
- Check if exists in the current directory
base44/config.jsonc - If NO (new project scenario):
- This skill (base44-cli) handles the request
- Guide user through project initialization
- Do NOT activate base44-sdk yet
- If YES (existing project scenario):
- Transfer to base44-sdk skill for implementation
- This skill only handles CLI commands (login, deploy, entities push)
Critical: Local Installation Only
NEVER call directly. The CLI is installed locally as a dev dependency and must be accessed via a package manager:
base44- (npm - recommended)
npx base44 <command> - (yarn)
yarn base44 <command> - (pnpm)
pnpm base44 <command>
WRONG:
RIGHT:
base44 loginnpx base44 loginMANDATORY: Authentication Check at Session Start
CRITICAL: At the very start of every AI session when this skill is activated, you MUST:
-
Check authentication status by running:bash
npx base44 whoami -
If the user is logged in (command succeeds and shows an email):
- Continue with the requested task
-
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:
bash
npx base44 login
- Wait for the user to confirm they have logged in before continuing
This check is mandatory and must happen before executing any other Base44 CLI commands.
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
- 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
- already exists
base44/config.jsonc - Writing JavaScript/TypeScript code using Base44 SDK
- Implementing functionality, components, or features
- User mentions: "implement", "build a feature", "add functionality", "write code"
Skill Dependencies:
- is a prerequisite for
base44-cliin new projectsbase44-sdk - If user wants to "create an app" and no Base44 project exists, use first
base44-cli - assumes a Base44 project is already initialized
base44-sdk
State Check Logic:
Before selecting a skill, check:
- IF (user mentions "create/build app" OR "make a project"):
- IF (directory is empty OR no exists): → Use base44-cli (project initialization needed)
base44/config.jsonc - ELSE: → Use base44-sdk (project exists, build features)
- IF (directory is empty OR no
Project Structure
A Base44 project combines a standard frontend project with a configuration folder:
base44/my-app/
├── base44/ # Base44 configuration (created by CLI)
│ ├── config.jsonc # Project settings, site config
│ ├── entities/ # Entity schema definitions
│ │ ├── task.jsonc
│ │ └── board.jsonc
│ ├── functions/ # Backend functions (optional)
│ │ └── my-function/
│ │ ├── function.jsonc
│ │ └── index.ts
│ └── agents/ # Agent configurations (optional)
│ └── support_agent.jsonc
├── src/ # Frontend source code
│ ├── api/
│ │ └── base44Client.js # Base44 SDK client
│ ├── pages/
│ ├── components/
│ └── main.jsx
├── index.html # SPA entry point
├── package.json
└── vite.config.js # Or your framework's configKey files:
- - Project name, description, site build settings
base44/config.jsonc - - Data model schemas (see Entity Schema section)
base44/entities/*.jsonc - - Agent configurations (optional)
base44/agents/*.jsonc - - Pre-configured SDK client for frontend use
src/api/base44Client.js
config.jsonc example:
jsonc
{
"name": "My App", // Required: project name
"description": "App description", // Optional: project description
"entitiesDir": "./entities", // Optional: default "entities"
"functionsDir": "./functions", // Optional: default "functions"
"agentsDir": "./agents", // Optional: default "agents"
"site": { // Optional: site deployment config
"installCommand": "npm install", // Optional: install dependencies
"buildCommand": "npm run build", // Optional: build command
"serveCommand": "npm run dev", // Optional: local dev server
"outputDirectory": "./dist" // Optional: build output directory
}
}Config properties:
| Property | Description | Default |
|---|---|---|
| Project name (required) | - |
| Project description | - |
| Directory for entity schemas | |
| Directory for backend functions | |
| Directory for agent configs | |
| Command to install dependencies | - |
| Command to build the project | - |
| Command to run dev server | - |
| Build output directory for deployment | - |
Installation
Install the Base44 CLI as a dev dependency in your project:
bash
npm install --save-dev base44Important: Never assume or hardcode the package version. Always install without a version specifier to get the latest version.
base44Then run commands using :
npxbash
npx base44 <command>Note: All commands in this documentation use . You can also use , or if preferred.
npx base44yarn base44pnpm base44Available Commands
Authentication
| Command | Description | Reference |
|---|---|---|
| Authenticate with Base44 using device code flow | auth-login.md |
| Logout from current device | auth-logout.md |
| Display current authenticated user | auth-whoami.md |
Project Management
| Command | Description | Reference |
|---|---|---|
| Create a new Base44 project from a template | create.md ⚠️ MUST READ |
| Link an existing local project to Base44 | link.md |
| Open the app dashboard in your browser | dashboard.md |
Deployment
| Command | Description | Reference |
|---|---|---|
| Deploy all resources (entities, functions, site) | deploy.md |
Entity Management
| Action / Command | Description | Reference |
|---|---|---|
| Create Entities | Define entities in | entities-create.md |
| Push local entities to Base44 | entities-push.md |
| RLS Patterns | Row-level security examples and operators | rls-examples.md ⚠️ READ FOR RLS |
Entity Schema (Quick Reference)
ALWAYS follow this exact structure when creating entity files:
File naming: (e.g., for )
base44/entities/{kebab-case-name}.jsoncteam-member.jsoncTeamMemberSchema template:
jsonc
{
"name": "EntityName",
"type": "object",
"properties": {
"field_name": {
"type": "string",
"description": "Field description"
}
},
"required": ["field_name"]
}Field types: , , , , , ,
String formats: , , , , , , , , , , ,
For enums: Add and optionally
Entity names: Must be alphanumeric only (pattern: )
stringnumberintegerbooleanarrayobjectbinarydatedate-timetimeemailurihostnameipv4ipv6uuidfileregexrichtext"enum": ["value1", "value2"]"default": "value1"/^[a-zA-Z0-9]+$/For complete documentation, see entities-create.md.
Function Management
| Action / Command | Description | Reference |
|---|---|---|
| Create Functions | Define functions in | functions-create.md |
| Deploy local functions to Base44 | functions-deploy.md |
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.
| Action / Command | Description | Reference |
|---|---|---|
| Create Agents | Define agents in | See Agent Schema below |
| Pull remote agents to local files | agents-pull.md |
| 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.
Agent Schema (Quick Reference)
File naming: (e.g., )
base44/agents/{agent_name}.jsoncsupport_agent.jsoncSchema template:
jsonc
{
"name": "agent_name",
"description": "Brief description of what this agent does",
"instructions": "Detailed instructions for the agent's behavior",
"tool_configs": [
// Entity tool - gives agent access to entity operations
{ "entity_name": "tasks", "allowed_operations": ["read", "create", "update", "delete"] },
// Backend function tool - gives agent access to a function
{ "function_name": "send_email", "description": "Send an email notification" }
],
"whatsapp_greeting": "Hello! How can I help you today?"
}Naming rules:
- Agent names must match pattern: (lowercase alphanumeric with underscores, 1-100 chars)
/^[a-z0-9_]+$/ - Valid: ,
support_agentorder_bot - Invalid: ,
Support-AgentOrderBot
Required fields: , ,
Optional fields: (defaults to ),
namedescriptioninstructionstool_configs[]whatsapp_greetingTool config types:
- Entity tools: +
entity_name(array of:allowed_operations,read,create,update)delete - Backend function tools: +
function_namedescription
Site Deployment
| Command | Description | Reference |
|---|---|---|
| Deploy built site files to Base44 hosting | site-deploy.md |
SPA only: Base44 hosting supports Single Page Applications with a single entry point. All routes are served from (client-side routing).
index.htmlindex.htmlQuick Start
-
Install the CLI in your project:bash
npm install --save-dev base44 -
Authenticate with Base44:bash
npx base44 login -
Create a new project (ALWAYS provide name andflag):
--pathbashnpx base44 create my-app -p . -
Build and deploy everything:bash
npm run build npx base44 deploy -y
Or deploy individual resources:
- - Push entities only
npx base44 entities push - - Deploy functions only
npx base44 functions deploy - - Push agents only
npx base44 agents push - - Deploy site only
npx base44 site deploy -y
Common Workflows
Creating a New Project
⚠️ MANDATORY: Before running , you MUST read create.md for:
base44 create- Template selection - Choose the correct template (vs
backend-and-client)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
bash
# If you have base44/config.jsonc but no .app.jsonc
npx base44 link --create --name my-appDeploying All Changes
bash
# Build your project first
npm run build
# Deploy everything (entities, functions, and site)
npx base44 deploy -yDeploying Individual Resources
bash
# Push only entities
npx base44 entities push
# Deploy only functions
npx base44 functions deploy
# Push only agents
npx base44 agents push
# Deploy only site
npx base44 site deploy -yOpening the Dashboard
bash
# Open app dashboard in browser
npx base44 dashboardAuthentication
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
| Error | Solution |
|---|---|
| Not authenticated | Run |
| No entities found | Ensure entities exist in |
| Entity not recognized | Ensure file uses kebab-case naming (e.g., |
| No functions found | Ensure functions exist in |
| No agents found | Ensure agents exist in |
| Invalid agent name | Agent names must be lowercase alphanumeric with underscores only |
| No site configuration found | Check that |
| Site deployment fails | Ensure you ran |