bots-garden/mini-me-kitpublic Fork
⑂ cf47816
Commits
⬇ Clone ▾
git clone https://git.rickub.com/bots-garden/mini-me-kit.git
git clone ssh://git@rickub.com/bots-garden/mini-me-kit.git

Host key fingerprint (ed25519): SHA256:iycHnxEyq0Q7uyVpB7JlznP0G7JrTPXLYRcAU5CSLhc — verify it before your first connect.

Download ZIP

🛟 Updated.

k33g committed 2026-10-14T08:50:30+02:00 Browse files
cf47816 parent: 6aa565b
modified 05-publish-mini-me-editor-kit.sh +0 -0
old mode 100644
new mode 100755
old mode 100644
new mode 100755
added 06-publish-nushell-toolchain-kit.sh +57 -0
new file mode 100755
@@ -0,0 +1,57 @@
1+#!/bin/bash
2+: <<'COMMENT'
3+Publish the nushell-toolchain kit (a mixin) to Docker Hub as an OCI image.
4+Doc: https://docs.docker.com/ai/sandboxes/customize/author/distribute/
5+
6+1. docker login (once, with the Docker Hub account)
7+2. Update TAG in release.env (shared with 01-release.tag.sh)
8+3. Run this script: ./06-publish-nushell-toolchain-kit.sh
9+ - DOCKER_HUB_NAMESPACE=foo ./06-publish-nushell-toolchain-kit.sh to push under another namespace
10+ - SIGN=1 ./06-publish-nushell-toolchain-kit.sh to sign the kit after the push
11+ (keyless, `sbx kit sign`)
12+
13+Then anyone can add it to a sandbox:
14+ sbx run --name mm-demo docker.io/<NAMESPACE>/mini-me-kit:<TAG> \
15+ --kit docker.io/<NAMESPACE>/nushell-toolchain-kit:<TAG>
16+COMMENT
17+
18+set -euo pipefail
19+
20+set -o allexport
21+source release.env
22+set +o allexport
23+
24+NAMESPACE="${DOCKER_HUB_NAMESPACE:-k33g}"
25+KIT_DIR="./kits/nushell-toolchain"
26+KIT_FILE="${KIT_DIR}/nushell-toolchain.yaml"
27+# Docker Hub tags are usually written without the leading "v": v0.0.2 -> 0.0.2
28+VERSION="${TAG#v}"
29+IMAGE="docker.io/${NAMESPACE}/nushell-toolchain-kit"
30+PLATFORMS="linux/amd64,linux/arm64"
31+
32+echo "Publishing ${IMAGE}:${VERSION} (and :latest) for ${PLATFORMS}"
33+
34+# A multi-platform push needs a builder that can do it: the default "docker"
35+# driver cannot (unless the containerd image store is on), so use a
36+# docker-container builder, created once and reused afterwards.
37+BUILDER="sandbox-kit-builder"
38+if ! docker buildx inspect "${BUILDER}" >/dev/null 2>&1; then
39+ docker buildx create --name "${BUILDER}" --driver docker-container >/dev/null
40+fi
41+
42+# The descriptor (nushell-toolchain.yaml) is passed as the "Dockerfile": its
43+# `# syntax=docker/sandbox-kit:3` line selects the kit frontend, which builds
44+# the overlay from nushell-toolchain.dockerfile and packs the kit metadata with it.
45+docker buildx build "${KIT_DIR}" -f "${KIT_FILE}" \
46+ --builder "${BUILDER}" \
47+ --platform "${PLATFORMS}" \
48+ -t "${IMAGE}:${VERSION}" \
49+ -t "${IMAGE}:latest" \
50+ --push
51+
52+if [ "${SIGN:-0}" = "1" ]; then
53+ sbx kit sign "${IMAGE}:${VERSION}"
54+fi
55+
56+echo "✅ Published ${IMAGE}:${VERSION}"
57+echo "💡 Try it: sbx run --name mm-demo docker.io/${NAMESPACE}/${REPO}:${VERSION} --kit ${IMAGE}:${VERSION}"
new file mode 100755
@@ -0,0 +1,57 @@
1+#!/bin/bash
2+: <<'COMMENT'
3+Publish the nushell-toolchain kit (a mixin) to Docker Hub as an OCI image.
4+Doc: https://docs.docker.com/ai/sandboxes/customize/author/distribute/
5+
6+1. docker login (once, with the Docker Hub account)
7+2. Update TAG in release.env (shared with 01-release.tag.sh)
8+3. Run this script: ./06-publish-nushell-toolchain-kit.sh
9+ - DOCKER_HUB_NAMESPACE=foo ./06-publish-nushell-toolchain-kit.sh to push under another namespace
10+ - SIGN=1 ./06-publish-nushell-toolchain-kit.sh to sign the kit after the push
11+ (keyless, `sbx kit sign`)
12+
13+Then anyone can add it to a sandbox:
14+ sbx run --name mm-demo docker.io/<NAMESPACE>/mini-me-kit:<TAG> \
15+ --kit docker.io/<NAMESPACE>/nushell-toolchain-kit:<TAG>
16+COMMENT
17+
18+set -euo pipefail
19+
20+set -o allexport
21+source release.env
22+set +o allexport
23+
24+NAMESPACE="${DOCKER_HUB_NAMESPACE:-k33g}"
25+KIT_DIR="./kits/nushell-toolchain"
26+KIT_FILE="${KIT_DIR}/nushell-toolchain.yaml"
27+# Docker Hub tags are usually written without the leading "v": v0.0.2 -> 0.0.2
28+VERSION="${TAG#v}"
29+IMAGE="docker.io/${NAMESPACE}/nushell-toolchain-kit"
30+PLATFORMS="linux/amd64,linux/arm64"
31+
32+echo "Publishing ${IMAGE}:${VERSION} (and :latest) for ${PLATFORMS}"
33+
34+# A multi-platform push needs a builder that can do it: the default "docker"
35+# driver cannot (unless the containerd image store is on), so use a
36+# docker-container builder, created once and reused afterwards.
37+BUILDER="sandbox-kit-builder"
38+if ! docker buildx inspect "${BUILDER}" >/dev/null 2>&1; then
39+ docker buildx create --name "${BUILDER}" --driver docker-container >/dev/null
40+fi
41+
42+# The descriptor (nushell-toolchain.yaml) is passed as the "Dockerfile": its
43+# `# syntax=docker/sandbox-kit:3` line selects the kit frontend, which builds
44+# the overlay from nushell-toolchain.dockerfile and packs the kit metadata with it.
45+docker buildx build "${KIT_DIR}" -f "${KIT_FILE}" \
46+ --builder "${BUILDER}" \
47+ --platform "${PLATFORMS}" \
48+ -t "${IMAGE}:${VERSION}" \
49+ -t "${IMAGE}:latest" \
50+ --push
51+
52+if [ "${SIGN:-0}" = "1" ]; then
53+ sbx kit sign "${IMAGE}:${VERSION}"
54+fi
55+
56+echo "✅ Published ${IMAGE}:${VERSION}"
57+echo "💡 Try it: sbx run --name mm-demo docker.io/${NAMESPACE}/${REPO}:${VERSION} --kit ${IMAGE}:${VERSION}"
modified README.md +3 -1
@@ -118,11 +118,12 @@ Add them to any of the kits above with `--kit`:
118118 |---|---|---|
119119 | `./kits/go-toolchain` | `go`, `gofmt`, `gopls` | `go_version` |
120120 | `./kits/rust-toolchain` | `cargo`, `rustc`, `rustfmt`, `clippy`, `rust-analyzer`, plus `gcc` (linker, C build scripts) | `rust_version` |
121+| `./kits/nushell-toolchain` | `nu` (static binary) | `nushell_version` |
121122
122123 ```bash
123124 cd demo
124125 sbx run -d --name mm-editor -p 8080:3000 ../mini-me-editor \
125---kit ../kits/go-toolchain --kit ../kits/rust-toolchain
126+--kit ../kits/go-toolchain --kit ../kits/rust-toolchain --kit ../kits/nushell-toolchain
126127 ```
127128
128129 ## Release & publish
@@ -139,6 +140,7 @@ sbx run -d --name mm-editor -p 8080:3000 ../mini-me-editor \
139140 ./03-publish-go-toolchain-kit.sh # ./kits/go-toolchain -> k33g/go-toolchain-kit
140141 ./04-publish-rust-toolchain-kit.sh # ./kits/rust-toolchain -> k33g/rust-toolchain-kit
141142 ./05-publish-mini-me-editor-kit.sh # ./mini-me-editor -> k33g/mini-me-editor-kit
143+ ./06-publish-nushell-toolchain-kit.sh # ./kits/nushell-toolchain -> k33g/nushell-toolchain-kit
142144 ```
143145 - `DOCKER_HUB_NAMESPACE=<namespace>` to push under another namespace (default: `k33g`)
144146 - `SIGN=1` to sign the kit after the push (`sbx kit sign`)
@@ -118,11 +118,12 @@ Add them to any of the kits above with `--kit`:
118 |---|---|---|118 |---|---|---|
119 | `./kits/go-toolchain` | `go`, `gofmt`, `gopls` | `go_version` |119 | `./kits/go-toolchain` | `go`, `gofmt`, `gopls` | `go_version` |
120 | `./kits/rust-toolchain` | `cargo`, `rustc`, `rustfmt`, `clippy`, `rust-analyzer`, plus `gcc` (linker, C build scripts) | `rust_version` |120 | `./kits/rust-toolchain` | `cargo`, `rustc`, `rustfmt`, `clippy`, `rust-analyzer`, plus `gcc` (linker, C build scripts) | `rust_version` |
121+| `./kits/nushell-toolchain` | `nu` (static binary) | `nushell_version` |
121 122
122 ```bash123 ```bash
123 cd demo124 cd demo
124 sbx run -d --name mm-editor -p 8080:3000 ../mini-me-editor \125 sbx run -d --name mm-editor -p 8080:3000 ../mini-me-editor \
125---kit ../kits/go-toolchain --kit ../kits/rust-toolchain126+--kit ../kits/go-toolchain --kit ../kits/rust-toolchain --kit ../kits/nushell-toolchain
126 ```127 ```
127 128
128 ## Release & publish129 ## Release & publish
@@ -139,6 +140,7 @@ sbx run -d --name mm-editor -p 8080:3000 ../mini-me-editor \
139 ./03-publish-go-toolchain-kit.sh # ./kits/go-toolchain -> k33g/go-toolchain-kit140 ./03-publish-go-toolchain-kit.sh # ./kits/go-toolchain -> k33g/go-toolchain-kit
140 ./04-publish-rust-toolchain-kit.sh # ./kits/rust-toolchain -> k33g/rust-toolchain-kit141 ./04-publish-rust-toolchain-kit.sh # ./kits/rust-toolchain -> k33g/rust-toolchain-kit
141 ./05-publish-mini-me-editor-kit.sh # ./mini-me-editor -> k33g/mini-me-editor-kit142 ./05-publish-mini-me-editor-kit.sh # ./mini-me-editor -> k33g/mini-me-editor-kit
143+ ./06-publish-nushell-toolchain-kit.sh # ./kits/nushell-toolchain -> k33g/nushell-toolchain-kit
142 ```144 ```
143 - `DOCKER_HUB_NAMESPACE=<namespace>` to push under another namespace (default: `k33g`)145 - `DOCKER_HUB_NAMESPACE=<namespace>` to push under another namespace (default: `k33g`)
144 - `SIGN=1` to sign the kit after the push (`sbx kit sign`)146 - `SIGN=1` to sign the kit after the push (`sbx kit sign`)
added kits/nushell-toolchain/nushell-context.md +8 -0
new file mode 100644
@@ -0,0 +1,8 @@
1+## Nushell
2+
3+`nu` is installed (a static binary, `/usr/local/bin/nu`): a shell with structured
4+(tabular) data instead of plain text — `ls`, `ps`, `open` and pipelines return
5+typed tables you filter/sort/reshape with `where`, `sort-by`, `select`, `get`,
6+instead of piping through `grep`/`awk`/`cut`. It is not the sandbox's login
7+shell; invoke it explicitly (`nu -c '...'` or `nu script.nu`) when structured
8+data handling helps, otherwise keep using bash.
new file mode 100644
@@ -0,0 +1,8 @@
1+## Nushell
2+
3+`nu` is installed (a static binary, `/usr/local/bin/nu`): a shell with structured
4+(tabular) data instead of plain text — `ls`, `ps`, `open` and pipelines return
5+typed tables you filter/sort/reshape with `where`, `sort-by`, `select`, `get`,
6+instead of piping through `grep`/`awk`/`cut`. It is not the sandbox's login
7+shell; invoke it explicitly (`nu -c '...'` or `nu script.nu`) when structured
8+data handling helps, otherwise keep using bash.
added kits/nushell-toolchain/nushell-toolchain.dockerfile +35 -0
new file mode 100644
@@ -0,0 +1,35 @@
1+# syntax=docker/dockerfile:1
2+
3+# --- build stage: download the static (musl) nu binary ---------------------
4+FROM debian:trixie-slim AS build
5+ARG NUSHELL_VERSION
6+ARG TARGETARCH
7+
8+# A heredoc RUN does not stop at the first failing line by itself: every
9+# script starts with `set -eu`.
10+RUN <<EOF
11+set -eu
12+apt-get update
13+apt-get install -y --no-install-recommends curl ca-certificates
14+rm -rf /var/lib/apt/lists/*
15+EOF
16+
17+# The musl build is statically linked, so it runs unmodified on whatever
18+# base image (glibc or musl) the overlay lands on, unlike the gnu build,
19+# which would be tied to this build stage's own glibc.
20+RUN <<EOF
21+set -eu
22+case "${TARGETARCH}" in
23+ amd64) arch=x86_64 ;;
24+ arm64) arch=aarch64 ;;
25+ *) echo "unsupported arch: ${TARGETARCH}" >&2; exit 1 ;;
26+esac
27+mkdir -p /out/usr/local/bin
28+curl -fsSL "https://github.com/nushell/nushell/releases/download/${NUSHELL_VERSION}/nu-${NUSHELL_VERSION}-${arch}-unknown-linux-musl.tar.gz" \
29+ | tar -xz -C /out/usr/local/bin --strip-components=1 "nu-${NUSHELL_VERSION}-${arch}-unknown-linux-musl/nu"
30+chmod 0755 /out/usr/local/bin/nu
31+EOF
32+
33+# --- overlay: only the nu binary lands on the workload -----------------------
34+FROM scratch
35+COPY --from=build /out/ /
new file mode 100644
@@ -0,0 +1,35 @@
1+# syntax=docker/dockerfile:1
2+
3+# --- build stage: download the static (musl) nu binary ---------------------
4+FROM debian:trixie-slim AS build
5+ARG NUSHELL_VERSION
6+ARG TARGETARCH
7+
8+# A heredoc RUN does not stop at the first failing line by itself: every
9+# script starts with `set -eu`.
10+RUN <<EOF
11+set -eu
12+apt-get update
13+apt-get install -y --no-install-recommends curl ca-certificates
14+rm -rf /var/lib/apt/lists/*
15+EOF
16+
17+# The musl build is statically linked, so it runs unmodified on whatever
18+# base image (glibc or musl) the overlay lands on, unlike the gnu build,
19+# which would be tied to this build stage's own glibc.
20+RUN <<EOF
21+set -eu
22+case "${TARGETARCH}" in
23+ amd64) arch=x86_64 ;;
24+ arm64) arch=aarch64 ;;
25+ *) echo "unsupported arch: ${TARGETARCH}" >&2; exit 1 ;;
26+esac
27+mkdir -p /out/usr/local/bin
28+curl -fsSL "https://github.com/nushell/nushell/releases/download/${NUSHELL_VERSION}/nu-${NUSHELL_VERSION}-${arch}-unknown-linux-musl.tar.gz" \
29+ | tar -xz -C /out/usr/local/bin --strip-components=1 "nu-${NUSHELL_VERSION}-${arch}-unknown-linux-musl/nu"
30+chmod 0755 /out/usr/local/bin/nu
31+EOF
32+
33+# --- overlay: only the nu binary lands on the workload -----------------------
34+FROM scratch
35+COPY --from=build /out/ /
added kits/nushell-toolchain/nushell-toolchain.yaml +20 -0
new file mode 100644
@@ -0,0 +1,20 @@
1+# syntax=docker/sandbox-kit:3
2+schemaVersion: "3"
3+kind: mixin
4+displayName: Nushell toolchain
5+description: Nushell (nu), a structured-data shell
6+
7+args:
8+ nushell_version:
9+ # A release tag of https://github.com/nushell/nushell/releases (no leading "v")
10+ default: "0.116.1"
11+ pattern: '^[0-9]+\.[0-9]+\.[0-9]+$'
12+ buildArg: NUSHELL_VERSION
13+
14+provides: ["nushell@${{ kit.args.nushell_version }}"]
15+
16+capabilities:
17+ # nu needs no outbound network of its own (no module/crate-style registry).
18+ # - type: com.docker.sandbox/agent-context@1
19+ # config:
20+ # contentFile: ./nushell-context.md
new file mode 100644
@@ -0,0 +1,20 @@
1+# syntax=docker/sandbox-kit:3
2+schemaVersion: "3"
3+kind: mixin
4+displayName: Nushell toolchain
5+description: Nushell (nu), a structured-data shell
6+
7+args:
8+ nushell_version:
9+ # A release tag of https://github.com/nushell/nushell/releases (no leading "v")
10+ default: "0.116.1"
11+ pattern: '^[0-9]+\.[0-9]+\.[0-9]+$'
12+ buildArg: NUSHELL_VERSION
13+
14+provides: ["nushell@${{ kit.args.nushell_version }}"]
15+
16+capabilities:
17+ # nu needs no outbound network of its own (no module/crate-style registry).
18+ # - type: com.docker.sandbox/agent-context@1
19+ # config:
20+ # contentFile: ./nushell-context.md
modified mini-me-editor/mini-me-editor.yaml +2 -0
@@ -39,6 +39,8 @@ capabilities:
3939 - host.docker.internal:12434 # Docker Model Runner
4040 - host.docker.internal:11434 # Ollama
4141 - host.docker.internal:17434 # Llmman
42+ - open-vsx.org # Theia Extensions view: search and install extensions/themes
43+ - openvsxorg.blob.core.windows.net # Open VSX .vsix downloads
4244
4345 # Theia listens on 3000 in the sandbox.
4446 # - `sbx run -p 8080:3000 ...` publishes it on the host port of your choice;
@@ -39,6 +39,8 @@ capabilities:
39 - host.docker.internal:12434 # Docker Model Runner39 - host.docker.internal:12434 # Docker Model Runner
40 - host.docker.internal:11434 # Ollama40 - host.docker.internal:11434 # Ollama
41 - host.docker.internal:17434 # Llmman41 - host.docker.internal:17434 # Llmman
42+ - open-vsx.org # Theia Extensions view: search and install extensions/themes
43+ - openvsxorg.blob.core.windows.net # Open VSX .vsix downloads
42 44
43 # Theia listens on 3000 in the sandbox.45 # Theia listens on 3000 in the sandbox.
44 # - `sbx run -p 8080:3000 ...` publishes it on the host port of your choice;46 # - `sbx run -p 8080:3000 ...` publishes it on the host port of your choice;
modified mini-me-editor/theia/package.json +1 -0
@@ -74,6 +74,7 @@
7474 "@theia/scm": "THEIA_VERSION",
7575 "@theia/search-in-workspace": "THEIA_VERSION",
7676 "@theia/terminal": "THEIA_VERSION",
77+ "@theia/vsx-registry": "THEIA_VERSION",
7778 "@theia/workspace": "THEIA_VERSION",
7879 "react": "^19.0.0",
7980 "react-dom": "^19.0.0"
@@ -74,6 +74,7 @@
74 "@theia/scm": "THEIA_VERSION",74 "@theia/scm": "THEIA_VERSION",
75 "@theia/search-in-workspace": "THEIA_VERSION",75 "@theia/search-in-workspace": "THEIA_VERSION",
76 "@theia/terminal": "THEIA_VERSION",76 "@theia/terminal": "THEIA_VERSION",
77+ "@theia/vsx-registry": "THEIA_VERSION",
77 "@theia/workspace": "THEIA_VERSION",78 "@theia/workspace": "THEIA_VERSION",
78 "react": "^19.0.0",79 "react": "^19.0.0",
79 "react-dom": "^19.0.0"80 "react-dom": "^19.0.0"