@base44-preview/cli 0.0.17-pr.104.e7dd3a1 → 0.0.17-pr.108.0a81bed

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 +142 -62
  2. package/dist/{index.js → cli/index.js} +8 -873
  3. package/package.json +8 -7
  4. package/bin/dev.js +0 -12
  5. package/bin/run.js +0 -12
  6. /package/dist/{templates → cli/templates}/backend-and-client/.nvmrc +0 -0
  7. /package/dist/{templates → cli/templates}/backend-and-client/README.md +0 -0
  8. /package/dist/{templates → cli/templates}/backend-and-client/base44/app.jsonc.ejs +0 -0
  9. /package/dist/{templates → cli/templates}/backend-and-client/base44/config.jsonc.ejs +0 -0
  10. /package/dist/{templates → cli/templates}/backend-and-client/base44/entities/task.jsonc +0 -0
  11. /package/dist/{templates → cli/templates}/backend-and-client/components.json +0 -0
  12. /package/dist/{templates → cli/templates}/backend-and-client/index.html +0 -0
  13. /package/dist/{templates → cli/templates}/backend-and-client/jsconfig.json +0 -0
  14. /package/dist/{templates → cli/templates}/backend-and-client/package.json +0 -0
  15. /package/dist/{templates → cli/templates}/backend-and-client/postcss.config.js +0 -0
  16. /package/dist/{templates → cli/templates}/backend-and-client/src/App.jsx +0 -0
  17. /package/dist/{templates → cli/templates}/backend-and-client/src/api/base44Client.js.ejs +0 -0
  18. /package/dist/{templates → cli/templates}/backend-and-client/src/components/Base44Logo.jsx +0 -0
  19. /package/dist/{templates → cli/templates}/backend-and-client/src/components/ui/button.jsx +0 -0
  20. /package/dist/{templates → cli/templates}/backend-and-client/src/components/ui/checkbox.jsx +0 -0
  21. /package/dist/{templates → cli/templates}/backend-and-client/src/components/ui/input.jsx +0 -0
  22. /package/dist/{templates → cli/templates}/backend-and-client/src/index.css +0 -0
  23. /package/dist/{templates → cli/templates}/backend-and-client/src/main.jsx +0 -0
  24. /package/dist/{templates → cli/templates}/backend-and-client/tailwind.config.js +0 -0
  25. /package/dist/{templates → cli/templates}/backend-and-client/vite.config.js +0 -0
  26. /package/dist/{templates → cli/templates}/backend-only/base44/app.jsonc.ejs +0 -0
  27. /package/dist/{templates → cli/templates}/backend-only/base44/config.jsonc.ejs +0 -0
  28. /package/dist/{templates → cli/templates}/templates.json +0 -0
package/README.md CHANGED
@@ -1,113 +1,193 @@
1
1
  # Base44 CLI
2
2
 
3
- Command-line interface for building applications with [Base44's backend service](https://docs.base44.com/developers/backend/overview/introduction).
3
+ A unified command-line interface for managing Base44 applications, entities, functions, deployments, and related services.
4
4
 
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).
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 commands directly with npx:
20
-
21
- ```bash
13
+ # Or run directly with npx
22
14
  npx base44 <command>
23
15
  ```
24
16
 
25
- Requires Node.js 20.19.0 or higher.
26
-
27
- ## Quick start
17
+ ## Quick Start
28
18
 
29
19
  ```bash
30
- # Authenticate
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
- The CLI will guide you through project setup. For step-by-step tutorials, see the quickstart guides:
31
+ ## Commands
38
32
 
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
33
+ ### Authentication
41
34
 
42
- ## Commands
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
43
42
 
44
43
  | 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
- | [`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 |
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 |
60
48
 
49
+ #### Link Command Options
61
50
 
62
- <!--| [`eject`](https://docs.base44.com/developers/references/cli/commands/eject) | Create a Base44 backend project from an existing Base44 app | -->
51
+ The `link` command supports both creating new projects and linking to existing ones:
63
52
 
64
- ## AI Agent Skills
53
+ ```bash
54
+ # Interactive mode - choose to create new or link existing
55
+ base44 link
65
56
 
66
- When creating a project, you'll be prompted to install AI agent skills for your preferred coding assistants:
57
+ # Create a new project (non-interactive)
58
+ base44 link --create --name "my-app" --description "My app description"
67
59
 
68
- ```
69
- ◆ Add AI agent skills? (Select agents to configure)
70
- │ ◼ Cursor
71
- │ ◼ Claude Code
72
-
60
+ # Link to an existing project by ID (non-interactive)
61
+ base44 link --projectId <app-id>
73
62
  ```
74
63
 
75
- This installs [base44/skills](https://github.com/base44/skills) which helps AI agents understand how to work with Base44 projects.
64
+ | Option | Description |
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) |
76
70
 
77
- **Non-interactive mode:**
71
+ ### Deployment
78
72
 
79
- ```bash
80
- # Install skills for all supported agents
81
- base44 create --name my-app --path ./my-app --skills
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
82
90
 
83
- # Skip skills installation
84
- base44 create --name my-app --path ./my-app
91
+ | 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
+ }
85
111
  ```
86
112
 
87
- **Manual installation:**
113
+ ### App Configuration
88
114
 
89
- ```bash
90
- npx add-skill base44/skills
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
+ }
91
122
  ```
92
123
 
93
- ## Help
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
94
153
 
95
154
  ```bash
96
- base44 --help
97
- base44 <command> --help
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>
98
167
  ```
99
168
 
100
- ## Version
169
+ ### Available Scripts
101
170
 
102
171
  ```bash
103
- base44 --version
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
104
177
  ```
105
178
 
106
- ## Alpha
179
+ ### Running the Built CLI
107
180
 
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).
181
+ ```bash
182
+ # After building
183
+ npm start -- <command>
184
+
185
+ # Or directly
186
+ ./dist/cli/index.js <command>
187
+ ```
188
+ ## Contributing
109
189
 
110
- Found a bug? [Open an issue](https://github.com/base44/cli/issues).
190
+ See [AGENTS.md](./AGENTS.md) for development guidelines and architecture documentation.
111
191
 
112
192
  ## License
113
193