{"id":47616344,"url":"https://github.com/automatedtomato/demu","last_synced_at":"2026-04-01T21:28:50.704Z","repository":{"id":345481717,"uuid":"1184073558","full_name":"automatedtomato/demu","owner":"automatedtomato","description":"Fast, non-destructive Docker/Compose preview shell","archived":false,"fork":false,"pushed_at":"2026-03-19T23:12:01.000Z","size":536,"stargazers_count":0,"open_issues_count":6,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-03-20T01:26:58.750Z","etag":null,"topics":["cli","developer-tools","devtools","docker","dockerfile","rust"],"latest_commit_sha":null,"homepage":null,"language":"Rust","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/automatedtomato.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","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":null,"dco":null,"cla":null}},"created_at":"2026-03-17T08:18:43.000Z","updated_at":"2026-03-19T23:10:56.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/automatedtomato/demu","commit_stats":null,"previous_names":["automatedtomato/demu"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/automatedtomato/demu","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/automatedtomato%2Fdemu","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/automatedtomato%2Fdemu/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/automatedtomato%2Fdemu/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/automatedtomato%2Fdemu/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/automatedtomato","download_url":"https://codeload.github.com/automatedtomato/demu/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/automatedtomato%2Fdemu/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31292276,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-01T21:15:39.731Z","status":"ssl_error","status_checked_at":"2026-04-01T21:15:34.046Z","response_time":53,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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","developer-tools","devtools","docker","dockerfile","rust"],"created_at":"2026-04-01T21:28:47.994Z","updated_at":"2026-04-01T21:28:50.678Z","avatar_url":"https://github.com/automatedtomato.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# demu\n\n`demu` is a fast preview shell for Dockerfiles and Docker Compose files.\n\nIt lets you inspect the **filesystem, environment variables, and instruction history** a Dockerfile is trying to create — **without building or running a container**.\n\n## Why\n\nWhen you are editing a `Dockerfile` or `compose.yaml`, you often just want to answer questions like:\n\n- What files would be visible?\n- What is the working directory?\n- What env vars would exist?\n- Did this `COPY` land where I think it did?\n- What did each instruction actually do?\n- Where did this file come from — a `COPY`, a `RUN`, or a previous stage?\n- What services are in this Compose file and what do they depend on?\n\n`demu` is for that fast feedback loop.\n\n## Install\n\n### Pre-built binaries (recommended)\n\nDownload the latest release for your platform from the [Releases page](https://github.com/automatedtomato/demu/releases).\n\n```bash\n# Linux / macOS — extract and move to PATH\ntar xzf demu-0.4.0-x86_64-unknown-linux-gnu.tar.gz\nsudo mv demu-0.4.0-x86_64-unknown-linux-gnu/demu /usr/local/bin/\n```\n\nAvailable targets:\n\n| Platform | File |\n|----------|------|\n| Linux x86_64 | `demu-*-x86_64-unknown-linux-gnu.tar.gz` |\n| macOS (Apple Silicon / Intel via Rosetta 2) | `demu-*-aarch64-apple-darwin.tar.gz` |\n| Windows x86_64 | `demu-*-x86_64-pc-windows-msvc.zip` |\n\n### From source\n\nRequires Rust stable (`rustup` recommended).\n\n```bash\ngit clone https://github.com/automatedtomato/demu.git\ncd demu\ncargo install --path .\n```\n\n## Usage\n\n### Dockerfile mode\n\n```bash\ndemu -f Dockerfile\n```\n\nThis parses the Dockerfile, runs the simulation engine, prints any warnings, and drops you into an interactive preview shell.\n\nFor multi-stage Dockerfiles, use `--stage` to inspect a specific stage:\n\n```bash\ndemu -f Dockerfile --stage builder\ndemu -f Dockerfile --stage 0   # by numeric index\n```\n\n### Compose mode\n\n```bash\ndemu --compose compose.yaml --service api\n```\n\nThis merges the selected service's configuration, simulates its Dockerfile, applies `working_dir`, `environment`, `env_file`, and volume mount shadows, then drops you into the same preview shell — now reflecting the service's effective state.\n\n### Shell commands\n\n| Command | Description |\n|---------|-------------|\n| `ls [path]` | List directory contents |\n| `ls -la [path]` | List with details |\n| `cd \u003cpath\u003e` | Change directory |\n| `pwd` | Print working directory |\n| `cat \u003cfile\u003e` | Print file contents |\n| `find [path] [-name pattern]` | Search for files |\n| `env` | Print all environment variables |\n| `help` | Show available commands |\n| `exit` | Quit the shell |\n\n### Custom inspection commands\n\n| Command | Description |\n|---------|-------------|\n| `:history` | Show each instruction and its effect, in order |\n| `:layers` | Show a Docker-style layer summary |\n| `:installed` | List all simulated package installs by manager |\n| `:explain \u003cpath\u003e` | Show where a file came from (provenance) |\n| `:reload` | Re-read and re-simulate the Dockerfile in place |\n| `:services` | List all services in the Compose file (Compose mode) |\n| `:mounts` | Show volume mount shadows for the selected service (Compose mode) |\n| `:depends` | Show the dependency tree for the selected service (Compose mode) |\n| `which \u003ccmd\u003e` | Check whether a command appears to be installed |\n| `apt list --installed` | apt-style installed package listing |\n| `pip list` | pip-style installed package listing |\n\n### Flags\n\n| Flag | Description |\n|------|-------------|\n| `-f \u003cpath\u003e` | Path to the Dockerfile (required in Dockerfile mode) |\n| `--stage \u003cname\u003e` | Inspect a specific stage (name or numeric index) |\n| `--compose \u003cpath\u003e` | Path to a Compose file (enables Compose mode) |\n| `--service \u003cname\u003e` | Service to inspect (required with `--compose`) |\n| `--version` | Print version |\n| `--help` | Print help |\n\n### Demo\n\nTry the included demo Dockerfile:\n\n```bash\ndemu -f demo.dockerfile\n```\n\nThen explore:\n\n```bash\npwd          # /app/src\ncd /app\nls -la\ncat config/app.conf\nenv\n:history\n:layers\nexit\n```\n\n## What it is not\n\n`demu` is **not**:\n\n- a container runtime\n- a Docker replacement\n- a full shell emulator\n- a dependency solver\n\nIt prefers **fast, safe previews** over perfect fidelity. Simulated behavior is always surfaced via warnings so you know what is approximated.\n\n## Status\n\n**v0.4.0** — Docker Compose service preview.\n\n| Feature | Status |\n|---------|--------|\n| `FROM`, `WORKDIR`, `COPY`, `ENV` | Fully simulated |\n| `COPY --from=\u003cstage\u003e` | Fully simulated |\n| Multi-stage builds, `--stage` flag | Working |\n| `RUN` filesystem commands (`mkdir`, `touch`, `rm`, `mv`, `cp`) | Simulated |\n| `RUN` package installs (`apt-get`, `pip`, `npm`, `apk`) | Simulated |\n| `ls`, `cd`, `pwd`, `cat`, `find`, `env` | Working |\n| `:history`, `:layers` | Working |\n| `:explain \u003cpath\u003e` | Working |\n| `:installed`, `which`, `:reload` | Working |\n| `apt list --installed`, `pip list` | Working |\n| Skipped-command warnings with reason | Working |\n| Compose YAML parsing | Working |\n| Compose service preview (`--compose`, `--service`) | Working |\n| Compose `:services`, `:mounts`, `:depends` | Working |\n| Volume mount shadows | Working |\n| Path traversal containment (build.context/dockerfile) | Working |\n\nSee the [roadmap](./docs/07-roadmap.md) for the full plan.\n\n## Building and testing\n\n```bash\ncargo build\ncargo test\n```\n\n## Dev environment\n\nA containerized dev environment is available via Docker Compose:\n\n```bash\ndocker compose -f docker-compose.dev.yml run --rm dev bash\n```\n\n## Docs\n\n- [Product](./docs/01-product.md)\n- [Architecture](./docs/02-architecture.md)\n- [CLI and REPL](./docs/03-cli-and-repl.md)\n- [Dockerfile Semantics](./docs/04-dockerfile-semantics.md)\n- [RUN Simulation](./docs/05-run-simulation.md)\n- [Compose Plan](./docs/06-compose-plan.md)\n- [Roadmap](./docs/07-roadmap.md)\n- [Test Strategy](./docs/08-test-strategy.md)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fautomatedtomato%2Fdemu","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fautomatedtomato%2Fdemu","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fautomatedtomato%2Fdemu/lists"}