@base44-preview/cli 0.0.16-pr.87.539c2ff → 0.0.17-pr.104.57e16fe
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 +47 -156
- package/bin/dev.js +12 -0
- package/bin/run.js +12 -0
- package/dist/{cli/index.js → index.js} +4203 -3583
- 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,193 +1,84 @@
|
|
|
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
|
-
|
|
25
|
+
Requires Node.js 20.19.0 or higher.
|
|
32
26
|
|
|
33
|
-
|
|
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
|
|
50
|
-
|
|
51
|
-
The `link` command supports both creating new projects and linking to existing ones:
|
|
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
|
-
| `-e, --existing <id>` | Link to an existing project by ID |
|
|
68
|
-
| `-n, --name <name>` | Project name (required with --create) |
|
|
69
|
-
| `-d, --description <desc>` | Project description (optional) |
|
|
37
|
+
The CLI will guide you through project setup. For step-by-step tutorials, see the quickstart guides:
|
|
70
38
|
|
|
71
|
-
|
|
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
|
|
72
41
|
|
|
73
|
-
|
|
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 |
|
|
82
|
-
|
|
83
|
-
### Functions
|
|
84
|
-
|
|
85
|
-
| Command | Description |
|
|
86
|
-
|---------|-------------|
|
|
87
|
-
| `base44 functions deploy` | Deploy local functions to Base44 |
|
|
88
|
-
|
|
89
|
-
### Site
|
|
42
|
+
## Commands
|
|
90
43
|
|
|
91
44
|
| Command | Description |
|
|
92
|
-
|
|
93
|
-
| `base44
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
### App Configuration
|
|
114
|
-
|
|
115
|
-
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`:
|
|
116
|
-
|
|
117
|
-
```jsonc
|
|
118
|
-
// base44/.app.jsonc
|
|
119
|
-
{
|
|
120
|
-
"id": "your-app-id"
|
|
121
|
-
}
|
|
122
|
-
```
|
|
123
|
-
|
|
124
|
-
## Project Structure
|
|
125
|
-
|
|
126
|
-
A typical Base44 project has this structure:
|
|
127
|
-
|
|
128
|
-
```
|
|
129
|
-
my-project/
|
|
130
|
-
├── base44/
|
|
131
|
-
│ ├── config.jsonc # Project configuration
|
|
132
|
-
│ ├── .app.jsonc # App ID (git-ignored)
|
|
133
|
-
│ ├── entities/ # Entity schema files
|
|
134
|
-
│ │ ├── user.jsonc
|
|
135
|
-
│ │ └── product.jsonc
|
|
136
|
-
│ └── functions/ # Backend functions
|
|
137
|
-
│ └── my-function/
|
|
138
|
-
│ ├── config.jsonc
|
|
139
|
-
│ └── index.js
|
|
140
|
-
├── src/ # Your frontend code
|
|
141
|
-
├── dist/ # Built site files (for deployment)
|
|
142
|
-
└── package.json
|
|
143
|
-
```
|
|
144
|
-
|
|
145
|
-
## Development
|
|
146
|
-
|
|
147
|
-
### Prerequisites
|
|
148
|
-
|
|
149
|
-
- Node.js >= 20.19.0
|
|
150
|
-
- npm
|
|
151
|
-
|
|
152
|
-
### Setup
|
|
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 |
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
<!--| [`eject`](https://docs.base44.com/developers/references/cli/commands/eject) | Create a Base44 backend project from an existing Base44 app | -->
|
|
63
|
+
|
|
64
|
+
## Help
|
|
153
65
|
|
|
154
66
|
```bash
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
cd cli
|
|
158
|
-
|
|
159
|
-
# Install dependencies
|
|
160
|
-
npm install
|
|
161
|
-
|
|
162
|
-
# Build
|
|
163
|
-
npm run build
|
|
164
|
-
|
|
165
|
-
# Run in development mode
|
|
166
|
-
npm run dev -- <command>
|
|
67
|
+
base44 --help
|
|
68
|
+
base44 <command> --help
|
|
167
69
|
```
|
|
168
70
|
|
|
169
|
-
|
|
71
|
+
## Version
|
|
170
72
|
|
|
171
73
|
```bash
|
|
172
|
-
|
|
173
|
-
npm run typecheck # Type check with tsc
|
|
174
|
-
npm run dev # Run in development mode with tsx
|
|
175
|
-
npm run lint # Lint with ESLint
|
|
176
|
-
npm test # Run tests with Vitest
|
|
74
|
+
base44 --version
|
|
177
75
|
```
|
|
178
76
|
|
|
179
|
-
|
|
77
|
+
## Alpha
|
|
180
78
|
|
|
181
|
-
|
|
182
|
-
# After building
|
|
183
|
-
npm start -- <command>
|
|
184
|
-
|
|
185
|
-
# Or directly
|
|
186
|
-
./dist/cli/index.js <command>
|
|
187
|
-
```
|
|
188
|
-
## Contributing
|
|
79
|
+
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).
|
|
189
80
|
|
|
190
|
-
|
|
81
|
+
Found a bug? [Open an issue](https://github.com/base44/cli/issues).
|
|
191
82
|
|
|
192
83
|
## License
|
|
193
84
|
|
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
|
+
}
|