You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|`--no-open`||`false`| Do not open the browser automatically. |
46
121
47
-
You must have an `objectql.config.ts` or `objectql.config.js` file in your project root that exports your configured `ObjectQL` instance (default export or named export `app`).
122
+
### 3.3 `repl` (Interactive Shell)
48
123
49
-
**Usage:**
124
+
Starts an interactive terminal similar to the MongoDB shell, allowing you to directly query your database using the ObjectQL API.
125
+
**Alias**: `r`
50
126
51
127
```bash
52
-
npx objectql repl
128
+
npx objectql repl [options]
53
129
```
54
130
55
-
**Features:**
56
-
***Auto-injected Objects:** All your registered objects are available as global variables (e.g., `await tasks.find()`).
57
-
***Context:** The `app` instance is available as `app`.
58
-
***Sudo Access:** Commands run with system privileges by default in the REPL.
131
+
**Options:**
132
+
133
+
| Option | Alias | Default | Description |
134
+
| :--- | :--- | :--- | :--- |
135
+
|`--config <path>`|`-c`| - | Path to `objectql.config.ts/js`. |
59
136
60
137
**Example Session:**
61
138
62
139
```javascript
63
140
objectql>awaittasks.find({ status:'todo' })
64
141
[ { id:1, title:'Fix bug', status:'todo' } ]
142
+
```
143
+
144
+
## 4. Internationalization (i18n)
145
+
146
+
Tools for managing translations.
147
+
148
+
### 4.1 `i18n extract`
65
149
66
-
objectql>awaitprojects.create({ name:'New API' })
67
-
{ id:10, name:'New API', ... }
150
+
Extract translatable strings from metadata files into JSON.
151
+
152
+
```bash
153
+
npx objectql i18n extract [options]
68
154
```
69
155
70
-
### 2.3 `studio` (Admin UI)
156
+
**Options:**
157
+
158
+
| Option | Alias | Default | Description |
159
+
| :--- | :--- | :--- | :--- |
160
+
|`--source <path>`|`-s`|`.`| Source directory to scan. |
161
+
|`--output <path>`|`-o`|`./src/i18n`| Output directory for translation files. |
162
+
|`--lang <lang>`|`-l`|`en`| Language code. |
71
163
72
-
Starts the web-based admin studio to browse data and view schema.
73
-
Requires `objectql.config.ts` (or `.js`) to be present in the directory.
164
+
### 4.2 `i18n init`
165
+
166
+
Initialize i18n structure for a new language.
167
+
168
+
```bash
169
+
npx objectql i18n init <lang> [options]
170
+
```
171
+
172
+
**Options:**
173
+
174
+
| Option | Alias | Default | Description |
175
+
| :--- | :--- | :--- | :--- |
176
+
|`--base-dir <path>`|`-b`|`./src/i18n`| Base i18n directory. |
177
+
178
+
### 4.3 `i18n validate`
179
+
180
+
Validate translation completeness against a base language.
181
+
182
+
```bash
183
+
npx objectql i18n validate <lang> [options]
184
+
```
185
+
186
+
**Options:**
187
+
188
+
| Option | Alias | Default | Description |
189
+
| :--- | :--- | :--- | :--- |
190
+
|`--base-dir <path>`|`-b`|`./src/i18n`| Base i18n directory. |
191
+
|`--base-lang <lang>`||`en`| Base language to compare against. |
192
+
193
+
## 5. Database Migration
194
+
195
+
Manage database schema changes.
196
+
197
+
### 5.1 `migrate`
198
+
199
+
Run pending database migrations.
200
+
201
+
```bash
202
+
npx objectql migrate [options]
203
+
```
204
+
205
+
**Options:**
206
+
207
+
| Option | Alias | Default | Description |
208
+
| :--- | :--- | :--- | :--- |
209
+
|`--config <path>`|`-c`| - | Path to `objectql.config.ts/js`. |
0 commit comments