@base44-preview/cli 0.0.14-pr.92.59cf482 → 0.0.15-pr.93.4af3300
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 +42 -138
- package/dist/cli/index.js +7686 -7984
- package/dist/cli/templates/backend-and-client/base44/app.jsonc.ejs +9 -0
- package/dist/cli/templates/backend-only/base44/app.jsonc.ejs +9 -0
- package/package.json +2 -3
- package/dist/cli/templates/backend-and-client/base44/env.local.ejs +0 -9
- package/dist/cli/templates/backend-only/base44/env.local.ejs +0 -9
package/README.md
CHANGED
|
@@ -1,174 +1,78 @@
|
|
|
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
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
## Commands
|
|
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 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
|
|
68
|
-
|
|
69
|
-
| Command | Description |
|
|
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
|
-
"id": "your-app-id", // Set after project creation
|
|
83
|
-
"name": "My Project",
|
|
84
|
-
"entitiesDir": "./entities", // Default: ./entities
|
|
85
|
-
"functionsDir": "./functions", // Default: ./functions
|
|
86
|
-
"site": {
|
|
87
|
-
"outputDirectory": "../dist" // Path to built site files
|
|
88
|
-
}
|
|
89
|
-
}
|
|
22
|
+
npx base44 <command>
|
|
90
23
|
```
|
|
91
24
|
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
| Variable | Description | Default |
|
|
95
|
-
|----------|-------------|---------|
|
|
96
|
-
| `BASE44_CLIENT_ID` | Your app ID | - |
|
|
25
|
+
Requires Node.js 20.19.0 or higher.
|
|
97
26
|
|
|
98
|
-
|
|
27
|
+
## Quick start
|
|
99
28
|
|
|
100
29
|
```bash
|
|
101
|
-
#
|
|
102
|
-
|
|
103
|
-
```
|
|
104
|
-
|
|
105
|
-
## Project Structure
|
|
106
|
-
|
|
107
|
-
A typical Base44 project has this structure:
|
|
30
|
+
# Authenticate
|
|
31
|
+
base44 login
|
|
108
32
|
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
├── base44/
|
|
112
|
-
│ ├── config.jsonc # Project configuration
|
|
113
|
-
│ ├── .env.local # Environment variables (git-ignored)
|
|
114
|
-
│ ├── entities/ # Entity schema files
|
|
115
|
-
│ │ ├── user.jsonc
|
|
116
|
-
│ │ └── product.jsonc
|
|
117
|
-
│ └── functions/ # Backend functions
|
|
118
|
-
│ └── my-function/
|
|
119
|
-
│ ├── config.jsonc
|
|
120
|
-
│ └── index.js
|
|
121
|
-
├── src/ # Your frontend code
|
|
122
|
-
├── dist/ # Built site files (for deployment)
|
|
123
|
-
└── package.json
|
|
33
|
+
# Create a project
|
|
34
|
+
base44 create
|
|
124
35
|
```
|
|
125
36
|
|
|
126
|
-
|
|
37
|
+
The CLI will guide you through project setup. For step-by-step tutorials, see the quickstart guides:
|
|
127
38
|
|
|
128
|
-
|
|
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
|
|
129
41
|
|
|
130
|
-
|
|
131
|
-
- npm
|
|
42
|
+
## Commands
|
|
132
43
|
|
|
133
|
-
|
|
44
|
+
| Command | Description |
|
|
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
|
+
| [`eject`](https://docs.base44.com/developers/references/cli/commands/eject) | Create a Base44 backend project from an existing Base44 app |
|
|
49
|
+
| [`link`](https://docs.base44.com/developers/references/cli/commands/link) | Link a local project to a project on Base44 |
|
|
50
|
+
| [`dashboard`](https://docs.base44.com/developers/references/cli/commands/dashboard) | Open the app dashboard in your browser |
|
|
51
|
+
| [`login`](https://docs.base44.com/developers/references/cli/commands/login) | Authenticate with Base44 |
|
|
52
|
+
| [`logout`](https://docs.base44.com/developers/references/cli/commands/logout) | Sign out and clear stored credentials |
|
|
53
|
+
| [`whoami`](https://docs.base44.com/developers/references/cli/commands/whoami) | Display the current authenticated user |
|
|
54
|
+
| [`entities push`](https://docs.base44.com/developers/references/cli/commands/entities-push) | Push local entity schemas to Base44 |
|
|
55
|
+
| [`functions deploy`](https://docs.base44.com/developers/references/cli/commands/functions-deploy) | Deploy local functions to Base44 |
|
|
56
|
+
| [`site deploy`](https://docs.base44.com/developers/references/cli/commands/site-deploy) | Deploy built site files to Base44 hosting |
|
|
57
|
+
|
|
58
|
+
## Help
|
|
134
59
|
|
|
135
60
|
```bash
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
cd cli
|
|
139
|
-
|
|
140
|
-
# Install dependencies
|
|
141
|
-
npm install
|
|
142
|
-
|
|
143
|
-
# Build
|
|
144
|
-
npm run build
|
|
145
|
-
|
|
146
|
-
# Run in development mode
|
|
147
|
-
npm run dev -- <command>
|
|
61
|
+
base44 --help
|
|
62
|
+
base44 <command> --help
|
|
148
63
|
```
|
|
149
64
|
|
|
150
|
-
|
|
65
|
+
## Version
|
|
151
66
|
|
|
152
67
|
```bash
|
|
153
|
-
|
|
154
|
-
npm run typecheck # Type check with tsc
|
|
155
|
-
npm run dev # Run in development mode with tsx
|
|
156
|
-
npm run lint # Lint with ESLint
|
|
157
|
-
npm test # Run tests with Vitest
|
|
68
|
+
base44 --version
|
|
158
69
|
```
|
|
159
70
|
|
|
160
|
-
|
|
71
|
+
## Alpha
|
|
161
72
|
|
|
162
|
-
|
|
163
|
-
# After building
|
|
164
|
-
npm start -- <command>
|
|
165
|
-
|
|
166
|
-
# Or directly
|
|
167
|
-
./dist/cli/index.js <command>
|
|
168
|
-
```
|
|
169
|
-
## Contributing
|
|
73
|
+
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).
|
|
170
74
|
|
|
171
|
-
|
|
75
|
+
Found a bug? [Open an issue](https://github.com/base44/cli/issues).
|
|
172
76
|
|
|
173
77
|
## License
|
|
174
78
|
|