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.
Files changed (83) hide show
  1. package/README.md +116 -42
  2. package/dist/cli/index.js +19303 -12
  3. package/dist/cli/templates/backend-and-client/README.md +41 -0
  4. package/dist/cli/templates/backend-and-client/base44/config.jsonc.ejs +17 -0
  5. package/dist/cli/templates/backend-and-client/base44/entities/task.jsonc +16 -0
  6. package/dist/cli/templates/backend-and-client/components.json +16 -0
  7. package/dist/cli/templates/backend-and-client/index.html +13 -0
  8. package/dist/cli/templates/backend-and-client/jsconfig.json +13 -0
  9. package/dist/cli/templates/backend-and-client/package.json +24 -0
  10. package/dist/cli/templates/backend-and-client/postcss.config.js +6 -0
  11. package/dist/cli/templates/backend-and-client/src/App.jsx +148 -0
  12. package/dist/cli/templates/backend-and-client/src/api/base44Client.js.ejs +5 -0
  13. package/dist/cli/templates/backend-and-client/src/components/Base44Logo.jsx +15 -0
  14. package/dist/cli/templates/backend-and-client/src/components/ui/button.jsx +23 -0
  15. package/dist/cli/templates/backend-and-client/src/components/ui/checkbox.jsx +20 -0
  16. package/dist/cli/templates/backend-and-client/src/components/ui/input.jsx +13 -0
  17. package/dist/cli/templates/backend-and-client/src/index.css +37 -0
  18. package/dist/cli/templates/backend-and-client/src/main.jsx +6 -0
  19. package/dist/cli/templates/backend-and-client/tailwind.config.js +41 -0
  20. package/dist/cli/templates/backend-and-client/vite.config.js +12 -0
  21. package/dist/cli/templates/backend-only/base44/.env.local.ejs +6 -0
  22. package/dist/cli/templates/backend-only/base44/config.jsonc.ejs +17 -0
  23. package/dist/cli/templates/templates.json +16 -0
  24. package/package.json +30 -15
  25. package/dist/cli/commands/auth/login.d.ts +0 -3
  26. package/dist/cli/commands/auth/login.d.ts.map +0 -1
  27. package/dist/cli/commands/auth/login.js +0 -25
  28. package/dist/cli/commands/auth/login.js.map +0 -1
  29. package/dist/cli/commands/auth/logout.d.ts +0 -3
  30. package/dist/cli/commands/auth/logout.d.ts.map +0 -1
  31. package/dist/cli/commands/auth/logout.js +0 -24
  32. package/dist/cli/commands/auth/logout.js.map +0 -1
  33. package/dist/cli/commands/auth/whoami.d.ts +0 -3
  34. package/dist/cli/commands/auth/whoami.d.ts.map +0 -1
  35. package/dist/cli/commands/auth/whoami.js +0 -24
  36. package/dist/cli/commands/auth/whoami.js.map +0 -1
  37. package/dist/cli/index.d.ts +0 -3
  38. package/dist/cli/index.d.ts.map +0 -1
  39. package/dist/cli/index.js.map +0 -1
  40. package/dist/cli/utils/index.d.ts +0 -3
  41. package/dist/cli/utils/index.d.ts.map +0 -1
  42. package/dist/cli/utils/index.js +0 -3
  43. package/dist/cli/utils/index.js.map +0 -1
  44. package/dist/cli/utils/packageVersion.d.ts +0 -2
  45. package/dist/cli/utils/packageVersion.d.ts.map +0 -1
  46. package/dist/cli/utils/packageVersion.js +0 -12
  47. package/dist/cli/utils/packageVersion.js.map +0 -1
  48. package/dist/cli/utils/runCommand.d.ts +0 -8
  49. package/dist/cli/utils/runCommand.d.ts.map +0 -1
  50. package/dist/cli/utils/runCommand.js +0 -14
  51. package/dist/cli/utils/runCommand.js.map +0 -1
  52. package/dist/core/config/auth.d.ts +0 -5
  53. package/dist/core/config/auth.d.ts.map +0 -1
  54. package/dist/core/config/auth.js +0 -47
  55. package/dist/core/config/auth.js.map +0 -1
  56. package/dist/core/config/constants.d.ts +0 -4
  57. package/dist/core/config/constants.d.ts.map +0 -1
  58. package/dist/core/config/constants.js +0 -6
  59. package/dist/core/config/constants.js.map +0 -1
  60. package/dist/core/config/index.d.ts +0 -3
  61. package/dist/core/config/index.d.ts.map +0 -1
  62. package/dist/core/config/index.js +0 -3
  63. package/dist/core/config/index.js.map +0 -1
  64. package/dist/core/index.d.ts +0 -4
  65. package/dist/core/index.d.ts.map +0 -1
  66. package/dist/core/index.js +0 -4
  67. package/dist/core/index.js.map +0 -1
  68. package/dist/core/schemas/auth.d.ts +0 -8
  69. package/dist/core/schemas/auth.d.ts.map +0 -1
  70. package/dist/core/schemas/auth.js +0 -7
  71. package/dist/core/schemas/auth.js.map +0 -1
  72. package/dist/core/schemas/index.d.ts +0 -2
  73. package/dist/core/schemas/index.d.ts.map +0 -1
  74. package/dist/core/schemas/index.js +0 -2
  75. package/dist/core/schemas/index.js.map +0 -1
  76. package/dist/core/utils/fs.d.ts +0 -5
  77. package/dist/core/utils/fs.d.ts.map +0 -1
  78. package/dist/core/utils/fs.js +0 -46
  79. package/dist/core/utils/fs.js.map +0 -1
  80. package/dist/core/utils/index.d.ts +0 -2
  81. package/dist/core/utils/index.d.ts.map +0 -1
  82. package/dist/core/utils/index.js +0 -2
  83. 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
- # Run the CLI (multiple ways)
15
- npm start # Using node directly
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
- ## Development
17
+ ## Quick Start
21
18
 
22
19
  ```bash
23
- # Run in development mode with watch
24
- npm run dev
20
+ # 1. Login to Base44
21
+ base44 login
25
22
 
26
- # Build the project
27
- npm run build
23
+ # 2. Create a new project
24
+ base44 create
28
25
 
29
- # Clean build artifacts
30
- npm run clean
26
+ # 3. Push entities to Base44
27
+ base44 entities push
31
28
  ```
32
29
 
33
30
  ## Commands
34
31
 
35
32
  ### Authentication
36
- - `base44 login` - Authenticate with Base44
37
- - `base44 whoami` - Display current authenticated user
38
- - `base44 logout` - Logout from current device
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
- cli/
44
- ├── src/
45
- │ ├── core/ # Core module (shared code)
46
- ├── api/ # API client code
47
- ├── config/ # Configuration management
48
- │ │ ├── schemas/ # Zod schemas
49
- │ │ ├── utils/ # Utility functions
50
- │ │ └── index.ts # Core module exports
51
- └── cli/ # CLI module (main CLI)
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
- ## Technologies
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
- - **TypeScript** - Primary language
65
- - **Commander.js** - CLI framework
66
- - **@clack/prompts** - Interactive user prompts
67
- - **Zod** - Schema validation
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
-