@base44-preview/cli 0.0.15-pr.93.4af3300 → 0.0.15-pr.95.166452a
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +135 -42
- package/dist/cli/index.js +18 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,78 +1,171 @@
|
|
|
1
1
|
# Base44 CLI
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
A unified command-line interface for managing Base44 applications, entities, functions, deployments, and related services.
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
- **Create projects** from templates.
|
|
8
|
-
- **Sync** resources defined in local code with your Base44 backend.
|
|
9
|
-
- **Deploy sites** to Base44's hosting platform.
|
|
10
|
-
|
|
11
|
-
To get started, see the full list of commands below or check out the [documentation](https://docs.base44.com/developers/references/cli/get-started/overview).
|
|
5
|
+
**Zero dependencies** - installs in seconds with no dependency resolution.
|
|
12
6
|
|
|
13
7
|
## Installation
|
|
14
8
|
|
|
15
9
|
```bash
|
|
10
|
+
# Using npm (globally)
|
|
16
11
|
npm install -g base44
|
|
17
|
-
```
|
|
18
12
|
|
|
19
|
-
Or run
|
|
20
|
-
|
|
21
|
-
```bash
|
|
13
|
+
# Or run directly with npx
|
|
22
14
|
npx base44 <command>
|
|
23
15
|
```
|
|
24
16
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
## Quick start
|
|
17
|
+
## Quick Start
|
|
28
18
|
|
|
29
19
|
```bash
|
|
30
|
-
#
|
|
20
|
+
# 1. Login to Base44
|
|
31
21
|
base44 login
|
|
32
22
|
|
|
33
|
-
# Create a project
|
|
23
|
+
# 2. Create a new project
|
|
34
24
|
base44 create
|
|
25
|
+
|
|
26
|
+
# 3. Deploy everything (entities, functions, and site)
|
|
27
|
+
npm run build
|
|
28
|
+
base44 deploy
|
|
35
29
|
```
|
|
36
30
|
|
|
37
|
-
|
|
31
|
+
## Commands
|
|
38
32
|
|
|
39
|
-
|
|
40
|
-
- [React](https://docs.base44.com/developers/backend/quickstart/quickstart-with-react) — full-stack with Vite + React
|
|
33
|
+
### Authentication
|
|
41
34
|
|
|
42
|
-
|
|
35
|
+
| Command | Description |
|
|
36
|
+
|---------|-------------|
|
|
37
|
+
| `base44 login` | Authenticate with Base44 using device code flow |
|
|
38
|
+
| `base44 whoami` | Display current authenticated user |
|
|
39
|
+
| `base44 logout` | Logout from current device |
|
|
40
|
+
|
|
41
|
+
### Project Management
|
|
42
|
+
|
|
43
|
+
| Command | Description |
|
|
44
|
+
|---------|-------------|
|
|
45
|
+
| `base44 create` | Create a new Base44 project from a template |
|
|
46
|
+
| `base44 link` | Link an existing local project to Base44 |
|
|
47
|
+
| `base44 dashboard` | Open the app dashboard in your browser |
|
|
48
|
+
|
|
49
|
+
### Deployment
|
|
50
|
+
|
|
51
|
+
| Command | Description |
|
|
52
|
+
|---------|-------------|
|
|
53
|
+
| `base44 deploy` | Deploy all resources (entities, functions, and site) |
|
|
54
|
+
|
|
55
|
+
### Entities
|
|
56
|
+
|
|
57
|
+
| Command | Description |
|
|
58
|
+
|---------|-------------|
|
|
59
|
+
| `base44 entities push` | Push local entity schemas to Base44 |
|
|
60
|
+
|
|
61
|
+
### Functions
|
|
62
|
+
|
|
63
|
+
| Command | Description |
|
|
64
|
+
|---------|-------------|
|
|
65
|
+
| `base44 functions deploy` | Deploy local functions to Base44 |
|
|
66
|
+
|
|
67
|
+
### Site
|
|
43
68
|
|
|
44
69
|
| Command | Description |
|
|
45
|
-
|
|
46
|
-
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
70
|
+
|---------|-------------|
|
|
71
|
+
| `base44 site deploy` | Deploy built site files to Base44 hosting |
|
|
72
|
+
|
|
73
|
+
## Configuration
|
|
74
|
+
|
|
75
|
+
### Project Configuration
|
|
76
|
+
|
|
77
|
+
Base44 projects are configured via a `config.jsonc` (or `config.json`) file in the `base44/` subdirectory:
|
|
78
|
+
|
|
79
|
+
```jsonc
|
|
80
|
+
// base44/config.jsonc
|
|
81
|
+
{
|
|
82
|
+
"name": "My Project",
|
|
83
|
+
"entitiesDir": "./entities", // Default: ./entities
|
|
84
|
+
"functionsDir": "./functions", // Default: ./functions
|
|
85
|
+
"site": {
|
|
86
|
+
"outputDirectory": "../dist" // Path to built site files
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
### App Configuration
|
|
92
|
+
|
|
93
|
+
Your app ID is stored in a `.app.jsonc` file in the `base44/` directory. This file is created automatically when you run `base44 create` or `base44 link`:
|
|
94
|
+
|
|
95
|
+
```jsonc
|
|
96
|
+
// base44/.app.jsonc
|
|
97
|
+
{
|
|
98
|
+
"id": "your-app-id"
|
|
99
|
+
}
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
## Project Structure
|
|
103
|
+
|
|
104
|
+
A typical Base44 project has this structure:
|
|
105
|
+
|
|
106
|
+
```
|
|
107
|
+
my-project/
|
|
108
|
+
├── base44/
|
|
109
|
+
│ ├── config.jsonc # Project configuration
|
|
110
|
+
│ ├── .app.jsonc # App ID (git-ignored)
|
|
111
|
+
│ ├── entities/ # Entity schema files
|
|
112
|
+
│ │ ├── user.jsonc
|
|
113
|
+
│ │ └── product.jsonc
|
|
114
|
+
│ └── functions/ # Backend functions
|
|
115
|
+
│ └── my-function/
|
|
116
|
+
│ ├── config.jsonc
|
|
117
|
+
│ └── index.js
|
|
118
|
+
├── src/ # Your frontend code
|
|
119
|
+
├── dist/ # Built site files (for deployment)
|
|
120
|
+
└── package.json
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
## Development
|
|
124
|
+
|
|
125
|
+
### Prerequisites
|
|
126
|
+
|
|
127
|
+
- Node.js >= 20.19.0
|
|
128
|
+
- npm
|
|
129
|
+
|
|
130
|
+
### Setup
|
|
59
131
|
|
|
60
132
|
```bash
|
|
61
|
-
|
|
62
|
-
|
|
133
|
+
# Clone the repository
|
|
134
|
+
git clone https://github.com/base44/cli.git
|
|
135
|
+
cd cli
|
|
136
|
+
|
|
137
|
+
# Install dependencies
|
|
138
|
+
npm install
|
|
139
|
+
|
|
140
|
+
# Build
|
|
141
|
+
npm run build
|
|
142
|
+
|
|
143
|
+
# Run in development mode
|
|
144
|
+
npm run dev -- <command>
|
|
63
145
|
```
|
|
64
146
|
|
|
65
|
-
|
|
147
|
+
### Available Scripts
|
|
66
148
|
|
|
67
149
|
```bash
|
|
68
|
-
|
|
150
|
+
npm run build # Build with tsdown
|
|
151
|
+
npm run typecheck # Type check with tsc
|
|
152
|
+
npm run dev # Run in development mode with tsx
|
|
153
|
+
npm run lint # Lint with ESLint
|
|
154
|
+
npm test # Run tests with Vitest
|
|
69
155
|
```
|
|
70
156
|
|
|
71
|
-
|
|
157
|
+
### Running the Built CLI
|
|
72
158
|
|
|
73
|
-
|
|
159
|
+
```bash
|
|
160
|
+
# After building
|
|
161
|
+
npm start -- <command>
|
|
162
|
+
|
|
163
|
+
# Or directly
|
|
164
|
+
./dist/cli/index.js <command>
|
|
165
|
+
```
|
|
166
|
+
## Contributing
|
|
74
167
|
|
|
75
|
-
|
|
168
|
+
See [AGENTS.md](./AGENTS.md) for development guidelines and architecture documentation.
|
|
76
169
|
|
|
77
170
|
## License
|
|
78
171
|
|
package/dist/cli/index.js
CHANGED
|
@@ -38042,6 +38042,7 @@ async function createInteractive(options) {
|
|
|
38042
38042
|
description: result.description || void 0,
|
|
38043
38043
|
projectPath: result.projectPath,
|
|
38044
38044
|
deploy: options.deploy,
|
|
38045
|
+
skills: options.skills,
|
|
38045
38046
|
isInteractive: true
|
|
38046
38047
|
});
|
|
38047
38048
|
}
|
|
@@ -38052,10 +38053,11 @@ async function createNonInteractive(options) {
|
|
|
38052
38053
|
description: options.description,
|
|
38053
38054
|
projectPath: options.path,
|
|
38054
38055
|
deploy: options.deploy,
|
|
38056
|
+
skills: options.skills,
|
|
38055
38057
|
isInteractive: false
|
|
38056
38058
|
});
|
|
38057
38059
|
}
|
|
38058
|
-
async function executeCreate({ template, name: rawName, description, projectPath, deploy, isInteractive }) {
|
|
38060
|
+
async function executeCreate({ template, name: rawName, description, projectPath, deploy, skills, isInteractive }) {
|
|
38059
38061
|
const name$1 = rawName.trim();
|
|
38060
38062
|
const resolvedPath = resolve(projectPath);
|
|
38061
38063
|
const { projectId } = await runTask("Setting up your project...", async () => {
|
|
@@ -38115,12 +38117,26 @@ async function executeCreate({ template, name: rawName, description, projectPath
|
|
|
38115
38117
|
finalAppUrl = appUrl;
|
|
38116
38118
|
}
|
|
38117
38119
|
}
|
|
38120
|
+
let shouldAddSkills;
|
|
38121
|
+
if (isInteractive) {
|
|
38122
|
+
const result = await ye({ message: "Add AI agent skills? (Helps Cursor, Claude Code work with Base44)" });
|
|
38123
|
+
shouldAddSkills = !pD(result) && result;
|
|
38124
|
+
} else shouldAddSkills = !!skills;
|
|
38125
|
+
if (shouldAddSkills) await runTask("Adding AI agent skills...", async () => {
|
|
38126
|
+
await execa({
|
|
38127
|
+
cwd: resolvedPath,
|
|
38128
|
+
shell: true
|
|
38129
|
+
})`npx -y add-skill base44/skills`;
|
|
38130
|
+
}, {
|
|
38131
|
+
successMessage: theme.colors.base44Orange("AI agent skills added successfully"),
|
|
38132
|
+
errorMessage: "Failed to add AI agent skills"
|
|
38133
|
+
});
|
|
38118
38134
|
M.message(`${theme.styles.header("Project")}: ${theme.colors.base44Orange(name$1)}`);
|
|
38119
38135
|
M.message(`${theme.styles.header("Dashboard")}: ${theme.colors.links(getDashboardUrl(projectId))}`);
|
|
38120
38136
|
if (finalAppUrl) M.message(`${theme.styles.header("Site")}: ${theme.colors.links(finalAppUrl)}`);
|
|
38121
38137
|
return { outroMessage: "Your project is set up and ready to use" };
|
|
38122
38138
|
}
|
|
38123
|
-
const createCommand = new Command("create").description("Create a new Base44 project").option("-n, --name <name>", "Project name").option("-d, --description <description>", "Project description").option("-p, --path <path>", "Path where to create the project").option("-t, --template <id>", "Template ID (e.g., backend-only, backend-and-client)").option("--deploy", "Build and deploy the site").hook("preAction", validateNonInteractiveFlags$1).action(async (options) => {
|
|
38139
|
+
const createCommand = new Command("create").description("Create a new Base44 project").option("-n, --name <name>", "Project name").option("-d, --description <description>", "Project description").option("-p, --path <path>", "Path where to create the project").option("-t, --template <id>", "Template ID (e.g., backend-only, backend-and-client)").option("--deploy", "Build and deploy the site").option("--skills", "Add AI agent skills (Cursor, Claude Code)").hook("preAction", validateNonInteractiveFlags$1).action(async (options) => {
|
|
38124
38140
|
await chooseCreate(options);
|
|
38125
38141
|
});
|
|
38126
38142
|
|
package/package.json
CHANGED