@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.
Files changed (28) hide show
  1. package/README.md +47 -156
  2. package/bin/dev.js +12 -0
  3. package/bin/run.js +12 -0
  4. package/dist/{cli/index.js → index.js} +4203 -3583
  5. package/package.json +7 -8
  6. /package/dist/{cli/templates → templates}/backend-and-client/.nvmrc +0 -0
  7. /package/dist/{cli/templates → templates}/backend-and-client/README.md +0 -0
  8. /package/dist/{cli/templates → templates}/backend-and-client/base44/app.jsonc.ejs +0 -0
  9. /package/dist/{cli/templates → templates}/backend-and-client/base44/config.jsonc.ejs +0 -0
  10. /package/dist/{cli/templates → templates}/backend-and-client/base44/entities/task.jsonc +0 -0
  11. /package/dist/{cli/templates → templates}/backend-and-client/components.json +0 -0
  12. /package/dist/{cli/templates → templates}/backend-and-client/index.html +0 -0
  13. /package/dist/{cli/templates → templates}/backend-and-client/jsconfig.json +0 -0
  14. /package/dist/{cli/templates → templates}/backend-and-client/package.json +0 -0
  15. /package/dist/{cli/templates → templates}/backend-and-client/postcss.config.js +0 -0
  16. /package/dist/{cli/templates → templates}/backend-and-client/src/App.jsx +0 -0
  17. /package/dist/{cli/templates → templates}/backend-and-client/src/api/base44Client.js.ejs +0 -0
  18. /package/dist/{cli/templates → templates}/backend-and-client/src/components/Base44Logo.jsx +0 -0
  19. /package/dist/{cli/templates → templates}/backend-and-client/src/components/ui/button.jsx +0 -0
  20. /package/dist/{cli/templates → templates}/backend-and-client/src/components/ui/checkbox.jsx +0 -0
  21. /package/dist/{cli/templates → templates}/backend-and-client/src/components/ui/input.jsx +0 -0
  22. /package/dist/{cli/templates → templates}/backend-and-client/src/index.css +0 -0
  23. /package/dist/{cli/templates → templates}/backend-and-client/src/main.jsx +0 -0
  24. /package/dist/{cli/templates → templates}/backend-and-client/tailwind.config.js +0 -0
  25. /package/dist/{cli/templates → templates}/backend-and-client/vite.config.js +0 -0
  26. /package/dist/{cli/templates → templates}/backend-only/base44/app.jsonc.ejs +0 -0
  27. /package/dist/{cli/templates → templates}/backend-only/base44/config.jsonc.ejs +0 -0
  28. /package/dist/{cli/templates → templates}/templates.json +0 -0
package/README.md CHANGED
@@ -1,193 +1,84 @@
1
1
  # Base44 CLI
2
2
 
3
- A unified command-line interface for managing Base44 applications, entities, functions, deployments, and related services.
3
+ Command-line interface for building applications with [Base44's backend service](https://docs.base44.com/developers/backend/overview/introduction).
4
4
 
5
- **Zero dependencies** - installs in seconds with no dependency resolution.
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
- ## Quick Start
19
+ Or run commands directly with npx:
18
20
 
19
21
  ```bash
20
- # 1. Login to Base44
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
- ## Commands
25
+ Requires Node.js 20.19.0 or higher.
32
26
 
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
50
-
51
- The `link` command supports both creating new projects and linking to existing ones:
27
+ ## Quick start
52
28
 
53
29
  ```bash
54
- # Interactive mode - choose to create new or link existing
55
- base44 link
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
- # Link to an existing project by ID (non-interactive)
61
- base44 link --existing <app-id>
33
+ # Create a project
34
+ base44 create
62
35
  ```
63
36
 
64
- | Option | Description |
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
- ### Deployment
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
- | 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 |
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 site deploy` | Deploy built site files to Base44 hosting |
94
-
95
- ## Configuration
96
-
97
- ### Project Configuration
98
-
99
- Base44 projects are configured via a `config.jsonc` (or `config.json`) file in the `base44/` subdirectory:
100
-
101
- ```jsonc
102
- // base44/config.jsonc
103
- {
104
- "name": "My Project",
105
- "entitiesDir": "./entities", // Default: ./entities
106
- "functionsDir": "./functions", // Default: ./functions
107
- "site": {
108
- "outputDirectory": "../dist" // Path to built site files
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
- # Clone the repository
156
- git clone https://github.com/base44/cli.git
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
- ### Available Scripts
71
+ ## Version
170
72
 
171
73
  ```bash
172
- npm run build # Build with tsdown
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
- ### Running the Built CLI
77
+ ## Alpha
180
78
 
181
- ```bash
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
- See [AGENTS.md](./AGENTS.md) for development guidelines and architecture documentation.
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
+ }