@objectstack/cli 1.0.11 → 1.1.0

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.
@@ -1,19 +1,24 @@
1
1
 
2
- > @objectstack/cli@1.0.11 build /home/runner/work/spec/spec/packages/cli
2
+ > @objectstack/cli@1.1.0 build /home/runner/work/spec/spec/packages/cli
3
3
  > tsup
4
4
 
5
- CLI Building entry: src/bin.ts, src/index.ts
5
+ CLI Building entry: src/bin.ts
6
+ CLI Using tsconfig: tsconfig.json
7
+ CLI tsup v8.5.1
8
+ CLI Using tsup config: /home/runner/work/spec/spec/packages/cli/tsup.config.ts
9
+ CLI Building entry: src/index.ts
6
10
  CLI Using tsconfig: tsconfig.json
7
11
  CLI tsup v8.5.1
8
12
  CLI Using tsup config: /home/runner/work/spec/spec/packages/cli/tsup.config.ts
9
13
  CLI Target: es2022
14
+ CLI Target: es2022
15
+ ESM Build start
10
16
  CLI Cleaning output folder
11
17
  ESM Build start
12
- ESM dist/bin.js 22.98 KB
13
- ESM dist/index.js 105.00 B
14
- ESM dist/chunk-2YXVEYO7.js 2.40 KB
15
- ESM ⚡️ Build success in 42ms
18
+ ESM dist/index.js 61.35 KB
19
+ ESM ⚡️ Build success in 69ms
20
+ ESM dist/bin.js 63.96 KB
21
+ ESM ⚡️ Build success in 68ms
16
22
  DTS Build start
17
- DTS ⚡️ Build success in 6657ms
18
- DTS dist/bin.d.ts 13.00 B
19
- DTS dist/index.d.ts 105.00 B
23
+ DTS ⚡️ Build success in 4303ms
24
+ DTS dist/index.d.ts 2.93 KB
package/CHANGELOG.md CHANGED
@@ -1,5 +1,18 @@
1
1
  # @objectstack/cli
2
2
 
3
+ ## 1.0.12
4
+
5
+ ### Patch Changes
6
+
7
+ - chore: add Vercel deployment configs, simplify console runtime configuration
8
+ - Updated dependencies
9
+ - @objectstack/spec@1.0.12
10
+ - @objectstack/core@1.0.12
11
+ - @objectstack/runtime@1.0.12
12
+ - @objectstack/objectql@1.0.12
13
+ - @objectstack/driver-memory@1.0.12
14
+ - @objectstack/plugin-hono-server@1.0.12
15
+
3
16
  ## 1.0.11
4
17
 
5
18
  ### Patch Changes
package/README.md CHANGED
@@ -1,24 +1,143 @@
1
1
  # @objectstack/cli
2
2
 
