@kitsy/cnos-docs 1.3.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.
Files changed (48) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +10 -0
  3. package/assets/images/README.md +3 -0
  4. package/docs/api/browser.mdx +14 -0
  5. package/docs/api/create-cnos.mdx +15 -0
  6. package/docs/api/index.mdx +12 -0
  7. package/docs/api/runtime.mdx +16 -0
  8. package/docs/api/types.mdx +13 -0
  9. package/docs/cli/codegen.mdx +12 -0
  10. package/docs/cli/diff.mdx +11 -0
  11. package/docs/cli/doctor.mdx +11 -0
  12. package/docs/cli/drift.mdx +11 -0
  13. package/docs/cli/dump.mdx +11 -0
  14. package/docs/cli/export.mdx +12 -0
  15. package/docs/cli/index.mdx +15 -0
  16. package/docs/cli/init.mdx +11 -0
  17. package/docs/cli/inspect.mdx +11 -0
  18. package/docs/cli/migrate.mdx +12 -0
  19. package/docs/cli/promote.mdx +11 -0
  20. package/docs/cli/read.mdx +11 -0
  21. package/docs/cli/run.mdx +14 -0
  22. package/docs/cli/secret.mdx +13 -0
  23. package/docs/cli/validate.mdx +11 -0
  24. package/docs/cli/value.mdx +13 -0
  25. package/docs/cli/vault.mdx +14 -0
  26. package/docs/cli/watch.mdx +11 -0
  27. package/docs/concepts/config-spectrum.mdx +15 -0
  28. package/docs/concepts/how-it-works.mdx +13 -0
  29. package/docs/getting-started/index.mdx +25 -0
  30. package/docs/getting-started/installation.mdx +31 -0
  31. package/docs/getting-started/quick-start.mdx +32 -0
  32. package/docs/getting-started/your-first-project.mdx +35 -0
  33. package/docs/guides/backend.mdx +29 -0
  34. package/docs/guides/ci-cd.mdx +21 -0
  35. package/docs/guides/frontend-next.mdx +14 -0
  36. package/docs/guides/frontend-vite.mdx +34 -0
  37. package/docs/guides/migration.mdx +21 -0
  38. package/docs/guides/profiles.mdx +15 -0
  39. package/docs/guides/secrets.mdx +27 -0
  40. package/docs/guides/ssr.mdx +14 -0
  41. package/docs/guides/workspaces.mdx +22 -0
  42. package/docs/index.mdx +18 -0
  43. package/docs/reference/manifest.mdx +19 -0
  44. package/docs/reference/namespaces.mdx +17 -0
  45. package/docs/reference/resolution.mdx +16 -0
  46. package/docs/reference/security.mdx +14 -0
  47. package/manifest.yml +111 -0
  48. package/package.json +34 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 kitsy
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,10 @@
1
+ # @kitsy/cnos-docs
2
+
3
+ Source-of-truth documentation content for CNOS.
4
+
5
+ This package is framework-agnostic content intended to be consumed by Astro Starlight or any other static documentation builder that can read Markdown/MDX plus a navigation manifest.
6
+
7
+ Exports:
8
+ - `@kitsy/cnos-docs/manifest`
9
+ - `@kitsy/cnos-docs/docs/*`
10
+ - `@kitsy/cnos-docs/assets/*`
@@ -0,0 +1,3 @@
1
+ # Images
2
+
3
+ Place architecture diagrams, screenshots, and other rendered assets here.
@@ -0,0 +1,14 @@
1
+ ---
2
+ title: Browser Runtime
3
+ description: Read promoted public values from browser bundles.
4
+ ---
5
+
6
+ # Browser Runtime
7
+
8
+ ```ts
9
+ import cnos from '@kitsy/cnos/browser';
10
+
11
+ console.log(cnos('public.app.apiBaseUrl'));
12
+ ```
13
+
14
+ Only promoted browser-safe values are available here.
@@ -0,0 +1,15 @@
1
+ ---
2
+ title: createCnos()
3
+ description: Explicitly create a CNOS runtime with options and plugins.
4
+ ---
5
+
6
+ # createCnos()
7
+
8
+ ```ts
9
+ import { createCnos } from '@kitsy/cnos/configure';
10
+
11
+ const runtime = await createCnos({
12
+ workspace: 'api',
13
+ profile: 'stage',
14
+ });
15
+ ```
@@ -0,0 +1,12 @@
1
+ ---
2
+ title: API Reference
3
+ description: Overview of the CNOS runtime and explicit configuration surfaces.
4
+ ---
5
+
6
+ # API Reference
7
+
8
+ Use:
9
+
10
+ - `@kitsy/cnos` for the default singleton runtime
11
+ - `@kitsy/cnos/configure` for `createCnos()`
12
+ - `@kitsy/cnos/browser` for browser-safe promoted values
@@ -0,0 +1,16 @@
1
+ ---
2
+ title: Singleton Runtime
3
+ description: Use the default CNOS runtime singleton from the root package.
4
+ ---
5
+
6
+ # Singleton Runtime
7
+
8
+ ```ts
9
+ import cnos from '@kitsy/cnos';
10
+
11
+ await cnos.ready();
12
+
13
+ cnos('value.app.name');
14
+ cnos.value('app.name');
15
+ cnos.secret('app.token');
16
+ ```
@@ -0,0 +1,13 @@
1
+ ---
2
+ title: Types
3
+ description: Core CNOS TypeScript types and generated wrappers.
4
+ ---
5
+
6
+ # Types
7
+
8
+ CNOS exposes:
9
+
10
+ - `CnosRuntime`
11
+ - `CnosCreateOptions`
12
+ - `LogicalKey`
13
+ - generated schema wrappers through `cnos codegen`
@@ -0,0 +1,12 @@
1
+ ---
2
+ title: cnos codegen
3
+ description: Generate typed CNOS wrappers from schema.
4
+ ---
5
+
6
+ # cnos codegen
7
+
8
+ ```bash
9
+ cnos codegen
10
+ cnos codegen --out src/cnos-config.d.ts
11
+ cnos codegen --watch
12
+ ```
@@ -0,0 +1,11 @@
1
+ ---
2
+ title: cnos diff
3
+ description: Compare resolved config across profiles or workspaces.
4
+ ---
5
+
6
+ # cnos diff
7
+
8
+ ```bash
9
+ cnos diff base stage
10
+ cnos diff --workspace api --profile base --other-profile stage
11
+ ```
@@ -0,0 +1,11 @@
1
+ ---
2
+ title: cnos doctor
3
+ description: Run diagnostics across workspaces, exports, and security rules.
4
+ ---
5
+
6
+ # cnos doctor
7
+
8
+ ```bash
9
+ cnos doctor
10
+ cnos doctor --json
11
+ ```
@@ -0,0 +1,11 @@
1
+ ---
2
+ title: cnos drift
3
+ description: Compare schema expectations against the resolved graph.
4
+ ---
5
+
6
+ # cnos drift
7
+
8
+ ```bash
9
+ cnos drift
10
+ cnos drift --json
11
+ ```
@@ -0,0 +1,11 @@
1
+ ---
2
+ title: cnos dump
3
+ description: Materialize the selected CNOS state into deterministic files.
4
+ ---
5
+
6
+ # cnos dump
7
+
8
+ ```bash
9
+ cnos dump --to ./.cnos-out
10
+ cnos dump --flatten --to ./.cnos-out
11
+ ```
@@ -0,0 +1,12 @@
1
+ ---
2
+ title: cnos export
3
+ description: Export explicit env mappings and public projections.
4
+ ---
5
+
6
+ # cnos export
7
+
8
+ ```bash
9
+ cnos export env
10
+ cnos export env --to .env.local
11
+ cnos export env --public --framework vite --to .env.local
12
+ ```
@@ -0,0 +1,15 @@
1
+ ---
2
+ title: CLI Reference
3
+ description: Overview of the CNOS CLI surface and command groups.
4
+ ---
5
+
6
+ # CLI Reference
7
+
8
+ The CLI is organized around:
9
+
10
+ - setup: `init`, `onboard`, `use`, `profile`
11
+ - data operations: `read`, `value`, `secret`, `promote`
12
+ - workflows: `run`, `export`, `dump`, `diff`, `doctor`
13
+ - advanced tooling: `codegen`, `watch`, `migrate`, `drift`, `vault`
14
+
15
+ See the individual command pages in this section.
@@ -0,0 +1,11 @@
1
+ ---
2
+ title: cnos init
3
+ description: Scaffold a CNOS project structure in the current repo.
4
+ ---
5
+
6
+ # cnos init
7
+
8
+ ```bash
9
+ cnos init
10
+ cnos init --workspace api
11
+ ```
@@ -0,0 +1,11 @@
1
+ ---
2
+ title: cnos inspect
3
+ description: Inspect resolved values, provenance, and overrides.
4
+ ---
5
+
6
+ # cnos inspect
7
+
8
+ ```bash
9
+ cnos inspect value.app.name
10
+ cnos inspect secret.app.token --reveal
11
+ ```
@@ -0,0 +1,12 @@
1
+ ---
2
+ title: cnos migrate
3
+ description: Discover existing env usage and map it into CNOS.
4
+ ---
5
+
6
+ # cnos migrate
7
+
8
+ ```bash
9
+ cnos migrate --scan src --dry-run
10
+ cnos migrate --apply
11
+ cnos migrate --apply --rewrite
12
+ ```
@@ -0,0 +1,11 @@
1
+ ---
2
+ title: cnos promote
3
+ description: Promote shareable values into public or env export surfaces.
4
+ ---
5
+
6
+ # cnos promote
7
+
8
+ ```bash
9
+ cnos promote value.flag.auth.upi_enabled --to public
10
+ cnos promote value.server.port --to env --as PORT
11
+ ```
@@ -0,0 +1,11 @@
1
+ ---
2
+ title: cnos read
3
+ description: Read a fully-qualified logical key.
4
+ ---
5
+
6
+ # cnos read
7
+
8
+ ```bash
9
+ cnos read value.app.name
10
+ cnos read secret.app.token
11
+ ```
@@ -0,0 +1,14 @@
1
+ ---
2
+ title: cnos run
3
+ description: Start a process with CNOS-injected env and runtime bootstrap data.
4
+ ---
5
+
6
+ # cnos run
7
+
8
+ `run` is the lowest-friction adoption path for most teams.
9
+
10
+ ```bash
11
+ cnos run -- node server.js
12
+ cnos run --profile stage -- pnpm build
13
+ cnos run --auth -- node server.js
14
+ ```
@@ -0,0 +1,13 @@
1
+ ---
2
+ title: cnos secret
3
+ description: Set, get, list, and delete secrets through configured vaults.
4
+ ---
5
+
6
+ # cnos secret
7
+
8
+ ```bash
9
+ cnos secret set app.token super-secret --vault default
10
+ cnos secret get app.token --vault default --reveal
11
+ cnos secret list
12
+ cnos secret delete app.token
13
+ ```
@@ -0,0 +1,11 @@
1
+ ---
2
+ title: cnos validate
3
+ description: Validate the resolved graph against schema and safety rules.
4
+ ---
5
+
6
+ # cnos validate
7
+
8
+ ```bash
9
+ cnos validate
10
+ cnos validate --profile stage
11
+ ```
@@ -0,0 +1,13 @@
1
+ ---
2
+ title: cnos value
3
+ description: Set, get, list, and delete value entries.
4
+ ---
5
+
6
+ # cnos value
7
+
8
+ ```bash
9
+ cnos value set app.name demo
10
+ cnos value get app.name
11
+ cnos value list --prefix app.
12
+ cnos value delete app.name
13
+ ```
@@ -0,0 +1,14 @@
1
+ ---
2
+ title: cnos vault
3
+ description: Manage vault definitions and auth sessions.
4
+ ---
5
+
6
+ # cnos vault
7
+
8
+ ```bash
9
+ cnos vault create default
10
+ cnos vault auth default
11
+ cnos vault list
12
+ cnos vault logout default
13
+ cnos vault remove default
14
+ ```
@@ -0,0 +1,11 @@
1
+ ---
2
+ title: cnos watch
3
+ description: Watch config changes and emit signals or restart processes.
4
+ ---
5
+
6
+ # cnos watch
7
+
8
+ ```bash
9
+ cnos watch -- node server.js
10
+ cnos watch --signal
11
+ ```
@@ -0,0 +1,15 @@
1
+ ---
2
+ title: The Config Spectrum
3
+ description: Position CNOS between flat .env files and platform-specific config systems.
4
+ ---
5
+
6
+ # The Config Spectrum
7
+
8
+ CNOS is meant to cover:
9
+
10
+ - simple single-project `.env` use
11
+ - structured app/server config
12
+ - multi-workspace monorepos
13
+ - CI/CD env bridges
14
+ - browser-safe public projection
15
+ - secure secret refs and vault-backed resolution
@@ -0,0 +1,13 @@
1
+ ---
2
+ title: How CNOS Works
3
+ description: Mental model for how sources become a resolved graph and then user-facing surfaces.
4
+ ---
5
+
6
+ # How CNOS Works
7
+
8
+ Conceptually:
9
+
10
+ 1. CNOS discovers the repo and workspace context.
11
+ 2. Loaders contribute entries from files, env, args, and vault-backed refs.
12
+ 3. CNOS resolves one winning graph.
13
+ 4. The graph is exposed through runtime APIs, CLI inspection, env export, and browser projection.
@@ -0,0 +1,25 @@
1
+ ---
2
+ title: Getting Started
3
+ description: Learn the main CNOS concepts and the recommended first steps.
4
+ ---
5
+
6
+ # Getting Started
7
+
8
+ CNOS has three primary surfaces:
9
+
10
+ - `@kitsy/cnos` for the default runtime singleton
11
+ - `@kitsy/cnos/configure` for explicit runtime creation
12
+ - `@kitsy/cnos-cli` for project setup, inspection, export, and workflow commands
13
+
14
+ Recommended path:
15
+
16
+ 1. Install the CLI and runtime.
17
+ 2. Run `cnos init`.
18
+ 3. Define a few values.
19
+ 4. Use `cnos run` or import `cnos` in app code.
20
+
21
+ Continue with:
22
+
23
+ - [Installation](./installation.mdx)
24
+ - [Quick Start](./quick-start.mdx)
25
+ - [Your First Project](./your-first-project.mdx)
@@ -0,0 +1,31 @@
1
+ ---
2
+ title: Installation
3
+ description: Install CNOS packages for local development, app code, and framework integrations.
4
+ ---
5
+
6
+ # Installation
7
+
8
+ Global CLI:
9
+
10
+ ```bash
11
+ npm install -g @kitsy/cnos-cli
12
+ cnos --version
13
+ ```
14
+
15
+ Runtime in an app:
16
+
17
+ ```bash
18
+ npm install @kitsy/cnos
19
+ ```
20
+
21
+ Vite:
22
+
23
+ ```bash
24
+ npm install @kitsy/cnos @kitsy/cnos-vite
25
+ ```
26
+
27
+ Next.js:
28
+
29
+ ```bash
30
+ npm install @kitsy/cnos @kitsy/cnos-next
31
+ ```
@@ -0,0 +1,32 @@
1
+ ---
2
+ title: Quick Start
3
+ description: Go from zero to a running CNOS-backed project in a few minutes.
4
+ ---
5
+
6
+ # Quick Start
7
+
8
+ ```bash
9
+ cnos init
10
+ cnos value set app.name demo
11
+ cnos value set server.port 3000
12
+ cnos read value.app.name
13
+ cnos run -- node server.js
14
+ ```
15
+
16
+ In app code:
17
+
18
+ ```ts
19
+ import cnos from '@kitsy/cnos';
20
+
21
+ await cnos.ready();
22
+ console.log(cnos('value.app.name'));
23
+ ```
24
+
25
+ For explicit creation:
26
+
27
+ ```ts
28
+ import { createCnos } from '@kitsy/cnos/configure';
29
+
30
+ const runtime = await createCnos();
31
+ console.log(runtime.value('app.name'));
32
+ ```
@@ -0,0 +1,35 @@
1
+ ---
2
+ title: Your First Project
3
+ description: Set up a simple CNOS project with values, a profile, and a local vault.
4
+ ---
5
+
6
+ # Your First Project
7
+
8
+ Create the project structure:
9
+
10
+ ```bash
11
+ cnos init
12
+ cnos doctor
13
+ ```
14
+
15
+ Add values:
16
+
17
+ ```bash
18
+ cnos value set app.name my-service
19
+ cnos value set server.port 3000
20
+ ```
21
+
22
+ Create a profile:
23
+
24
+ ```bash
25
+ cnos profile create stage --inherit base
26
+ cnos use --profile stage
27
+ ```
28
+
29
+ Create a local vault and authenticate it:
30
+
31
+ ```bash
32
+ cnos vault create default
33
+ cnos vault auth default
34
+ cnos secret set app.token super-secret --vault default
35
+ ```
@@ -0,0 +1,29 @@
1
+ ---
2
+ title: Backend Projects
3
+ description: Use CNOS in pure backend services, workers, and APIs.
4
+ ---
5
+
6
+ # Backend Projects
7
+
8
+ Backend projects usually use one of two patterns:
9
+
10
+ - `cnos run -- <command>` for zero-code-change adoption
11
+ - `import cnos from '@kitsy/cnos'` for direct runtime reads
12
+
13
+ Example:
14
+
15
+ ```ts
16
+ import cnos from '@kitsy/cnos';
17
+
18
+ await cnos.ready();
19
+
20
+ const port = cnos.value('server.port');
21
+ const token = cnos.secret('app.token');
22
+ ```
23
+
24
+ Env export bridge:
25
+
26
+ ```bash
27
+ cnos export env --to .env.local
28
+ cnos export env --profile stage --to .env.stage
29
+ ```
@@ -0,0 +1,21 @@
1
+ ---
2
+ title: CI/CD Pipelines
3
+ description: Use CNOS in build and deploy pipelines without committing generated env files.
4
+ ---
5
+
6
+ # CI/CD Pipelines
7
+
8
+ Common patterns:
9
+
10
+ ```bash
11
+ cnos export env --profile stage --to .env.stage
12
+ cnos export env --public --framework vite --profile stage --to .env.stage
13
+ cnos run --profile stage -- pnpm build
14
+ ```
15
+
16
+ For CI-backed vaults:
17
+
18
+ ```bash
19
+ cnos vault create github-ci --provider github-secrets --no-passphrase
20
+ cnos secret set app.token APP_TOKEN --vault github-ci
21
+ ```
@@ -0,0 +1,14 @@
1
+ ---
2
+ title: Frontend with Next.js
3
+ description: Use CNOS public projection with Next.js builds and browser-safe runtime reads.
4
+ ---
5
+
6
+ # Frontend with Next.js
7
+
8
+ ```ts
9
+ import { withCnosNext } from '@kitsy/cnos-next';
10
+
11
+ export default withCnosNext({});
12
+ ```
13
+
14
+ Browser-safe values remain under `public.promote` and are exposed as `NEXT_PUBLIC_*` plus browser-runtime data for `@kitsy/cnos/browser`.
@@ -0,0 +1,34 @@
1
+ ---
2
+ title: Frontend with Vite
3
+ description: Project browser-safe CNOS values into Vite and use the browser runtime.
4
+ ---
5
+
6
+ # Frontend with Vite
7
+
8
+ Promote browser-safe values:
9
+
10
+ ```yaml
11
+ public:
12
+ promote:
13
+ - value.app.apiBaseUrl
14
+ ```
15
+
16
+ Use the Vite plugin:
17
+
18
+ ```ts
19
+ import { defineConfig } from 'vite';
20
+ import { createCnosVitePlugin } from '@kitsy/cnos-vite';
21
+
22
+ export default defineConfig({
23
+ plugins: [createCnosVitePlugin()],
24
+ });
25
+ ```
26
+
27
+ Read in client code:
28
+
29
+ ```ts
30
+ import cnos from '@kitsy/cnos/browser';
31
+
32
+ console.log(cnos('public.app.apiBaseUrl'));
33
+ console.log(import.meta.env.VITE_APP_API_BASE_URL);
34
+ ```
@@ -0,0 +1,21 @@
1
+ ---
2
+ title: Migrating from .env
3
+ description: Move existing env-based projects onto CNOS without losing current workflows.
4
+ ---
5
+
6
+ # Migrating from .env
7
+
8
+ Use the migration assistant:
9
+
10
+ ```bash
11
+ cnos migrate --scan src --dry-run
12
+ cnos migrate --apply
13
+ cnos migrate --apply --rewrite
14
+ ```
15
+
16
+ Bridge to existing tooling:
17
+
18
+ ```bash
19
+ cnos export env --to .env.local
20
+ cnos export env --profile stage --to .env.stage
21
+ ```
@@ -0,0 +1,15 @@
1
+ ---
2
+ title: Profiles and Environments
3
+ description: Create explicit overlays for stage, prod, and other environments.
4
+ ---
5
+
6
+ # Profiles and Environments
7
+
8
+ Profiles are explicit overlays, not implicit defaults.
9
+
10
+ ```bash
11
+ cnos profile create stage --inherit base
12
+ cnos use --profile stage
13
+ cnos value set app.apiBaseUrl https://api.stage
14
+ cnos diff base stage
15
+ ```
@@ -0,0 +1,27 @@
1
+ ---
2
+ title: Secrets and Vaults
3
+ description: Securely manage secrets with local and CI-backed vaults.
4
+ ---
5
+
6
+ # Secrets and Vaults
7
+
8
+ Local vault:
9
+
10
+ ```bash
11
+ cnos vault create default
12
+ cnos vault auth default
13
+ cnos secret set app.token super-secret --vault default
14
+ ```
15
+
16
+ CI-backed vault:
17
+
18
+ ```bash
19
+ cnos vault create github-ci --provider github-secrets --no-passphrase
20
+ cnos secret set app.token APP_TOKEN --vault github-ci
21
+ ```
22
+
23
+ By default:
24
+
25
+ - repo files store only refs
26
+ - local secret material stays outside the repo
27
+ - reads are masked unless `--reveal` is explicitly requested
@@ -0,0 +1,14 @@
1
+ ---
2
+ title: SSR Projects
3
+ description: Combine CNOS server reads with browser-safe projection in SSR applications.
4
+ ---
5
+
6
+ # SSR Projects
7
+
8
+ Use `@kitsy/cnos` on the server and `@kitsy/cnos/browser` only for promoted public values.
9
+
10
+ Typical split:
11
+
12
+ - server: `cnos.value(...)`, `cnos.secret(...)`
13
+ - browser: `cnos('public.some.key')`
14
+ - framework build: `@kitsy/cnos-vite` or `@kitsy/cnos-next`
@@ -0,0 +1,22 @@
1
+ ---
2
+ title: Workspaces and Monorepos
3
+ description: Use CNOS workspaces to model multiple apps inside one repo.
4
+ ---
5
+
6
+ # Workspaces and Monorepos
7
+
8
+ In single-project mode, CNOS stays simple.
9
+
10
+ For monorepos:
11
+
12
+ ```bash
13
+ cnos init --workspace api
14
+ cnos use --workspace api
15
+ cnos list values
16
+ ```
17
+
18
+ Override per command when needed:
19
+
20
+ ```bash
21
+ cnos list values --workspace webapp
22
+ ```
package/docs/index.mdx ADDED
@@ -0,0 +1,18 @@
1
+ ---
2
+ title: CNOS Documentation
3
+ description: Overview of CNOS, its runtime model, and the documentation structure.
4
+ ---
5
+
6
+ # CNOS Documentation
7
+
8
+ CNOS is a configuration orchestration system for server applications, frontend builds, SSR apps, monorepos, and deployment pipelines.
9
+
10
+ This package is the source-of-truth documentation set that downstream sites, including Astro Starlight, can consume directly.
11
+
12
+ Start here:
13
+
14
+ - [Getting Started](./getting-started/index.mdx)
15
+ - [Backend Guide](./guides/backend.mdx)
16
+ - [Frontend with Vite](./guides/frontend-vite.mdx)
17
+ - [Secrets and Vaults](./guides/secrets.mdx)
18
+ - [CLI Reference](./cli/index.mdx)
@@ -0,0 +1,19 @@
1
+ ---
2
+ title: Manifest
3
+ description: Reference for .cnos/cnos.yml and its main sections.
4
+ ---
5
+
6
+ # Manifest
7
+
8
+ Key sections:
9
+
10
+ - `project`
11
+ - `workspaces`
12
+ - `profiles`
13
+ - `envMapping`
14
+ - `public`
15
+ - `vaults`
16
+ - `schema`
17
+ - `writePolicy`
18
+
19
+ Use the main repo spec for the exhaustive schema until this reference grows into the full field-by-field version.
@@ -0,0 +1,17 @@
1
+ ---
2
+ title: Namespaces
3
+ description: Understand value, secret, meta, public, and env projection surfaces.
4
+ ---
5
+
6
+ # Namespaces
7
+
8
+ Primary namespaces:
9
+
10
+ - `value.*`
11
+ - `secret.*`
12
+ - `meta.*`
13
+
14
+ Derived surfaces:
15
+
16
+ - `public.*` for promoted browser-safe values
17
+ - explicit env exports through `envMapping.explicit`
@@ -0,0 +1,16 @@
1
+ ---
2
+ title: Resolution
3
+ description: How CNOS resolves precedence, workspaces, profiles, and derived outputs.
4
+ ---
5
+
6
+ # Resolution
7
+
8
+ Resolution order is shaped by:
9
+
10
+ - workspace context
11
+ - workspace inheritance
12
+ - profile selection
13
+ - loader precedence
14
+ - explicit promotions and env mappings
15
+
16
+ Use `cnos inspect`, `cnos diff`, and `cnos drift` when you need to debug the final result.
@@ -0,0 +1,14 @@
1
+ ---
2
+ title: Security
3
+ description: Secret storage, masking, vault auth sessions, and safe output rules.
4
+ ---
5
+
6
+ # Security
7
+
8
+ CNOS secret rules:
9
+
10
+ - repo files store refs, not plaintext secret material
11
+ - local vault material is encrypted outside the repo
12
+ - reads are masked by default
13
+ - browser and public outputs never expose `secret.*`
14
+ - `vault auth` manages session-based access to local vaults
package/manifest.yml ADDED
@@ -0,0 +1,111 @@
1
+ product: cnos
2
+ title: CNOS Documentation
3
+ tagline: Configuration orchestration for apps, monorepos, and deployment pipelines
4
+ version: "1.3"
5
+
6
+ sidebar:
7
+ - group: Getting Started
8
+ items:
9
+ - path: getting-started/index
10
+ label: Overview
11
+ - path: getting-started/installation
12
+ label: Installation
13
+ - path: getting-started/quick-start
14
+ label: Quick Start
15
+ - path: getting-started/your-first-project
16
+ label: Your First Project
17
+
18
+ - group: Guides
19
+ items:
20
+ - path: guides/backend
21
+ label: Backend Projects
22
+ - path: guides/frontend-vite
23
+ label: Frontend with Vite
24
+ - path: guides/frontend-next
25
+ label: Frontend with Next.js
26
+ - path: guides/ssr
27
+ label: SSR Projects
28
+ - path: guides/ci-cd
29
+ label: CI/CD Pipelines
30
+ - path: guides/workspaces
31
+ label: Workspaces and Monorepos
32
+ - path: guides/profiles
33
+ label: Profiles and Environments
34
+ - path: guides/secrets
35
+ label: Secrets and Vaults
36
+ - path: guides/migration
37
+ label: Migrating from .env
38
+
39
+ - group: CLI Reference
40
+ collapsed: true
41
+ items:
42
+ - path: cli/index
43
+ label: Overview
44
+ - path: cli/init
45
+ label: cnos init
46
+ - path: cli/value
47
+ label: cnos value
48
+ - path: cli/secret
49
+ label: cnos secret
50
+ - path: cli/read
51
+ label: cnos read
52
+ - path: cli/inspect
53
+ label: cnos inspect
54
+ - path: cli/validate
55
+ label: cnos validate
56
+ - path: cli/export
57
+ label: cnos export
58
+ - path: cli/run
59
+ label: cnos run
60
+ - path: cli/diff
61
+ label: cnos diff
62
+ - path: cli/dump
63
+ label: cnos dump
64
+ - path: cli/doctor
65
+ label: cnos doctor
66
+ - path: cli/promote
67
+ label: cnos promote
68
+ - path: cli/vault
69
+ label: cnos vault
70
+ - path: cli/codegen
71
+ label: cnos codegen
72
+ - path: cli/watch
73
+ label: cnos watch
74
+ - path: cli/migrate
75
+ label: cnos migrate
76
+ - path: cli/drift
77
+ label: cnos drift
78
+
79
+ - group: API Reference
80
+ collapsed: true
81
+ items:
82
+ - path: api/index
83
+ label: Overview
84
+ - path: api/create-cnos
85
+ label: createCnos()
86
+ - path: api/runtime
87
+ label: Singleton Runtime
88
+ - path: api/browser
89
+ label: Browser Runtime
90
+ - path: api/types
91
+ label: Types
92
+
93
+ - group: Reference
94
+ collapsed: true
95
+ items:
96
+ - path: reference/manifest
97
+ label: Manifest
98
+ - path: reference/namespaces
99
+ label: Namespaces
100
+ - path: reference/resolution
101
+ label: Resolution
102
+ - path: reference/security
103
+ label: Security
104
+
105
+ - group: Concepts
106
+ collapsed: true
107
+ items:
108
+ - path: concepts/how-it-works
109
+ label: How CNOS Works
110
+ - path: concepts/config-spectrum
111
+ label: The Config Spectrum
package/package.json ADDED
@@ -0,0 +1,34 @@
1
+ {
2
+ "name": "@kitsy/cnos-docs",
3
+ "version": "1.3.0",
4
+ "description": "Source-of-truth CNOS documentation content for Astro Starlight and other static docs consumers.",
5
+ "type": "module",
6
+ "exports": {
7
+ "./manifest": "./manifest.yml",
8
+ "./docs/*": "./docs/*",
9
+ "./assets/*": "./assets/*"
10
+ },
11
+ "files": [
12
+ "docs",
13
+ "assets",
14
+ "manifest.yml",
15
+ "README.md"
16
+ ],
17
+ "keywords": [
18
+ "cnos",
19
+ "documentation",
20
+ "starlight",
21
+ "astro"
22
+ ],
23
+ "license": "MIT",
24
+ "publishConfig": {
25
+ "access": "public"
26
+ },
27
+ "scripts": {
28
+ "validate": "node scripts/validate-docs.mjs",
29
+ "build": "node scripts/validate-docs.mjs",
30
+ "lint": "node scripts/validate-docs.mjs",
31
+ "test": "node scripts/validate-docs.mjs",
32
+ "typecheck": "node scripts/validate-docs.mjs"
33
+ }
34
+ }