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
docs(devx): route the CLI scaffolder callout by artifact — plugin names two things
`content/docs/deployment/cli.mdx` carried a "Which scaffolder?" callout whose
only job is to choose for the reader, and it chose wrong: it sent anyone wanting
"a plugin skeleton" to `os init -t plugin`, which emits a METADATA plugin
(`objectstack compile`, `private: true`, declarative objects), while every page
under /docs/plugins teaches the KERNEL CODE plugin that `os create plugin` emits
(`tsc`, publishable, implements the `Plugin` contract with `init` / `destroy`).
The callout now routes by ARTIFACT rather than by command word, with a table
naming both artifacts, their commands, their build tool, whether they publish,
and the page to read next for each. A short paragraph on the same page records
WHY the two scaffolders are not merged (#15531: collapsing both under one word
would make the collision structural instead of documented), so the reason lives
in the docs and not only in the issue.
Docs only — no `packages/cli` change; a command-word rename is an interface
change that needs its own domain:cli card.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012zGPuVVX3deAx9LdjK8jCk
This scaffolds a working project with `objectstack.config.ts`, a sample object, and all dependencies installed — plus the AI skills bundle and an `AGENTS.md` for coding agents. (`os init` is the CLI's own scaffolder for plugin skeletons and bare configs — see [below](#os-init).)
29
+
This scaffolds a working project with `objectstack.config.ts`, a sample object, and all dependencies installed — plus the AI skills bundle and an `AGENTS.md` for coding agents. (`os init` is the CLI's own scaffolder for metadata-plugin skeletons and bare configs — see [below](#os-init).)
30
30
31
31
### Add more metadata
32
32
@@ -83,11 +83,35 @@ Scaffolds a new ObjectStack project with configuration, TypeScript setup, and in
83
83
> **Which scaffolder?** For a new app, prefer **`npm create objectstack@latest`** — it
84
84
> also derives your namespace, pins the framework packages to the current release, and
85
85
> installs the AI skills bundle + `AGENTS.md`. Reach for `os init` when you want a
86
-
> **plugin** skeleton or a **bare config** in an existing directory.
86
+
> **bare config** in an existing directory — or a **metadata plugin**, which is only one
87
+
> of the two different artifacts the word `plugin` names in this CLI.
88
+
89
+
**`plugin` names two artifacts. Route by the artifact you want, not by the word.**
90
+
91
+
| You want | Command | What it emits | Built by | Publishable? | Read next |
| A **metadata plugin** — declarative objects another stack loads, no kernel code |`os init <name> -t plugin`|`objectstack.config.ts` whose manifest declares `type: 'plugin'`, plus `src/objects/*.object.ts`|`objectstack compile` (its `build` script) |**No** — the emitted `package.json` is `private: true`|[`os init`](#os-init) below, and [Object Metadata](/docs/data-modeling/objects) for the objects it holds |
94
+
| A **kernel code plugin** — TypeScript implementing the kernel `Plugin` contract |`os create plugin <name>`|`src/index.ts` exporting a `Plugin` with `init` / `destroy`|`tsc` (its `build` script) |**Yes** — a publishable `@objectstack/plugin-<name>` package |[`os create`](#os-create) below, then [Plugin Anatomy](/docs/plugins/anatomy) and [Plugin Development](/docs/plugins/development)|
95
+
96
+
Every page under [Plugins & Packages](/docs/plugins) teaches the **kernel code** plugin, so
97
+
`os create plugin` is the scaffolder those pages mean — `os init -t plugin` will not give
98
+
you a `Plugin` to implement, and `os create plugin` will not give you declarative objects
99
+
to compile.
100
+
101
+
<Callouttype="info">
102
+
**Why the two scaffolders are deliberately separate.** Merging the `os init` and
103
+
`os create` command families was measured and ruled against in
104
+
[#15531](https://github.com/objectstack-ai/objectstack/issues/15531): the two commands
105
+
emit two different artifacts, so collapsing a metadata plugin and a kernel code plugin
106
+
under one command word would make this collision **structural** instead of merely
107
+
documented — teaching the wrong artifact to everyone, human or agent, who generates a
108
+
plugin from the CLI. The collision, and the misdirection this table replaces, are recorded
109
+
in [#15817](https://github.com/objectstack-ai/objectstack/issues/15817).
110
+
</Callout>
87
111
88
112
```bash
89
113
os init my-app # Create with default "app" template
90
-
os init my-plugin -t plugin # Create a plugin project
114
+
os init my-plugin -t plugin # Create a metadata plugin project
91
115
os init blank -t empty # Minimal config only
92
116
os init my-app --no-install # Skip dependency installation
0 commit comments