@base44-preview/cli 0.0.1-pr.9.9888a05 → 0.0.2-pr.23.6657a26

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 (147) hide show
  1. package/README.md +121 -24
  2. package/dist/cli/index.js +19302 -14
  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 +19 -18
  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 -66
  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 -14
  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 -14
  36. package/dist/cli/commands/auth/whoami.js.map +0 -1
  37. package/dist/cli/commands/project/show-project.d.ts +0 -3
  38. package/dist/cli/commands/project/show-project.d.ts.map +0 -1
  39. package/dist/cli/commands/project/show-project.js +0 -20
  40. package/dist/cli/commands/project/show-project.js.map +0 -1
  41. package/dist/cli/index.d.ts +0 -3
  42. package/dist/cli/index.d.ts.map +0 -1
  43. package/dist/cli/index.js.map +0 -1
  44. package/dist/cli/utils/index.d.ts +0 -4
  45. package/dist/cli/utils/index.d.ts.map +0 -1
  46. package/dist/cli/utils/index.js +0 -4
  47. package/dist/cli/utils/index.js.map +0 -1
  48. package/dist/cli/utils/packageVersion.d.ts +0 -2
  49. package/dist/cli/utils/packageVersion.d.ts.map +0 -1
  50. package/dist/cli/utils/packageVersion.js +0 -12
  51. package/dist/cli/utils/packageVersion.js.map +0 -1
  52. package/dist/cli/utils/runCommand.d.ts +0 -8
  53. package/dist/cli/utils/runCommand.d.ts.map +0 -1
  54. package/dist/cli/utils/runCommand.js +0 -30
  55. package/dist/cli/utils/runCommand.js.map +0 -1
  56. package/dist/cli/utils/runTask.d.ts +0 -14
  57. package/dist/cli/utils/runTask.d.ts.map +0 -1
  58. package/dist/cli/utils/runTask.js +0 -24
  59. package/dist/cli/utils/runTask.js.map +0 -1
  60. package/dist/core/auth/api.d.ts +0 -4
  61. package/dist/core/auth/api.d.ts.map +0 -1
  62. package/dist/core/auth/api.js +0 -70
  63. package/dist/core/auth/api.js.map +0 -1
  64. package/dist/core/auth/config.d.ts +0 -5
  65. package/dist/core/auth/config.d.ts.map +0 -1
  66. package/dist/core/auth/config.js +0 -47
  67. package/dist/core/auth/config.js.map +0 -1
  68. package/dist/core/auth/index.d.ts +0 -4
  69. package/dist/core/auth/index.d.ts.map +0 -1
  70. package/dist/core/auth/index.js +0 -4
  71. package/dist/core/auth/index.js.map +0 -1
  72. package/dist/core/auth/schema.d.ts +0 -21
  73. package/dist/core/auth/schema.d.ts.map +0 -1
  74. package/dist/core/auth/schema.js +0 -20
  75. package/dist/core/auth/schema.js.map +0 -1
  76. package/dist/core/config/app.d.ts +0 -22
  77. package/dist/core/config/app.d.ts.map +0 -1
  78. package/dist/core/config/app.js +0 -14
  79. package/dist/core/config/app.js.map +0 -1
  80. package/dist/core/config/index.d.ts +0 -4
  81. package/dist/core/config/index.d.ts.map +0 -1
  82. package/dist/core/config/index.js +0 -3
  83. package/dist/core/config/index.js.map +0 -1
  84. package/dist/core/config/project.d.ts +0 -25
  85. package/dist/core/config/project.d.ts.map +0 -1
  86. package/dist/core/config/project.js +0 -62
  87. package/dist/core/config/project.js.map +0 -1
  88. package/dist/core/config/resource.d.ts +0 -4
  89. package/dist/core/config/resource.d.ts.map +0 -1
  90. package/dist/core/config/resource.js +0 -2
  91. package/dist/core/config/resource.js.map +0 -1
  92. package/dist/core/consts.d.ts +0 -6
  93. package/dist/core/consts.d.ts.map +0 -1
  94. package/dist/core/consts.js +0 -19
  95. package/dist/core/consts.js.map +0 -1
  96. package/dist/core/errors.d.ts +0 -15
  97. package/dist/core/errors.d.ts.map +0 -1
  98. package/dist/core/errors.js +0 -17
  99. package/dist/core/errors.js.map +0 -1
  100. package/dist/core/index.d.ts +0 -6
  101. package/dist/core/index.d.ts.map +0 -1
  102. package/dist/core/index.js +0 -6
  103. package/dist/core/index.js.map +0 -1
  104. package/dist/core/resources/entity/config.d.ts +0 -3
  105. package/dist/core/resources/entity/config.d.ts.map +0 -1
  106. package/dist/core/resources/entity/config.js +0 -25
  107. package/dist/core/resources/entity/config.js.map +0 -1
  108. package/dist/core/resources/entity/index.d.ts +0 -4
  109. package/dist/core/resources/entity/index.d.ts.map +0 -1
  110. package/dist/core/resources/entity/index.js +0 -4
  111. package/dist/core/resources/entity/index.js.map +0 -1
  112. package/dist/core/resources/entity/resource.d.ts +0 -4
  113. package/dist/core/resources/entity/resource.d.ts.map +0 -1
  114. package/dist/core/resources/entity/resource.js +0 -5
  115. package/dist/core/resources/entity/resource.js.map +0 -1
  116. package/dist/core/resources/entity/schema.d.ts +0 -47
  117. package/dist/core/resources/entity/schema.d.ts.map +0 -1
  118. package/dist/core/resources/entity/schema.js +0 -29
  119. package/dist/core/resources/entity/schema.js.map +0 -1
  120. package/dist/core/resources/function/config.d.ts +0 -4
  121. package/dist/core/resources/function/config.d.ts.map +0 -1
  122. package/dist/core/resources/function/config.js +0 -26
  123. package/dist/core/resources/function/config.js.map +0 -1
  124. package/dist/core/resources/function/index.d.ts +0 -4
  125. package/dist/core/resources/function/index.d.ts.map +0 -1
  126. package/dist/core/resources/function/index.js +0 -4
  127. package/dist/core/resources/function/index.js.map +0 -1
  128. package/dist/core/resources/function/resource.d.ts +0 -4
  129. package/dist/core/resources/function/resource.d.ts.map +0 -1
  130. package/dist/core/resources/function/resource.js +0 -5
  131. package/dist/core/resources/function/resource.js.map +0 -1
  132. package/dist/core/resources/function/schema.d.ts +0 -91
  133. package/dist/core/resources/function/schema.d.ts.map +0 -1
  134. package/dist/core/resources/function/schema.js +0 -36
  135. package/dist/core/resources/function/schema.js.map +0 -1
  136. package/dist/core/resources/index.d.ts +0 -3
  137. package/dist/core/resources/index.d.ts.map +0 -1
  138. package/dist/core/resources/index.js +0 -3
  139. package/dist/core/resources/index.js.map +0 -1
  140. package/dist/core/utils/fs.d.ts +0 -5
  141. package/dist/core/utils/fs.d.ts.map +0 -1
  142. package/dist/core/utils/fs.js +0 -56
  143. package/dist/core/utils/fs.js.map +0 -1
  144. package/dist/core/utils/index.d.ts +0 -2
  145. package/dist/core/utils/index.d.ts.map +0 -1
  146. package/dist/core/utils/index.js +0 -2
  147. package/dist/core/utils/index.js.map +0 -1
