@getmonoceros/workbench 1.0.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.
package/package.json ADDED
@@ -0,0 +1,57 @@
1
+ {
2
+ "name": "@getmonoceros/workbench",
3
+ "version": "1.0.0",
4
+ "description": "Monoceros workbench CLI — local, reproducible dev containers with first-class AI coding tooling.",
5
+ "keywords": [
6
+ "devcontainer",
7
+ "docker",
8
+ "cli",
9
+ "ai-coding",
10
+ "claude-code",
11
+ "monoceros"
12
+ ],
13
+ "license": "MIT",
14
+ "repository": {
15
+ "type": "git",
16
+ "url": "git+https://github.com/getmonoceros/workbench.git",
17
+ "directory": "packages/cli"
18
+ },
19
+ "homepage": "https://github.com/getmonoceros/workbench#readme",
20
+ "bugs": {
21
+ "url": "https://github.com/getmonoceros/workbench/issues"
22
+ },
23
+ "type": "module",
24
+ "bin": {
25
+ "monoceros": "./dist/bin.js"
26
+ },
27
+ "files": [
28
+ "dist",
29
+ "templates",
30
+ "README.md"
31
+ ],
32
+ "engines": {
33
+ "node": ">=20"
34
+ },
35
+ "scripts": {
36
+ "start": "tsx src/bin.ts",
37
+ "typecheck": "tsc --build",
38
+ "test": "vitest run",
39
+ "build": "tsup",
40
+ "prepublishOnly": "pnpm typecheck && pnpm test && pnpm build"
41
+ },
42
+ "dependencies": {
43
+ "@devcontainers/cli": "^0.86.1",
44
+ "citty": "^0.2.2",
45
+ "consola": "^3.4.2",
46
+ "diff": "^9.0.0",
47
+ "yaml": "^2.9.0",
48
+ "zod": "^4.4.3"
49
+ },
50
+ "devDependencies": {
51
+ "@types/node": "^22.0.0",
52
+ "tsup": "^8.5.0",
53
+ "tsx": "^4.21.0",
54
+ "typescript": "^5.9.3",
55
+ "vitest": "^3.2.4"
56
+ }
57
+ }
@@ -0,0 +1,95 @@
1
+ # Monoceros Components Catalog
2
+
3
+ Every file under this directory is a **component** — a small,
4
+ composable yaml snippet that contributes to a `SolutionConfig`. The
5
+ `monoceros init` command picks components by name (via `--with=…`
6
+ or by rendering them all as commented-out hints in the documented
7
+ default) and merges them into the user's container-config yml.
8
+
9
+ ## File layout
10
+
11
+ - `<name>.yml` — a top-level component (e.g. `node.yml`, `postgres.yml`).
12
+ - `<group>/<name>.yml` — a sub-component of a parent feature
13
+ (e.g. `atlassian/twg.yml` is a sub-component of `atlassian/`).
14
+
15
+ Component names map 1:1 to their `--with=…` identifier:
16
+
17
+ - `--with=node` → `node.yml`
18
+ - `--with=atlassian/twg` → `atlassian/twg.yml`
19
+
20
+ ## File schema
21
+
22
+ ```yaml
23
+ # Short label shown next to the active line (or "- node" entry) in
24
+ # the generated yml.
25
+ displayName: Node 22 + pnpm
26
+
27
+ # Longer block, shown as a comment above the section in documented
28
+ # mode (i.e. `monoceros init <name>` with no --with). English, free
29
+ # prose, can mention what it adds, where credentials come from, etc.
30
+ description: |
31
+ Node 22 + pnpm are already in the base image; this component
32
+ declares the runtime as active so the scaffold wires it up.
33
+
34
+ # Which top-level yml section this component contributes to. Drives
35
+ # how the documented-mode renderer groups components.
36
+ category: language | service | feature
37
+
38
+ # The actual yml fragment merged into the final SolutionConfig.
39
+ # Must be a valid fragment for the declared category:
40
+ # - language → contributes.languages must be a non-empty string array
41
+ # - service → contributes.services must be a non-empty string array
42
+ # - feature → contributes.features must hold one feature entry
43
+ contributes:
44
+ # …
45
+ ```
46
+
47
+ ## Conventions
48
+
49
+ - **Comments and prose are English**, even though the broader user
50
+ docs are German. The rendered yml is a tool output and English
51
+ reads more cleanly for the typical dev-yml shape.
52
+ - **Sub-components set their flag to `true` AND every sibling flag
53
+ to `false`.** Both `atlassian/twg.yml` and `atlassian/rovodev.yml`
54
+ set both `rovodev` and `twg`, just with opposite truth values.
55
+ The init merge applies OR-semantics on booleans: when two
56
+ components contribute the same boolean key, `true` wins. That
57
+ way `--with=atlassian/twg` on its own opts out of the other
58
+ tool, while `--with=atlassian/twg,atlassian/rovodev` merges to
59
+ both `true`. Without the explicit `false`, the manifest defaults
60
+ (`true` for both) would silently re-enable the unwanted tool.
61
+ - **Auth/credential options live with the feature, not the
62
+ component.** Each feature manifest under `images/features/`
63
+ declares an `x-monoceros.optionHints` array that the init
64
+ generator uses to render commented-out auth options beneath the
65
+ active options block whenever the feature is included.
66
+
67
+ ## Adding a new component
68
+
69
+ 1. Decide the name and (if it's a sub-component) the group folder.
70
+ 2. Drop the yml file in. Use an existing component of the same
71
+ category as a starting point.
72
+ 3. If the component activates a Monoceros feature, make sure that
73
+ feature's manifest under `images/features/<feature>/` carries
74
+ the right `x-monoceros.optionHints` for auth.
75
+ 4. Add a short note in this README's "Current components" table if
76
+ you want it discoverable at a glance.
77
+
78
+ ## Current components
79
+
80
+ | Component | Category | Contributes |
81
+ | ------------------- | -------- | ------------------------------------------------------- |
82
+ | `node` | language | Node runtime (declared; package already in base image) |
83
+ | `python` | language | Python via devcontainers/features/python |
84
+ | `java` | language | JDK via devcontainers/features/java |
85
+ | `go` | language | Go toolchain via devcontainers/features/go |
86
+ | `rust` | language | Rust toolchain via devcontainers/features/rust |
87
+ | `dotnet` | language | .NET SDK via devcontainers/features/dotnet:2 |
88
+ | `postgres` | service | Compose service: Postgres |
89
+ | `mysql` | service | Compose service: MySQL |
90
+ | `redis` | service | Compose service: Redis |
91
+ | `claude` | feature | `claude-code` feature (Claude Code CLI) |
92
+ | `github` | feature | `github-cli` feature (`gh`) with auto-auth via apiToken |
93
+ | `atlassian` | feature | atlassian feature: Rovo Dev + twg both on |
94
+ | `atlassian/rovodev` | feature | atlassian feature with just `rovodev: true` |
95
+ | `atlassian/twg` | feature | atlassian feature with just `twg: true` |
@@ -0,0 +1,14 @@
1
+ displayName: Atlassian Rovo Dev only (via acli rovodev)
2
+ description: |
3
+ Sub-component of the atlassian feature. Activates only the
4
+ `acli rovodev` AI agent and explicitly opts out of `twg`.
5
+ Combine with `atlassian/twg` to get both tools — booleans
6
+ OR-merge during component composition so `--with=atlassian/rovodev,atlassian/twg`
7
+ yields both `true`.
8
+ category: feature
9
+ contributes:
10
+ features:
11
+ - ref: ghcr.io/getmonoceros/monoceros-features/atlassian:1
12
+ options:
13
+ rovodev: true
14
+ twg: false
@@ -0,0 +1,14 @@
1
+ displayName: Atlassian Teamwork Graph CLI only (twg)
2
+ description: |
3
+ Sub-component of the atlassian feature. Activates only the
4
+ `twg` CLI and explicitly opts out of `rovodev`. Combine with
5
+ `atlassian/rovodev` to get both tools — booleans OR-merge
6
+ during component composition so
7
+ `--with=atlassian/rovodev,atlassian/twg` yields both `true`.
8
+ category: feature
9
+ contributes:
10
+ features:
11
+ - ref: ghcr.io/getmonoceros/monoceros-features/atlassian:1
12
+ options:
13
+ rovodev: false
14
+ twg: true
@@ -0,0 +1,15 @@
1
+ displayName: Atlassian CLIs (Rovo Dev + Teamwork Graph), both on
2
+ description: |
3
+ Installs both Atlassian CLIs that share a single Atlassian
4
+ account: Rovo Dev (the `acli rovodev` AI agent) and Teamwork
5
+ Graph (`twg`). Use the sub-components `atlassian/rovodev` or
6
+ `atlassian/twg` instead of this one if you only want one of
7
+ the two tools. Both can be combined: `--with=atlassian/rovodev,atlassian/twg`
8
+ yields the same result as `--with=atlassian`.
9
+ category: feature
10
+ contributes:
11
+ features:
12
+ - ref: ghcr.io/getmonoceros/monoceros-features/atlassian:1
13
+ options:
14
+ rovodev: true
15
+ twg: true
@@ -0,0 +1,11 @@
1
+ displayName: Anthropic Claude Code CLI
2
+ description: |
3
+ Installs the Claude Code CLI via npm and bind-mounts a per-
4
+ container `.claude/` so login + skills + session history
5
+ survive `monoceros apply`. Without an apiKey, the CLI uses
6
+ Anthropic's subscription/OAuth flow on first run; with an
7
+ apiKey, it switches to API-key mode via ANTHROPIC_API_KEY.
8
+ category: feature
9
+ contributes:
10
+ features:
11
+ - ref: ghcr.io/getmonoceros/monoceros-features/claude-code:1
@@ -0,0 +1,8 @@
1
+ displayName: .NET via devcontainers/features/dotnet:2
2
+ description: |
3
+ Adds the upstream `ghcr.io/devcontainers/features/dotnet:2`
4
+ feature to the container, which installs the .NET SDK (and
5
+ optionally specific runtimes via the feature's own options).
6
+ category: language
7
+ contributes:
8
+ languages: [dotnet]
@@ -0,0 +1,10 @@
1
+ displayName: GitHub CLI (gh)
2
+ description: |
3
+ Installs the official `gh` CLI from the upstream apt repo and
4
+ wires GH_TOKEN via /etc/profile.d so a Personal Access Token
5
+ set via this feature's `apiToken` option authenticates every
6
+ login shell automatically.
7
+ category: feature
8
+ contributes:
9
+ features:
10
+ - ref: ghcr.io/getmonoceros/monoceros-features/github-cli:1
@@ -0,0 +1,8 @@
1
+ displayName: Go via devcontainers/features/go
2
+ description: |
3
+ Adds the upstream `ghcr.io/devcontainers/features/go` feature to
4
+ the container, which installs the Go toolchain plus common dev
5
+ utilities (gopls, dlv, …).
6
+ category: language
7
+ contributes:
8
+ languages: [go]
@@ -0,0 +1,9 @@
1
+ displayName: Java via devcontainers/features/java
2
+ description: |
3
+ Adds the upstream `ghcr.io/devcontainers/features/java` feature to
4
+ the container, which installs a JDK plus Maven/Gradle scaffolding.
5
+ Pin a version through the feature's own options if you need
6
+ something other than the default.
7
+ category: language
8
+ contributes:
9
+ languages: [java]
@@ -0,0 +1,8 @@
1
+ displayName: MySQL 8 compose service
2
+ description: |
3
+ Adds a `mysql` service to compose mode. Inside the container it
4
+ is reachable as host `mysql`:
5
+ mysql://monoceros:monoceros@mysql:3306/monoceros
6
+ category: service
7
+ contributes:
8
+ services: [mysql]
@@ -0,0 +1,9 @@
1
+ displayName: Node 22 + pnpm
2
+ description: |
3
+ Node 22 + pnpm + corepack are already in the base runtime image.
4
+ This component just declares `node` as the active language so
5
+ scaffold steps that key off the language list (post-create
6
+ package detection, default extensions, …) see it.
7
+ category: language
8
+ contributes:
9
+ languages: [node]
@@ -0,0 +1,10 @@
1
+ displayName: PostgreSQL 16 compose service
2
+ description: |
3
+ Adds a `postgres` service to compose mode. Inside the container
4
+ it is reachable as host `postgres`:
5
+ postgresql://monoceros:monoceros@postgres:5432/monoceros
6
+ Swap to an external Postgres by replacing this component with an
7
+ `externalServices.postgres: postgresql://…` block in the yml.
8
+ category: service
9
+ contributes:
10
+ services: [postgres]
@@ -0,0 +1,9 @@
1
+ displayName: Python 3.x via devcontainers/features/python
2
+ description: |
3
+ Adds the upstream `ghcr.io/devcontainers/features/python` feature
4
+ to the container, which installs a recent CPython plus pip and
5
+ the usual scaffolding. Pin a version through the feature's own
6
+ options if you need something other than the default.
7
+ category: language
8
+ contributes:
9
+ languages: [python]
@@ -0,0 +1,7 @@
1
+ displayName: Redis 7 compose service
2
+ description: |
3
+ Adds a `redis` service to compose mode. Inside the container it
4
+ is reachable as host `redis` on the default port 6379.
5
+ category: service
6
+ contributes:
7
+ services: [redis]
@@ -0,0 +1,8 @@
1
+ displayName: Rust via devcontainers/features/rust
2
+ description: |
3
+ Adds the upstream `ghcr.io/devcontainers/features/rust` feature
4
+ to the container, which installs rustup, the current stable
5
+ toolchain, and cargo.
6
+ category: language
7
+ contributes:
8
+ languages: [rust]
@@ -0,0 +1,16 @@
1
+ {
2
+ "name": "monoceros-default",
3
+ "image": "monoceros-runtime:dev",
4
+ "remoteUser": "node",
5
+ "mounts": [
6
+ "source=${localEnv:HOME}/.claude,target=/home/node/.claude,type=bind,consistency=cached"
7
+ ],
8
+ "runArgs": ["--cap-add=NET_ADMIN"],
9
+ "forwardPorts": [3000, 4000],
10
+ "postCreateCommand": ".devcontainer/post-create.sh",
11
+ "customizations": {
12
+ "vscode": {
13
+ "extensions": ["anthropic.claude-code"]
14
+ }
15
+ }
16
+ }