@base44-preview/cli 0.0.17-pr.104.ad47aa8 → 0.0.17-pr.104.e7dd3a1
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 +60 -194
- package/bin/dev.js +12 -0
- package/bin/run.js +12 -0
- package/dist/{cli/index.js → index.js} +253 -212
- package/package.json +7 -8
- /package/dist/{cli/templates → templates}/backend-and-client/.nvmrc +0 -0
- /package/dist/{cli/templates → templates}/backend-and-client/README.md +0 -0
- /package/dist/{cli/templates → templates}/backend-and-client/base44/app.jsonc.ejs +0 -0
- /package/dist/{cli/templates → templates}/backend-and-client/base44/config.jsonc.ejs +0 -0
- /package/dist/{cli/templates → templates}/backend-and-client/base44/entities/task.jsonc +0 -0
- /package/dist/{cli/templates → templates}/backend-and-client/components.json +0 -0
- /package/dist/{cli/templates → templates}/backend-and-client/index.html +0 -0
- /package/dist/{cli/templates → templates}/backend-and-client/jsconfig.json +0 -0
- /package/dist/{cli/templates → templates}/backend-and-client/package.json +0 -0
- /package/dist/{cli/templates → templates}/backend-and-client/postcss.config.js +0 -0
- /package/dist/{cli/templates → templates}/backend-and-client/src/App.jsx +0 -0
- /package/dist/{cli/templates → templates}/backend-and-client/src/api/base44Client.js.ejs +0 -0
- /package/dist/{cli/templates → templates}/backend-and-client/src/components/Base44Logo.jsx +0 -0
- /package/dist/{cli/templates → templates}/backend-and-client/src/components/ui/button.jsx +0 -0
- /package/dist/{cli/templates → templates}/backend-and-client/src/components/ui/checkbox.jsx +0 -0
- /package/dist/{cli/templates → templates}/backend-and-client/src/components/ui/input.jsx +0 -0
- /package/dist/{cli/templates → templates}/backend-and-client/src/index.css +0 -0
- /package/dist/{cli/templates → templates}/backend-and-client/src/main.jsx +0 -0
- /package/dist/{cli/templates → templates}/backend-and-client/tailwind.config.js +0 -0
- /package/dist/{cli/templates → templates}/backend-and-client/vite.config.js +0 -0
- /package/dist/{cli/templates → templates}/backend-only/base44/app.jsonc.ejs +0 -0
- /package/dist/{cli/templates → templates}/backend-only/base44/config.jsonc.ejs +0 -0
- /package/dist/{cli/templates → templates}/templates.json +0 -0
package/README.md
CHANGED
|
@@ -1,247 +1,113 @@
|
|
|
1
1
|
# Base44 CLI
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Command-line interface for building applications with [Base44's backend service](https://docs.base44.com/developers/backend/overview/introduction).
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Base44's backend service provides a managed backend for your applications, including data storage with entities, serverless functions, authentication, and hosting. The CLI lets you:
|
|
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).
|
|
6
12
|
|
|
7
13
|
## Installation
|
|
8
14
|
|
|
9
15
|
```bash
|
|
10
|
-
# Using npm (globally)
|
|
11
16
|
npm install -g base44
|
|
12
|
-
|
|
13
|
-
# Or run directly with npx
|
|
14
|
-
npx base44 <command>
|
|
15
17
|
```
|
|
16
18
|
|
|
17
|
-
|
|
19
|
+
Or run commands directly with npx:
|
|
18
20
|
|
|
19
21
|
```bash
|
|
20
|
-
|
|
21
|
-
base44 login
|
|
22
|
-
|
|
23
|
-
# 2. Create a new project
|
|
24
|
-
base44 create
|
|
25
|
-
|
|
26
|
-
# 3. Deploy everything (entities, functions, and site)
|
|
27
|
-
npm run build
|
|
28
|
-
base44 deploy
|
|
22
|
+
npx base44 <command>
|
|
29
23
|
```
|
|
30
24
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
### Authentication
|
|
34
|
-
|
|
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 a local project to Base44 (create new or link existing) |
|
|
47
|
-
| `base44 dashboard` | Open the app dashboard in your browser |
|
|
48
|
-
|
|
49
|
-
#### Link Command Options
|
|
25
|
+
Requires Node.js 20.19.0 or higher.
|
|
50
26
|
|
|
51
|
-
|
|
27
|
+
## Quick start
|
|
52
28
|
|
|
53
29
|
```bash
|
|
54
|
-
#
|
|
55
|
-
base44
|
|
56
|
-
|
|
57
|
-
# Create a new project (non-interactive)
|
|
58
|
-
base44 link --create --name "my-app" --description "My app description"
|
|
30
|
+
# Authenticate
|
|
31
|
+
base44 login
|
|
59
32
|
|
|
60
|
-
#
|
|
61
|
-
base44
|
|
33
|
+
# Create a project
|
|
34
|
+
base44 create
|
|
62
35
|
```
|
|
63
36
|
|
|
64
|
-
|
|
65
|
-
|--------|-------------|
|
|
66
|
-
| `-c, --create` | Create a new project (skip selection prompt) |
|
|
67
|
-
| `-n, --name <name>` | Project name (required with --create) |
|
|
68
|
-
| `-d, --description <desc>` | Project description (optional) |
|
|
69
|
-
| `-p, --projectId <id>` | Link to an existing project by ID (skips selection prompt) |
|
|
70
|
-
|
|
71
|
-
### Deployment
|
|
72
|
-
|
|
73
|
-
| Command | Description |
|
|
74
|
-
|---------|-------------|
|
|
75
|
-
| `base44 deploy` | Deploy all resources (entities, functions, and site) |
|
|
76
|
-
|
|
77
|
-
### Entities
|
|
78
|
-
|
|
79
|
-
| Command | Description |
|
|
80
|
-
|---------|-------------|
|
|
81
|
-
| `base44 entities push` | Push local entity schemas to Base44 |
|
|
37
|
+
The CLI will guide you through project setup. For step-by-step tutorials, see the quickstart guides:
|
|
82
38
|
|
|
83
|
-
|
|
39
|
+
- [Backend only](https://docs.base44.com/developers/backend/quickstart/quickstart-backend-only) — for headless apps or custom frontends
|
|
40
|
+
- [React](https://docs.base44.com/developers/backend/quickstart/quickstart-with-react) — full-stack with Vite + React
|
|
84
41
|
|
|
85
|
-
|
|
86
|
-
|---------|-------------|
|
|
87
|
-
| `base44 functions deploy` | Deploy local functions to Base44 |
|
|
88
|
-
|
|
89
|
-
### Site
|
|
42
|
+
## Commands
|
|
90
43
|
|
|
91
44
|
| Command | Description |
|
|
92
|
-
|
|
93
|
-
| `base44
|
|
45
|
+
| ------- | ----------- |
|
|
46
|
+
| [`create`](https://docs.base44.com/developers/references/cli/commands/create) | Create a new Base44 project from a template |
|
|
47
|
+
| [`deploy`](https://docs.base44.com/developers/references/cli/commands/deploy) | Deploy resources and site to Base44 |
|
|
48
|
+
| [`link`](https://docs.base44.com/developers/references/cli/commands/link) | Link a local project to a project on Base44 |
|
|
49
|
+
| [`dashboard`](https://docs.base44.com/developers/references/cli/commands/dashboard) | Open the app dashboard in your browser |
|
|
50
|
+
| [`login`](https://docs.base44.com/developers/references/cli/commands/login) | Authenticate with Base44 |
|
|
51
|
+
| [`logout`](https://docs.base44.com/developers/references/cli/commands/logout) | Sign out and clear stored credentials |
|
|
52
|
+
| [`whoami`](https://docs.base44.com/developers/references/cli/commands/whoami) | Display the current authenticated user |
|
|
53
|
+
| [`entities push`](https://docs.base44.com/developers/references/cli/commands/entities-push) | Push local entity schemas to Base44 |
|
|
54
|
+
| [`functions deploy`](https://docs.base44.com/developers/references/cli/commands/functions-deploy) | Deploy local functions to Base44 |
|
|
55
|
+
| [`site deploy`](https://docs.base44.com/developers/references/cli/commands/site-deploy) | Deploy built site files to Base44 hosting |
|
|
56
|
+
| `connectors add [type]` | Connect an OAuth integration |
|
|
57
|
+
| `connectors list` | List all connected integrations |
|
|
58
|
+
| `connectors push` | Sync connectors with backend (connect new, remove missing) |
|
|
59
|
+
| `connectors remove [type]` | Disconnect an integration |
|
|
94
60
|
|
|
95
|
-
### Connectors
|
|
96
61
|
|
|
97
|
-
|
|
62
|
+
<!--| [`eject`](https://docs.base44.com/developers/references/cli/commands/eject) | Create a Base44 backend project from an existing Base44 app | -->
|
|
98
63
|
|
|
99
|
-
|
|
100
|
-
|---------|-------------|
|
|
101
|
-
| `base44 connectors add [type]` | Add and connect an OAuth integration |
|
|
102
|
-
| `base44 connectors list` | List all connectors (local and connected) |
|
|
103
|
-
| `base44 connectors push` | Sync connectors with backend (connect new, remove missing) |
|
|
104
|
-
| `base44 connectors remove [type]` | Remove an integration |
|
|
105
|
-
| `base44 connectors remove [type] --hard` | Permanently remove an integration |
|
|
64
|
+
## AI Agent Skills
|
|
106
65
|
|
|
107
|
-
|
|
66
|
+
When creating a project, you'll be prompted to install AI agent skills for your preferred coding assistants:
|
|
108
67
|
|
|
109
|
-
**Example workflow:**
|
|
110
|
-
```bash
|
|
111
|
-
# Add a connector interactively (saves to config.jsonc and opens OAuth)
|
|
112
|
-
base44 connectors add slack
|
|
113
|
-
|
|
114
|
-
# List connectors showing local vs connected status
|
|
115
|
-
base44 connectors list
|
|
116
|
-
# Output:
|
|
117
|
-
# ● Slack - user@example.com
|
|
118
|
-
# ○ Google Calendar (not connected)
|
|
119
|
-
|
|
120
|
-
# Sync all connectors (connects new, removes missing from config)
|
|
121
|
-
base44 connectors push
|
|
122
|
-
# Output:
|
|
123
|
-
# 1 connector to connect:
|
|
124
|
-
# + Google Calendar
|
|
125
|
-
# 1 connector to remove:
|
|
126
|
-
# - Notion (user@example.com)
|
|
127
|
-
# Apply 2 changes? (Y/n)
|
|
128
|
-
|
|
129
|
-
# Remove a single connector
|
|
130
|
-
base44 connectors remove slack
|
|
131
68
|
```
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
"name": "my-app",
|
|
137
|
-
"connectors": {
|
|
138
|
-
"slack": {},
|
|
139
|
-
"googlecalendar": { "scopes": ["calendar.readonly"] }
|
|
140
|
-
}
|
|
141
|
-
}
|
|
69
|
+
◆ Add AI agent skills? (Select agents to configure)
|
|
70
|
+
│ ◼ Cursor
|
|
71
|
+
│ ◼ Claude Code
|
|
72
|
+
└
|
|
142
73
|
```
|
|
143
74
|
|
|
144
|
-
|
|
145
|
-
```javascript
|
|
146
|
-
const token = await base44.connectors.getAccessToken("slack");
|
|
147
|
-
```
|
|
75
|
+
This installs [base44/skills](https://github.com/base44/skills) which helps AI agents understand how to work with Base44 projects.
|
|
148
76
|
|
|
149
|
-
|
|
77
|
+
**Non-interactive mode:**
|
|
150
78
|
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
```jsonc
|
|
156
|
-
// base44/config.jsonc
|
|
157
|
-
{
|
|
158
|
-
"name": "My Project",
|
|
159
|
-
"entitiesDir": "./entities", // Default: ./entities
|
|
160
|
-
"functionsDir": "./functions", // Default: ./functions
|
|
161
|
-
"site": {
|
|
162
|
-
"outputDirectory": "../dist" // Path to built site files
|
|
163
|
-
}
|
|
164
|
-
}
|
|
165
|
-
```
|
|
166
|
-
|
|
167
|
-
### App Configuration
|
|
168
|
-
|
|
169
|
-
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`:
|
|
79
|
+
```bash
|
|
80
|
+
# Install skills for all supported agents
|
|
81
|
+
base44 create --name my-app --path ./my-app --skills
|
|
170
82
|
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
{
|
|
174
|
-
"id": "your-app-id"
|
|
175
|
-
}
|
|
83
|
+
# Skip skills installation
|
|
84
|
+
base44 create --name my-app --path ./my-app
|
|
176
85
|
```
|
|
177
86
|
|
|
178
|
-
|
|
87
|
+
**Manual installation:**
|
|
179
88
|
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
```
|
|
183
|
-
my-project/
|
|
184
|
-
├── base44/
|
|
185
|
-
│ ├── config.jsonc # Project configuration
|
|
186
|
-
│ ├── .app.jsonc # App ID (git-ignored)
|
|
187
|
-
│ ├── entities/ # Entity schema files
|
|
188
|
-
│ │ ├── user.jsonc
|
|
189
|
-
│ │ └── product.jsonc
|
|
190
|
-
│ └── functions/ # Backend functions
|
|
191
|
-
│ └── my-function/
|
|
192
|
-
│ ├── config.jsonc
|
|
193
|
-
│ └── index.js
|
|
194
|
-
├── src/ # Your frontend code
|
|
195
|
-
├── dist/ # Built site files (for deployment)
|
|
196
|
-
└── package.json
|
|
89
|
+
```bash
|
|
90
|
+
npx add-skill base44/skills
|
|
197
91
|
```
|
|
198
92
|
|
|
199
|
-
##
|
|
200
|
-
|
|
201
|
-
### Prerequisites
|
|
202
|
-
|
|
203
|
-
- Node.js >= 20.19.0
|
|
204
|
-
- npm
|
|
205
|
-
|
|
206
|
-
### Setup
|
|
93
|
+
## Help
|
|
207
94
|
|
|
208
95
|
```bash
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
cd cli
|
|
212
|
-
|
|
213
|
-
# Install dependencies
|
|
214
|
-
npm install
|
|
215
|
-
|
|
216
|
-
# Build
|
|
217
|
-
npm run build
|
|
218
|
-
|
|
219
|
-
# Run in development mode
|
|
220
|
-
npm run dev -- <command>
|
|
96
|
+
base44 --help
|
|
97
|
+
base44 <command> --help
|
|
221
98
|
```
|
|
222
99
|
|
|
223
|
-
|
|
100
|
+
## Version
|
|
224
101
|
|
|
225
102
|
```bash
|
|
226
|
-
|
|
227
|
-
npm run typecheck # Type check with tsc
|
|
228
|
-
npm run dev # Run in development mode with tsx
|
|
229
|
-
npm run lint # Lint with ESLint
|
|
230
|
-
npm test # Run tests with Vitest
|
|
103
|
+
base44 --version
|
|
231
104
|
```
|
|
232
105
|
|
|
233
|
-
|
|
106
|
+
## Alpha
|
|
234
107
|
|
|
235
|
-
|
|
236
|
-
# After building
|
|
237
|
-
npm start -- <command>
|
|
238
|
-
|
|
239
|
-
# Or directly
|
|
240
|
-
./dist/cli/index.js <command>
|
|
241
|
-
```
|
|
242
|
-
## Contributing
|
|
108
|
+
The CLI and Base44 backend service are currently in alpha. We're actively improving them based on user feedback. Share your thoughts and feature requests on our [GitHub Discussions](https://github.com/orgs/base44/discussions).
|
|
243
109
|
|
|
244
|
-
|
|
110
|
+
Found a bug? [Open an issue](https://github.com/base44/cli/issues).
|
|
245
111
|
|
|
246
112
|
## License
|
|
247
113
|
|
package/bin/dev.js
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
#!/usr/bin/env tsx
|
|
2
|
+
import { program, CLIExitError } from "../src/cli/index.ts";
|
|
3
|
+
|
|
4
|
+
try {
|
|
5
|
+
await program.parseAsync();
|
|
6
|
+
} catch (error) {
|
|
7
|
+
if (error instanceof CLIExitError) {
|
|
8
|
+
process.exit(error.code);
|
|
9
|
+
}
|
|
10
|
+
console.error(error);
|
|
11
|
+
process.exit(1);
|
|
12
|
+
}
|
package/bin/run.js
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { program, CLIExitError } from "../dist/index.js";
|
|
3
|
+
|
|
4
|
+
try {
|
|
5
|
+
await program.parseAsync();
|
|
6
|
+
} catch (error) {
|
|
7
|
+
if (error instanceof CLIExitError) {
|
|
8
|
+
process.exit(error.code);
|
|
9
|
+
}
|
|
10
|
+
console.error(error);
|
|
11
|
+
process.exit(1);
|
|
12
|
+
}
|