3
- Command Line Interface for developing ObjectStack applications.
3
+ Command Line Interface for building metadata-driven applications with the ObjectStack Protocol.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ pnpm add -D @objectstack/cli
9
+ ```
10
+
11
+ The CLI is available as `objectstack` or the shorter alias `os`.
12
+
13
+ ## Quick Start
14
+
15
+ ```bash
16
+ # Initialize a new project
17
+ os init my-app
18
+
19
+ # Generate metadata
20
+ os generate object task
21
+ os generate view task
22
+ os generate flow task
23
+
24
+ # Validate configuration
25
+ os validate
26
+
27
+ # Start development server
28
+ os dev
29
+
30
+ # Compile for production
31
+ os compile
32
+ ```
4
33
 
5
34
  ## Commands
6
35
 
7
- - **`os serve`**: Start the backend server.
8
- - Auto-detects configuration.
9
- - Auto-loads `ObjectQL` and `InMemoryDriver` if not specified.
10
- - **`os dev`**: Start in development mode (with watch).
11
- - **`os doctor`**: Check environment health.
12
- - **`os create`**: Scaffold new projects.
36
+ ### Development
37
+
38
+ | Command | Description |
39
+ |---------|-------------|
40
+ | `os init [name]` | Initialize a new ObjectStack project in the current directory |
41
+ | `os dev [package]` | Start development mode with hot reload |
42
+ | `os serve [config]` | Start the ObjectStack server with plugin auto-detection |
43
+
44
+ ### Build & Validate
45
+
46
+ | Command | Description |
47
+ |---------|-------------|
48
+ | `os compile [config]` | Compile configuration to a JSON artifact (`dist/objectstack.json`) |
49
+ | `os validate [config]` | Validate configuration against the ObjectStack Protocol schema |
50
+ | `os info [config]` | Display metadata summary (objects, fields, apps, agents, etc.) |
51
+
52
+ ### Scaffolding
53
+
54
+ | Command | Description |
55
+ |---------|-------------|
56
+ | `os generate <type> <name>` | Generate metadata files (alias: `os g`) |
57
+ | `os create <type> [name]` | Create a new package/plugin/example from template |
58
+
59
+ Available generate types: `object`, `view`, `action`, `flow`, `agent`, `dashboard`, `app`
60
+
61
+ ### Quality
62
+
63
+ | Command | Description |
64
+ |---------|-------------|
65
+ | `os test [files]` | Run Quality Protocol test scenarios against a running server |
66
+ | `os doctor` | Check development environment health |
13
67
 
14
68
  ## Configuration
15
69
 
16
- The CLI looks for `objectstack.config.ts` in the current directory.
70
+ The CLI looks for `objectstack.config.ts` (or `.js`, `.mjs`) in the current directory:
17
71
 
18
72
  ```typescript
19
- // objectstack.config.ts
20
- export default {
21
- metadata: { ... },
22
- plugins: [ ... ]
23
- }
73
+ import { defineStack } from '@objectstack/spec';
74
+ import * as objects from './src/objects';
75
+
76
+ export default defineStack({
77
+ manifest: {
78
+ id: 'com.example.my-app',
79
+ namespace: 'my_app',
80
+ version: '1.0.0',
81
+ type: 'app',
82
+ name: 'My App',
83
+ },
84
+ objects: Object.values(objects),
85
+ });
24
86
  ```
87
+
88
+ ## CLI Options
89
+
90
+ ### Global
91
+
92
+ - `-v, --version` — Show version number
93
+ - `-h, --help` — Show help
94
+
95
+ ### `os init`
96
+
97
+ - `-t, --template <template>` — Template: `app` (default), `plugin`, `empty`
98
+ - `--no-install` — Skip dependency installation
99
+
100
+ ### `os compile`
101
+
102
+ - `-o, --output <path>` — Output path (default: `dist/objectstack.json`)
103
+ - `--json` — Output compile result as JSON (for CI pipelines)
104
+
105
+ ### `os validate`
106
+
107
+ - `--strict` — Treat warnings as errors
108
+ - `--json` — Output result as JSON
109
+
110
+ ### `os serve`
111
+
112
+ - `-p, --port <port>` — Server port (default: `3000`)
113
+ - `--dev` — Run in development mode (load devPlugins, pretty logging)
114
+ - `--no-server` — Skip starting HTTP server plugin
115
+
116
+ ### `os generate`
117
+
118
+ - `-d, --dir <directory>` — Override target directory
119
+ - `--dry-run` — Preview without writing files
120
+
121
+ ### `os info`
122
+
123
+ - `--json` — Output as JSON
124
+
125
+ ### `os doctor`
126
+
127
+ - `-v, --verbose` — Show fix suggestions for warnings
128
+
129
+ ## Typical Workflow
130
+
131
+ ```
132
+ os init # 1. Create project
133
+ os generate object customer # 2. Add a Customer object
134
+ os generate object order # 3. Add an Order object
135
+ os generate view customer # 4. Add a list view
136
+ os validate # 5. Validate everything
137
+ os dev # 6. Start dev server
138
+ os compile # 7. Build for production
139
+ ```
140
+
141
+ ## License
142
+
143
+ Apache-2.0