base44 0.0.1 → 0.0.2
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 +116 -42
- package/dist/cli/index.js +19303 -12
- package/dist/cli/templates/backend-and-client/README.md +41 -0
- package/dist/cli/templates/backend-and-client/base44/config.jsonc.ejs +17 -0
- package/dist/cli/templates/backend-and-client/base44/entities/task.jsonc +16 -0
- package/dist/cli/templates/backend-and-client/components.json +16 -0
- package/dist/cli/templates/backend-and-client/index.html +13 -0
- package/dist/cli/templates/backend-and-client/jsconfig.json +13 -0
- package/dist/cli/templates/backend-and-client/package.json +24 -0
- package/dist/cli/templates/backend-and-client/postcss.config.js +6 -0
- package/dist/cli/templates/backend-and-client/src/App.jsx +148 -0
- package/dist/cli/templates/backend-and-client/src/api/base44Client.js.ejs +5 -0
- package/dist/cli/templates/backend-and-client/src/components/Base44Logo.jsx +15 -0
- package/dist/cli/templates/backend-and-client/src/components/ui/button.jsx +23 -0
- package/dist/cli/templates/backend-and-client/src/components/ui/checkbox.jsx +20 -0
- package/dist/cli/templates/backend-and-client/src/components/ui/input.jsx +13 -0
- package/dist/cli/templates/backend-and-client/src/index.css +37 -0
- package/dist/cli/templates/backend-and-client/src/main.jsx +6 -0
- package/dist/cli/templates/backend-and-client/tailwind.config.js +41 -0
- package/dist/cli/templates/backend-and-client/vite.config.js +12 -0
- package/dist/cli/templates/backend-only/base44/.env.local.ejs +6 -0
- package/dist/cli/templates/backend-only/base44/config.jsonc.ejs +17 -0
- package/dist/cli/templates/templates.json +16 -0
- package/package.json +30 -15
- package/dist/cli/commands/auth/login.d.ts +0 -3
- package/dist/cli/commands/auth/login.d.ts.map +0 -1
- package/dist/cli/commands/auth/login.js +0 -25
- package/dist/cli/commands/auth/login.js.map +0 -1
- package/dist/cli/commands/auth/logout.d.ts +0 -3
- package/dist/cli/commands/auth/logout.d.ts.map +0 -1
- package/dist/cli/commands/auth/logout.js +0 -24
- package/dist/cli/commands/auth/logout.js.map +0 -1
- package/dist/cli/commands/auth/whoami.d.ts +0 -3
- package/dist/cli/commands/auth/whoami.d.ts.map +0 -1
- package/dist/cli/commands/auth/whoami.js +0 -24
- package/dist/cli/commands/auth/whoami.js.map +0 -1
- package/dist/cli/index.d.ts +0 -3
- package/dist/cli/index.d.ts.map +0 -1
- package/dist/cli/index.js.map +0 -1
- package/dist/cli/utils/index.d.ts +0 -3
- package/dist/cli/utils/index.d.ts.map +0 -1
- package/dist/cli/utils/index.js +0 -3
- package/dist/cli/utils/index.js.map +0 -1
- package/dist/cli/utils/packageVersion.d.ts +0 -2
- package/dist/cli/utils/packageVersion.d.ts.map +0 -1
- package/dist/cli/utils/packageVersion.js +0 -12
- package/dist/cli/utils/packageVersion.js.map +0 -1
- package/dist/cli/utils/runCommand.d.ts +0 -8
- package/dist/cli/utils/runCommand.d.ts.map +0 -1
- package/dist/cli/utils/runCommand.js +0 -14
- package/dist/cli/utils/runCommand.js.map +0 -1
- package/dist/core/config/auth.d.ts +0 -5
- package/dist/core/config/auth.d.ts.map +0 -1
- package/dist/core/config/auth.js +0 -47
- package/dist/core/config/auth.js.map +0 -1
- package/dist/core/config/constants.d.ts +0 -4
- package/dist/core/config/constants.d.ts.map +0 -1
- package/dist/core/config/constants.js +0 -6
- package/dist/core/config/constants.js.map +0 -1
- package/dist/core/config/index.d.ts +0 -3
- package/dist/core/config/index.d.ts.map +0 -1
- package/dist/core/config/index.js +0 -3
- package/dist/core/config/index.js.map +0 -1
- package/dist/core/index.d.ts +0 -4
- package/dist/core/index.d.ts.map +0 -1
- package/dist/core/index.js +0 -4
- package/dist/core/index.js.map +0 -1
- package/dist/core/schemas/auth.d.ts +0 -8
- package/dist/core/schemas/auth.d.ts.map +0 -1
- package/dist/core/schemas/auth.js +0 -7
- package/dist/core/schemas/auth.js.map +0 -1
- package/dist/core/schemas/index.d.ts +0 -2
- package/dist/core/schemas/index.d.ts.map +0 -1
- package/dist/core/schemas/index.js +0 -2
- package/dist/core/schemas/index.js.map +0 -1
- package/dist/core/utils/fs.d.ts +0 -5
- package/dist/core/utils/fs.d.ts.map +0 -1
- package/dist/core/utils/fs.js +0 -46
- package/dist/core/utils/fs.js.map +0 -1
- package/dist/core/utils/index.d.ts +0 -2
- package/dist/core/utils/index.d.ts.map +0 -1
- package/dist/core/utils/index.js +0 -2
- package/dist/core/utils/index.js.map +0 -1
package/README.md
CHANGED
|
@@ -2,71 +2,145 @@
|
|
|
2
2
|
|
|
3
3
|
A unified command-line interface for managing Base44 applications, entities, functions, deployments, and related services.
|
|
4
4
|
|
|
5
|
+
**Zero dependencies** - installs in seconds with no dependency resolution.
|
|
6
|
+
|
|
5
7
|
## Installation
|
|
6
8
|
|
|
7
9
|
```bash
|
|
8
|
-
# Using npm
|
|
9
|
-
npm install
|
|
10
|
-
|
|
11
|
-
# Build the project
|
|
12
|
-
npm run build
|
|
10
|
+
# Using npm (globally)
|
|
11
|
+
npm install -g base44
|
|
13
12
|
|
|
14
|
-
#
|
|
15
|
-
|
|
16
|
-
npm run base44 # Using npm (runs node_modules/.bin/base44)
|
|
17
|
-
./dist/cli/index.js # Run executable directly
|
|
13
|
+
# Or run directly with npx
|
|
14
|
+
npx base44 <command>
|
|
18
15
|
```
|
|
19
16
|
|
|
20
|
-
##
|
|
17
|
+
## Quick Start
|
|
21
18
|
|
|
22
19
|
```bash
|
|
23
|
-
#
|
|
24
|
-
|
|
20
|
+
# 1. Login to Base44
|
|
21
|
+
base44 login
|
|
25
22
|
|
|
26
|
-
#
|
|
27
|
-
|
|
23
|
+
# 2. Create a new project
|
|
24
|
+
base44 create
|
|
28
25
|
|
|
29
|
-
#
|
|
30
|
-
|
|
26
|
+
# 3. Push entities to Base44
|
|
27
|
+
base44 entities push
|
|
31
28
|
```
|
|
32
29
|
|
|
33
30
|
## Commands
|
|
34
31
|
|
|
35
32
|
### Authentication
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
33
|
+
|
|
34
|
+
| Command | Description |
|
|
35
|
+
|---------|-------------|
|
|
36
|
+
| `base44 login` | Authenticate with Base44 using device code flow |
|
|
37
|
+
| `base44 whoami` | Display current authenticated user |
|
|
38
|
+
| `base44 logout` | Logout from current device |
|
|
39
|
+
|
|
40
|
+
### Project Management
|
|
41
|
+
|
|
42
|
+
| Command | Description |
|
|
43
|
+
|---------|-------------|
|
|
44
|
+
| `base44 create` | Create a new Base44 project from a template |
|
|
45
|
+
|
|
46
|
+
### Entities
|
|
47
|
+
|
|
48
|
+
| Command | Description |
|
|
49
|
+
|---------|-------------|
|
|
50
|
+
| `base44 entities push` | Push local entity schemas to Base44 |
|
|
51
|
+
|
|
52
|
+
## Configuration
|
|
53
|
+
|
|
54
|
+
### Project Configuration
|
|
55
|
+
|
|
56
|
+
Base44 projects are configured via a `config.jsonc` (or `config.json`) file in the `base44/` subdirectory:
|
|
57
|
+
|
|
58
|
+
```jsonc
|
|
59
|
+
// base44/config.jsonc
|
|
60
|
+
{
|
|
61
|
+
"id": "your-app-id", // Set after project creation
|
|
62
|
+
"name": "My Project",
|
|
63
|
+
"entitiesDir": "./entities", // Default: ./entities
|
|
64
|
+
"functionsDir": "./functions" // Default: ./functions
|
|
65
|
+
}
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
### Environment Variables
|
|
69
|
+
|
|
70
|
+
| Variable | Description | Default |
|
|
71
|
+
|----------|-------------|---------|
|
|
72
|
+
| `BASE44_CLIENT_ID` | Your app ID | - |
|
|
73
|
+
|
|
74
|
+
You can set these in a `.env.local` file in your `base44/` directory:
|
|
75
|
+
|
|
76
|
+
```bash
|
|
77
|
+
# base44/.env.local
|
|
78
|
+
BASE44_CLIENT_ID=your-app-id
|
|
79
|
+
```
|
|
39
80
|
|
|
40
81
|
## Project Structure
|
|
41
82
|
|
|
83
|
+
A typical Base44 project has this structure:
|
|
84
|
+
|
|
42
85
|
```
|
|
43
|
-
|
|
44
|
-
├──
|
|
45
|
-
│ ├──
|
|
46
|
-
│
|
|
47
|
-
│
|
|
48
|
-
│ │ ├──
|
|
49
|
-
│ │
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
│ ├── commands/ # Command implementations
|
|
53
|
-
│ │ └── auth/ # Authentication commands
|
|
54
|
-
│ ├── utils/ # CLI-specific utilities
|
|
55
|
-
│ └── index.ts # Main CLI entry point (with shebang)
|
|
56
|
-
├── dist/ # Build output (compiled JavaScript)
|
|
57
|
-
├── package.json # Package configuration
|
|
58
|
-
├── tsconfig.json # TypeScript configuration
|
|
59
|
-
└── README.md
|
|
86
|
+
my-project/
|
|
87
|
+
├── base44/
|
|
88
|
+
│ ├── config.jsonc # Project configuration
|
|
89
|
+
│ ├── .env.local # Environment variables (git-ignored)
|
|
90
|
+
│ ├── entities/ # Entity schema files
|
|
91
|
+
│ │ ├── user.jsonc
|
|
92
|
+
│ │ └── product.jsonc
|
|
93
|
+
├── src/ # Your frontend code
|
|
94
|
+
└── package.json
|
|
60
95
|
```
|
|
61
96
|
|
|
62
|
-
##
|
|
97
|
+
## Development
|
|
98
|
+
|
|
99
|
+
### Prerequisites
|
|
100
|
+
|
|
101
|
+
- Node.js >= 20.19.0
|
|
102
|
+
- npm
|
|
103
|
+
|
|
104
|
+
### Setup
|
|
105
|
+
|
|
106
|
+
```bash
|
|
107
|
+
# Clone the repository
|
|
108
|
+
git clone https://github.com/base44/cli.git
|
|
109
|
+
cd cli
|
|
110
|
+
|
|
111
|
+
# Install dependencies
|
|
112
|
+
npm install
|
|
113
|
+
|
|
114
|
+
# Build
|
|
115
|
+
npm run build
|
|
116
|
+
|
|
117
|
+
# Run in development mode
|
|
118
|
+
npm run dev -- <command>
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
### Available Scripts
|
|
122
|
+
|
|
123
|
+
```bash
|
|
124
|
+
npm run build # Build with tsdown
|
|
125
|
+
npm run typecheck # Type check with tsc
|
|
126
|
+
npm run dev # Run in development mode with tsx
|
|
127
|
+
npm run lint # Lint with ESLint
|
|
128
|
+
npm test # Run tests with Vitest
|
|
129
|
+
```
|
|
63
130
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
131
|
+
### Running the Built CLI
|
|
132
|
+
|
|
133
|
+
```bash
|
|
134
|
+
# After building
|
|
135
|
+
npm start -- <command>
|
|
136
|
+
|
|
137
|
+
# Or directly
|
|
138
|
+
./dist/cli/index.js <command>
|
|
139
|
+
```
|
|
140
|
+
## Contributing
|
|
141
|
+
|
|
142
|
+
See [AGENTS.md](./AGENTS.md) for development guidelines and architecture documentation.
|
|
68
143
|
|
|
69
144
|
## License
|
|
70
145
|
|
|
71
146
|
ISC
|
|
72
|
-
|