Skip to content

Commit e2882f6

Browse files
Copilothotlong
andcommitted
docs: add objectstack CLI commands and kernel config documentation to README
Expand dev server section with: - Explicit objectstack serve --dev equivalence - objectstack.config.ts kernel config example - Table of available objectstack CLI commands Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
1 parent 3e9b590 commit e2882f6

1 file changed

Lines changed: 35 additions & 1 deletion

File tree

README.md

Lines changed: 35 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -377,9 +377,43 @@ If you fork or clone the repository to contribute or run examples from source:
377377
Start the full-stack development server with all plugins (ObjectQL + Security + GraphQL + OData + JSON-RPC):
378378
```bash
379379
pnpm dev
380+
# Equivalent to: objectstack serve --dev
380381
# Starts ObjectStack kernel at http://localhost:5050
381-
# Loads project-tracker example metadata
382+
# Loads project-tracker example metadata from objectstack.config.ts
382383
```
384+
385+
The dev server is powered by `@objectstack/cli` (v2.0.6). It reads `objectstack.config.ts` in the project root, which configures the kernel with all plugins:
386+
387+
```typescript
388+
// objectstack.config.ts
389+
export default {
390+
metadata: { name: 'objectos', version: '1.0.0' },
391+
objects: loadObjects(projectTrackerDir),
392+
plugins: [
393+
new HonoServerPlugin({ port: 5050 }),
394+
new ObjectQLPlugin({
395+
enableRepository: true,
396+
enableQueryService: true, // ← uses @objectql/plugin-query internally
397+
enableValidator: true,
398+
enableFormulas: true,
399+
datasources: { default: new MemoryDriver() }
400+
}),
401+
new ObjectQLSecurityPlugin({ enableAudit: false }),
402+
new GraphQLPlugin({ basePath: '/graphql' }),
403+
new ODataV4Plugin({ basePath: '/odata' }),
404+
new JSONRPCPlugin({ basePath: '/rpc' }),
405+
]
406+
};
407+
```
408+
409+
**Available `objectstack` CLI commands** (via `@objectstack/cli`):
410+
411+
| Command | Description |
412+
| :--- | :--- |
413+
| `objectstack serve --dev` | Start dev server (same as `pnpm dev`) |
414+
| `objectstack serve` | Start production server |
415+
| `objectstack create` | Scaffold a new project |
416+
| `objectstack doctor` | Diagnose environment issues |
383417

384418
4. **Run Tests**
385419
```bash

0 commit comments

Comments
 (0)