package/README.md CHANGED
@@ -2,48 +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
+ # Using npm (globally)
11
+ npm install -g base44
10
12
 
11
- # Build the project
12
- npm run build
13
+ # Or run directly with npx
14
+ npx base44 <command>
15
+ ```
16
+
17
+ ## Quick Start
18
+
19
+ ```bash
20
+ # 1. Login to Base44
21
+ base44 login
22
+
23
+ # 2. Create a new project
24
+ base44 create
25
+
26
+ # 3. Push entities to Base44
27
+ base44 entities push
28
+ ```
29
+
30
+ ## Commands
31
+
32
+ ### Authentication
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
+ ```
13
67
 
14
- # Run the CLI
15
- npm start # Using node directly
16
- ./dist/cli/index.js # Run executable directly
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
+ ```
80
+
81
+ ## Project Structure
82
+
83
+ A typical Base44 project has this structure:
84
+
85
+ ```
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
17
95
  ```
18
96
 
19
97
  ## Development
20
98
 
99
+ ### Prerequisites
100
+
101
+ - Node.js >= 20.19.0
102
+ - npm
103
+
104
+ ### Setup
105
+
21
106
  ```bash
22
- # Run in development mode
23
- npm run dev
107
+ # Clone the repository
108
+ git clone https://github.com/base44/cli.git
109
+ cd cli
24
110
 
25
- # Build the project
26
- npm run build
111
+ # Install dependencies
112
+ npm install
27
113
 
28
- # Run the built CLI
29
- npm run start
114
+ # Build
115
+ npm run build
30
116
 
31
- # Clean build artifacts
32
- npm run clean
117
+ # Run in development mode
118
+ npm run dev -- <command>
119
+ ```
33
120
 
34
- # Lint the code
35
- npm run lint
121
+ ### Available Scripts
36
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
37
129
  ```
38
130
 
39
- ## Commands
131
+ ### Running the Built CLI
40
132
 
41
- ### Authentication
133
+ ```bash
134
+ # After building
135
+ npm start -- <command>
136
+
137
+ # Or directly
138
+ ./dist/cli/index.js <command>
139
+ ```
140
+ ## Contributing
42
141
 
43
- - `base44 login` - Authenticate with Base44 using device code flow
44
- - `base44 whoami` - Display current authenticated user
45
- - `base44 logout` - Logout from current device
142
+ See [AGENTS.md](./AGENTS.md) for development guidelines and architecture documentation.
46
143
 
47
- ### Project
144
+ ## License
48
145
 
49
- - `base44 show-project` - Display project configuration, entities, and functions
146
+ ISC