{"id":51066916,"url":"https://github.com/dictybase-docker/crusher","last_synced_at":"2026-06-23T07:30:25.652Z","repository":{"id":362290897,"uuid":"1258268230","full_name":"dictybase-docker/crusher","owner":"dictybase-docker","description":"CLI tool for building OCI images, creating Crush sandbox containers, and packing Docker Sandbox agent kits — powered by fp-go functional programming combinators.","archived":false,"fork":false,"pushed_at":"2026-06-03T12:32:23.000Z","size":250,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-06-03T14:15:26.599Z","etag":null,"topics":["cli","container","crush","docker","docker-sandbox","fp-go","functional-programming","go","oci","sandbox"],"latest_commit_sha":null,"homepage":"https://pkg.go.dev/github.com/dictybase-docker/crusher","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dictybase-docker.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2026-06-03T12:26:16.000Z","updated_at":"2026-06-03T12:32:39.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/dictybase-docker/crusher","commit_stats":null,"previous_names":["dictybase-docker/crusher"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/dictybase-docker/crusher","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dictybase-docker%2Fcrusher","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dictybase-docker%2Fcrusher/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dictybase-docker%2Fcrusher/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dictybase-docker%2Fcrusher/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dictybase-docker","download_url":"https://codeload.github.com/dictybase-docker/crusher/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dictybase-docker%2Fcrusher/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34680619,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-23T02:00:07.161Z","response_time":65,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","container","crush","docker","docker-sandbox","fp-go","functional-programming","go","oci","sandbox"],"created_at":"2026-06-23T07:30:24.916Z","updated_at":"2026-06-23T07:30:25.647Z","avatar_url":"https://github.com/dictybase-docker.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# crusher\n\n[![Go Reference](https://pkg.go.dev/badge/github.com/dictybase-docker/crusher.svg)](https://pkg.go.dev/github.com/dictybase-docker/crusher)\n[![Go Report Card](https://goreportcard.com/badge/github.com/dictybase-docker/crusher)](https://goreportcard.com/report/github.com/dictybase-docker/crusher)\n[![License](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)\n\nCLI tool for building OCI images, creating Crush sandbox containers, and packing Docker Sandbox agent kits — all powered by functional programming combinators.\n\n## Contents\n\n- [Prerequisites](#prerequisites)\n- [Install](#install)\n- [Commands](#commands)\n  - [build](#build)\n  - [create](#create)\n  - [sbx](#sbx)\n- [Project Structure](#project-structure)\n- [Development](#development)\n\n## Prerequisites\n\n- [Go](https://go.dev/) 1.25+\n- [Docker](https://docs.docker.com/) — OCI image builds and container management\n- [sbx](https://docker.com/sandbox) — Docker Sandbox CLI (for `sbx` subcommand)\n\n## Install\n\n```bash\ngo install github.com/dictybase-docker/crusher/cmd/crusher@latest\n```\n\nOr build from source:\n\n```bash\ngit clone https://github.com/dictybase-docker/crusher.git\ncd crush-sandbox\ngo build -o crusher ./cmd/crusher\n```\n\n## Commands\n\n### build\n\nBuild an OCI image using the Docker CLI. Supports embeddable Dockerfile, custom build args for tool versions, and multiple tags.\n\n```\ncrusher build [--name NAME] [--tag TAG] [--file PATH] [--embed] [--golangci-lint-version VER] [--crush-version VER] [--gotestsum-version VER] [--moxide-version VER] [--sem-version VER] [--rtk-version VER]\n```\n\n| Flag | Default | Description |\n|------|---------|-------------|\n| `--name` / `-n` | `crusher` | Image name (combines with tags as `name:tag`) |\n| `--tag` / `-t` | `[latest]` | Image tag, repeatable |\n| `--file` / `-f` | `Dockerfile` | Path to Dockerfile |\n| `--embed` | `false` | Use the Dockerfile embedded in the binary (ignores `--file`) |\n| `--golangci-lint-version` | `2.11.4` | golangci-lint version to install |\n| `--crush-version` | `latest` | Crush version to install |\n| `--gotestsum-version` | `latest` | gotestsum version to install |\n| `--moxide-version` | `latest` | markdown-oxide version to install |\n| `--sem-version` | `latest` | sem version to install |\n| `--rtk-version` | `latest` | rtk version to install |\n\nTool versions are passed as `--build-arg` to Docker. Build context is always the current directory (`.`).\n\n**Example:**\n\n```bash\n# Build with defaults\ncrusher build\n\n# Build with custom image name and tag\ncrusher build --name my-image --tag v1.0\n\n# Build using embedded Dockerfile with custom tool versions\ncrusher build --embed --crush-version 1.2.3 --go-version 1.24.0\n```\n\n### create\n\nCreate and start a Crush sandbox container with pre-configured volume mounts for config, data, skills, and workspace directories.\n\n```\ncrusher create --config PATH --data PATH --skills PATH --api-key KEY [--name NAME] [--image NAME] [--workspace PATH] [--github-token TOKEN] [--volume PATH]\n```\n\n| Flag | Default | Description |\n|------|---------|-------------|\n| `--config` / `-c` | *(required)* | Host path to Crush config directory |\n| `--data` / `-d` | *(required)* | Host path to Crush data directory |\n| `--skills` / `-s` | *(required)* | Host path to Crush skills directory |\n| `--api-key` / `-k` | *(required)* | API key for Crush |\n| `--name` / `-n` | *(auto-generated)* | Container name |\n| `--image` / `-i` | `crusher:latest` | Image name |\n| `--workspace` / `-w` | *(current dir)* | Host path to workspace directory |\n| `--github-token` / `-g` | *(none)* | GitHub personal access token |\n| `--volume` / `-v` | *(none)* | Additional host path to mount (read-only, repeatable) |\n\nRequired mounts are mapped under `/home/agent/crush/` inside the container. Extra volumes are mounted read-only under `/home/agent/mount/`.\n\n**Example:**\n\n```bash\n# Create a Crush container with directory mounts\ncrusher create \\\n  --config ~/.crush/config \\\n  --data ~/.crush/data \\\n  --skills ~/.crush/skills \\\n  --api-key \"sk-...\" \\\n  --workspace ~/my-project\n\n# Create with additional read-only volume and GitHub token\ncrusher create \\\n  --config ~/.crush/config \\\n  --data ~/.crush/data \\\n  --skills ~/.crush/skills \\\n  --api-key \"sk-...\" \\\n  --volume /data/reference \\\n  --github-token \"ghp_...\"\n```\n\n### sbx\n\nGenerate, validate, and pack a Docker Sandbox agent kit. Reads an optional `crush.json` config, renders a `spec.yaml`, validates with the `sbx` CLI, stores secrets, packs into a zip, and optionally creates the sandbox instance.\n\n```\ncrusher sbx --api-key KEY [--output PATH] [--config PATH] [--skills PATH] [--name NAME] [--create] [--crush-version VER] [--golangci-lint-version VER] [--go-version VER] [--gotestsum-version VER] [--moxide-version VER] [--sem-version VER] [--rtk-version VER]\n```\n\n| Flag | Default | Description |\n|------|---------|-------------|\n| `--api-key` / `-k` | *(required)* | OpenRouter API key |\n| `--output` / `-o` | `crush-sbx-kit.zip` | Path for the packed kit zip file |\n| `--config` / `-c` | *(default config)* | Path to `crush.json` (default OpenRouter config if omitted) |\n| `--skills` / `-s` | *(none)* | Path to skills directory |\n| `--name` / `-n` | *(current dir basename)* | Sandbox display name |\n| `--create` | `false` | Create the sandbox instance after packing |\n| `--crush-version` | `latest` | Crush version for `go install` |\n| `--golangci-lint-version` | `2.11.4` | golangci-lint version |\n| `--go-version` | `1.25.4` | Go toolchain version |\n| `--gotestsum-version` | `latest` | gotestsum version |\n| `--moxide-version` | `latest` | markdown-oxide version |\n| `--sem-version` | `latest` | sem version |\n| `--rtk-version` | `latest` | rtk version |\n\nThe pipeline: generate spec → validate kit → store secret → pack kit → (optionally create sandbox) → cleanup temp dir.\n\n**Example:**\n\n```bash\n# Pack a kit with default config\ncrusher sbx --api-key \"sk-or-...\"\n\n# Pack with custom config and skills, then create the sandbox\ncrusher sbx \\\n  --api-key \"sk-or-...\" \\\n  --config ~/.crush/config/crush.json \\\n  --skills ~/.crush/skills \\\n  --name my-sandbox \\\n  --create \\\n  --output ./my-kit.zip\n```\n\n## Project Structure\n\n```\n.\n├── cmd/\n│   └── crusher/\n│       └── main.go              # CLI entry point, subcommand registration\n├── internal/\n│   ├── containerbuild/\n│   │   ├── command.go           # build subcommand: CLI flags, InputFromCommand, Action\n│   │   ├── input.go             # Input, CommandSpec, DockerfileResource types\n│   │   ├── validate.go          # Pure Either-based input validation\n│   │   ├── args.go              # Pure argv rendering for container build\n│   │   ├── exec.go              # IOEither-based process execution with resource cleanup\n│   │   ├── resource.go          # FileResolver, EmbeddedResolver for Dockerfile\n│   │   ├── embed.go             # //go:embed Dockerfile\n│   │   └── Dockerfile           # Embedded default Dockerfile\n│   ├── containercreate/\n│   │   ├── command.go           # create subcommand: CLI flags, InputFromCommand, Action\n│   │   ├── input.go             # Input, ResolvedInput, ContainerResult, MountSpec types\n│   │   ├── validate.go          # Path validation and container name generation\n│   │   ├── args.go              # Pure argv rendering for container create\n│   │   ├── exec.go              # Process execution with container start\n│   │   ├── mounts.go            # Volume mount resolution\n│   │   └── namegen.go           # Container name auto-generation\n│   ├── containersbx/\n│   │   ├── command.go           # sbx subcommand: CLI flags, InputFromCommand, Action\n│   │   ├── input.go             # Input, ResolvedInput, KitResult, execState types\n│   │   ├── validate.go          # Input normalization and validation\n│   │   ├── specgen.go           # spec.yaml template rendering\n│   │   ├── config.go            # crush.json reader with OpenRouter default\n│   │   ├── exec.go              # Multi-stage pipeline: generate → validate → pack → create\n│   │   ├── embed.go             # //go:embed spec.yaml.tmpl\n│   │   └── spec.yaml.tmpl       # Docker Sandbox agent spec template\n│   └── fp/\n│       ├── conversion.go        # ToEither helper for IOEither → Either conversion\n│       └── conversion_test.go\n```\n\n### Packages\n\n| Package | Responsibility |\n|---------|---------------|\n| `internal/containerbuild` | OCI image builds — Dockerfile resolution, validation, `docker build` execution |\n| `internal/containercreate` | Container lifecycle — volume mount resolution, `docker create` + `docker start` |\n| `internal/containersbx` | Sandbox agent kit — `spec.yaml` generation, `sbx` CLI orchestration (validate, pack, create) |\n| `internal/fp` | Shared functional utilities — `ToEither` conversion combinator |\n\nAll packages are built with [fp-go](https://github.com/IBM/fp-go) functional programming combinators and use [urfave/cli](https://github.com/urfave/cli) for the CLI framework.\n\n## Development\n\n```bash\n# Run tests\ngotestsum --format pkgname-and-test-fails --format-hide-empty-pkg -- ./...\n\n# Run tests with verbose output\ngotestsum --format testdox --format-hide-empty-pkg -- ./...\n\n# Lint\ngolangci-lint run ./...\n\n# Format\ngolangci-lint fmt\n\n# Build\ngo build -o crusher ./cmd/crusher\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdictybase-docker%2Fcrusher","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdictybase-docker%2Fcrusher","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdictybase-docker%2Fcrusher/lists"}