{"id":46180791,"url":"https://github.com/muyleanging/kforge","last_synced_at":"2026-03-13T10:06:14.817Z","repository":{"id":341588988,"uuid":"1170728883","full_name":"MuyleangIng/kforge","owner":"MuyleangIng","description":"Personal multi-platform Docker image builder powered by BuildKit — by Ing Muyleang / KhmerStack","archived":false,"fork":false,"pushed_at":"2026-03-02T13:44:33.000Z","size":43720,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-03-02T16:53:19.814Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/MuyleangIng.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":null,"dco":null,"cla":null}},"created_at":"2026-03-02T13:00:16.000Z","updated_at":"2026-03-02T13:44:37.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/MuyleangIng/kforge","commit_stats":null,"previous_names":["muyleanging/kforge"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/MuyleangIng/kforge","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MuyleangIng%2Fkforge","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MuyleangIng%2Fkforge/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MuyleangIng%2Fkforge/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MuyleangIng%2Fkforge/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MuyleangIng","download_url":"https://codeload.github.com/MuyleangIng/kforge/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MuyleangIng%2Fkforge/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30018497,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-02T17:00:27.440Z","status":"ssl_error","status_checked_at":"2026-03-02T17:00:03.402Z","response_time":60,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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":[],"created_at":"2026-03-02T20:00:44.013Z","updated_at":"2026-03-13T10:06:14.797Z","avatar_url":"https://github.com/MuyleangIng.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# kforge\n\n\u003e Personal multi-platform Docker image builder powered by BuildKit\n\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)\n[![Go](https://img.shields.io/badge/Go-1.21+-00ADD8.svg)](https://go.dev)\n[![Release](https://img.shields.io/badge/release-v1.1.1-blue.svg)](https://github.com/MuyleangIng/kforge/releases/tag/v1.1.1)\n\n---\n\n## About\n\n**kforge** is a personal Docker image build CLI inspired by Docker Buildx, built on top of BuildKit.\nIt works both as a **standalone binary** and as a **Docker CLI plugin** (`docker kforge`).\n\n**Made by:** Ing Muyleang\n**Founder:** [KhmerStack](https://github.com/KhmerStack)\n\n---\n\n## Features\n\n- **Multi-platform builds** — `linux/amd64`, `linux/arm64`, and more simultaneously\n- **Docker plugin mode** — works as `docker kforge build ...` (same as `docker buildx`)\n- **Interactive setup wizard** — `kforge setup` guides QEMU or multi-node configuration\n- **5 progress styles** — spinner, bar, banner, dots, plain (pick at runtime)\n- **Declarative bake config** — define targets in `kforge.hcl` or `kforge.json`\n- **Project detection + Dockerfile generation** — detect Next.js, React, Vue, NestJS, Node, Spring Boot, FastAPI, Flask, Django, or plain HTML and generate a suitable Dockerfile\n- **Project overrides** — `.kforge.yml` can pin framework, runtime, image name, healthcheck, env defaults, and verify behavior\n- **Starter project generator** — `kforge init` can create a demo app or generate Docker assets from an existing project\n- **Build + run + check** — `kforge verify` builds locally, runs the container, waits for readiness, and checks HTTP endpoints\n- **CI/CD bootstrap** — `kforge ci init` generates GitHub Actions and GitLab CI pipelines for build, verify, push, and optional deploy stages\n- **Deploy bootstrap** — `kforge deploy init` generates `docker-compose.yml`, `render.yaml`, and `fly.toml` from detected project settings\n- **Environment diagnostics** — `kforge doctor` checks Docker, Buildx, contexts, and builders\n- **Flexible caching** — registry, local, S3, Azure, GitHub Actions\n- **Secrets** — inject files without baking them into layers\n- **Registry auth** — reads your `~/.docker/config.json` automatically\n- **Builder management** — create, list, switch, and remove builders\n\n---\n\n## Install\n\nDownload pre-built packages from the [v1.1.1 release page](https://github.com/MuyleangIng/kforge/releases/tag/v1.1.1).\nVerify downloads with [checksums.txt](https://github.com/MuyleangIng/kforge/releases/download/v1.1.1/checksums.txt).\n\n### macOS (Apple Silicon / arm64)\n\n**tar.gz (terminal):**\n```bash\ncurl -Lo kforge.tar.gz https://github.com/MuyleangIng/kforge/releases/download/v1.1.1/kforge_1.1.1_darwin_arm64.tar.gz\ntar -xzf kforge.tar.gz\nsudo mv kforge /usr/local/bin/\n\n# Verify\nkforge version\n```\n\n**DMG installer (GUI):**\n```bash\ncurl -Lo kforge.dmg https://github.com/MuyleangIng/kforge/releases/download/v1.1.1/kforge_v1.1.1_darwin_arm64.dmg\nopen kforge.dmg\n```\n\n### macOS (Intel / amd64)\n\n**tar.gz (terminal):**\n```bash\ncurl -Lo kforge.tar.gz https://github.com/MuyleangIng/kforge/releases/download/v1.1.1/kforge_1.1.1_darwin_amd64.tar.gz\ntar -xzf kforge.tar.gz\nsudo mv kforge /usr/local/bin/\n\n# Verify\nkforge version\n```\n\n**DMG installer (GUI):**\n```bash\ncurl -Lo kforge.dmg https://github.com/MuyleangIng/kforge/releases/download/v1.1.1/kforge_v1.1.1_darwin_amd64.dmg\nopen kforge.dmg\n```\n\n### Linux (amd64)\n\n**Debian / Ubuntu (.deb):**\n```bash\ncurl -Lo kforge.deb https://github.com/MuyleangIng/kforge/releases/download/v1.1.1/kforge_1.1.1_linux_amd64.deb\nsudo dpkg -i kforge.deb\n\n# Verify\nkforge version\n```\n\n**RHEL / Fedora / CentOS (.rpm):**\n```bash\ncurl -Lo kforge.rpm https://github.com/MuyleangIng/kforge/releases/download/v1.1.1/kforge_1.1.1_linux_amd64.rpm\nsudo rpm -i kforge.rpm\n\n# Verify\nkforge version\n```\n\n**tar.gz (any distro):**\n```bash\ncurl -Lo kforge.tar.gz https://github.com/MuyleangIng/kforge/releases/download/v1.1.1/kforge_1.1.1_linux_amd64.tar.gz\ntar -xzf kforge.tar.gz\nsudo mv kforge /usr/local/bin/\n\n# Verify\nkforge version\n```\n\n### Linux (arm64)\n\n**Debian / Ubuntu (.deb):**\n```bash\ncurl -Lo kforge.deb https://github.com/MuyleangIng/kforge/releases/download/v1.1.1/kforge_1.1.1_linux_arm64.deb\nsudo dpkg -i kforge.deb\n\n# Verify\nkforge version\n```\n\n**RHEL / Fedora / CentOS (.rpm):**\n```bash\ncurl -Lo kforge.rpm https://github.com/MuyleangIng/kforge/releases/download/v1.1.1/kforge_1.1.1_linux_arm64.rpm\nsudo rpm -i kforge.rpm\n\n# Verify\nkforge version\n```\n\n**tar.gz (any distro):**\n```bash\ncurl -Lo kforge.tar.gz https://github.com/MuyleangIng/kforge/releases/download/v1.1.1/kforge_1.1.1_linux_arm64.tar.gz\ntar -xzf kforge.tar.gz\nsudo mv kforge /usr/local/bin/\n\n# Verify\nkforge version\n```\n\n### Windows (amd64)\n\n```powershell\n# Download zip\ncurl -Lo kforge.zip https://github.com/MuyleangIng/kforge/releases/download/v1.1.1/kforge_1.1.1_windows_amd64.zip\n\n# Extract\nExpand-Archive kforge.zip -DestinationPath C:\\tools\\kforge\n\n# Add C:\\tools\\kforge to your PATH, then verify\nkforge version\n```\n\n### Homebrew (coming soon)\n\n```bash\n# brew install kforge\n```\n\n### Build from source\n\n```bash\ngit clone https://github.com/MuyleangIng/kforge\ncd kforge\ngo build -o kforge ./cmd/\nsudo mv kforge /usr/local/bin/\n```\n\n### Install as Docker CLI plugin\n\n```bash\nmkdir -p ~/.docker/cli-plugins\ngo build -o ~/.docker/cli-plugins/docker-kforge ./cmd/\nchmod +x ~/.docker/cli-plugins/docker-kforge\n```\n\nNow use both:\n\n```bash\nkforge build ...           # standalone\ndocker kforge build ...    # via Docker CLI (just like docker buildx)\n```\n\n---\n\n## Progress Styles\n\nUse `--progress \u003cstyle\u003e` during any build:\n\n| Style | What you see |\n|---|---|\n| `auto` | Spinner if TTY, plain otherwise **(default)** |\n| `spinner` | Animated spinner + colored step names + timing |\n| `bar` | ASCII progress bar per Dockerfile stage |\n| `banner` | Big ASCII banner header + streaming logs |\n| `dots` | Minimal pulsing dot + step name |\n| `plain` | Raw log output, no colors |\n\n```bash\nkforge build --progress spinner -t myapp .\nkforge build --progress bar     -t myapp .\nkforge build --progress banner  -t myapp .\nkforge build --progress dots    -t myapp .\nkforge build --progress plain   -t myapp .\n```\n\n---\n\n## Setup (Multi-platform wizard)\n\nRun the interactive setup wizard to configure your builder:\n\n```bash\nkforge setup\n# or via Docker plugin:\ndocker kforge setup\n```\n\nThe wizard guides you through:\n\n```\n  ██╗  ██╗███████╗ ██████╗ ██████╗  ██████╗ ███████╗\n  ██║ ██╔╝██╔════╝██╔═══██╗██╔══██╗██╔════╝ ██╔════╝\n  █████╔╝ █████╗  ██║   ██║██████╔╝██║  ███╗█████╗\n  ██╔═██╗ ██╔══╝  ██║   ██║██╔══██╗██║   ██║██╔══╝\n  ██║  ██╗██║     ╚██████╔╝██║  ██║╚██████╔╝███████╗\n  ╚═╝  ╚═╝╚═╝      ╚═════╝ ╚═╝  ╚═╝ ╚═════╝ ╚══════╝\n\nChoose your build strategy:\n  1) QEMU emulation      Build all platforms on one machine (easiest)\n  2) Multiple native nodes  Use separate machines per platform (fastest)\n  3) Both (recommended)  Native nodes first, QEMU as fallback\n  q) Quit\n```\n\n**Option 1 — QEMU (one machine):**\nInstalls QEMU via `docker run --privileged --rm tonistiigi/binfmt --install all`\nthen creates a BuildKit builder. Best for most people.\n\n**Option 2 — Multiple native nodes:**\nPrompts you for Docker context names per platform, then runs:\n```bash\ndocker buildx create --use --name mybuild node-amd64\ndocker buildx create --append --name mybuild node-arm64\n```\n\n---\n\n## Usage\n\n### Detect a project and generate Docker assets\n\nIf a project does not have a `Dockerfile` yet, `kforge` can detect the app type and generate one for you.\n\n```bash\n# Inspect the current project\nkforge detect\n\n# Detect another directory\nkforge detect ./apps/web\n\n# Show the generated Dockerfile without writing files\nkforge detect --print-dockerfile\n\n# Generate Dockerfile + .dockerignore + kforge.hcl from an existing app\nkforge init --detect\n\n# Force a framework or Node version if detection needs help\nkforge init --detect --framework next --node 20\nkforge init --detect --framework fastapi --python 3.12\nkforge init --detect --framework spring --java 21\nkforge init --detect --framework flask --python 3.12\nkforge init --detect --framework django --python 3.12\n```\n\nDetection currently supports:\n\n- Next.js\n- React / Vite-style SPA\n- Vue\n- NestJS\n- Generic Node.js apps\n- Spring Boot\n- FastAPI\n- Flask\n- Django\n- Plain static HTML\n\nRuntime version selection is resolved from:\n\n- Node: `package.json` `engines.node`, then `.nvmrc`, then `.node-version`\n- Python: `pyproject.toml` `requires-python`, then `.python-version`, then `runtime.txt`\n- Java: Maven/Gradle project settings when present\n\nYou can override the detected runtime with `--node`, `--python`, or `--java`.\n\n### Project overrides with `.kforge.yml`\n\nYou can pin or adjust detection results in a `.kforge.yml` file at the project root.\n\n```yaml\nimage: api-demo\nframework: flask\npython: \"3.12\"\nport: 8000\nhealthcheck: /health\napp_module: app:app\nenv:\n  APP_ENV: staging\nverify:\n  path: /health\n  timeout_seconds: 20\ndeploy:\n  compose:\n    service: web\n  render:\n    name: api-demo\n    plan: starter\n    region: oregon\n  fly:\n    app: api-demo\n    primary_region: iad\n    memory_mb: 512\nci:\n  main_branch: main\n  platforms:\n    - linux/amd64\n  deploy: render\n  deploy_path: /srv/api-demo\n  github:\n    workflow: kforge-ci.yml\n```\n\nUseful fields:\n\n- `framework`\n- `image`\n- `node`, `python`, `java`\n- `port`\n- `healthcheck`\n- `app_module`\n- `start_command`\n- `env`\n- `verify.path`, `verify.port`, `verify.timeout_seconds`, `verify.env`\n- `deploy.port`, `deploy.healthcheck`, `deploy.command`, `deploy.env`\n- `deploy.compose.service`\n- `deploy.render.name`, `deploy.render.plan`, `deploy.render.region`\n- `deploy.fly.app`, `deploy.fly.primary_region`, `deploy.fly.memory_mb`\n- `ci.image`, `ci.main_branch`, `ci.context`, `ci.platforms`\n- `ci.auto`, `ci.verify`, `ci.push`\n- `ci.deploy`, `ci.deploy_path`\n- `ci.github.workflow`, `ci.gitlab.file`\n\n### Build\n\n```bash\n# Build and load into local Docker\nkforge build -t muyleangin/myapp:latest .\n\n# Docker plugin mode (same as docker buildx!)\ndocker kforge build -t muyleangin/myapp:latest .\n\n# Multi-platform push\nkforge build --platform linux/amd64,linux/arm64 --push -t muyleangin/myapp:latest .\n\n# Registry cache\nkforge build \\\n  --cache-from type=registry,ref=muyleangin/myapp:cache \\\n  --cache-to   type=registry,ref=muyleangin/myapp:cache,mode=max \\\n  --push -t muyleangin/myapp:latest .\n\n# Build args + target stage\nkforge build --build-arg VERSION=1.2.3 --target release -t myapp:1.2.3 .\n\n# Build without a Dockerfile by auto-generating one in a temp file\nkforge build --auto -t myapp:dev .\n\n# Same, but force a project type or Node version\nkforge build --auto --framework next --node 20 -t myapp:dev .\n\n# Backend auto-detect\nkforge build --auto --framework fastapi --python 3.12 -t api:dev .\nkforge build --auto --framework spring --java 21 -t api:dev .\nkforge build --auto --framework flask --python 3.12 -t api:dev .\nkforge build --auto --framework django --python 3.12 -t api:dev .\n\n# Secrets\nkforge build --secret id=mysecret,src=./token.txt -t myapp .\n```\n\nIf no `Dockerfile` exists and `--auto` is not set, `kforge build` now stops with a helpful message telling you to run `kforge init --detect` or `kforge build --auto`.\n\n### Bake (declarative builds)\n\nCreate a `kforge.hcl` file:\n\n```hcl\nvariable \"TAG\" { default = \"latest\" }\n\ntarget \"app\" {\n  context    = \".\"\n  dockerfile = \"Dockerfile\"\n  platforms  = [\"linux/amd64\", \"linux/arm64\"]\n  tags       = [\"muyleangin/app:${TAG}\"]\n  cache-from = [\"type=registry,ref=muyleangin/app:cache\"]\n  cache-to   = [\"type=registry,ref=muyleangin/app:cache,mode=max\"]\n  push       = true\n}\n\ngroup \"default\" {\n  targets = [\"app\"]\n}\n```\n\n```bash\nkforge bake                              # builds \"default\" group\nkforge bake app                          # builds specific target\nkforge bake --set app.platforms=linux/arm64\nTAG=1.1.1 kforge bake                    # pass variable via env\nkforge bake -f ci/kforge.hcl            # custom file\n```\n\n### Builder Management\n\n```bash\nkforge builder create --name mybuilder\nkforge builder create --name remote --driver remote --endpoint tcp://buildkitd:1234\nkforge builder ls\nkforge builder use mybuilder\nkforge builder rm mybuilder\n```\n\n### Doctor\n\n```bash\nkforge doctor\n```\n\n### Verify\n\n```bash\nkforge verify\nkforge verify ./examples/fastapi-auto\nkforge verify --path /health --env APP_ENV=staging .\nkforge verify --keep-running ./examples/django-auto\n```\n\n`kforge verify` will:\n\n- build the image locally\n- run it on a random localhost port\n- wait for the detected or configured health path\n- print the HTTP response summary\n- stop the container unless `--keep-running` is set\n\n### CI/CD\n\n```bash\nkforge ci init\nkforge ci init --target github\nkforge ci init --target gitlab --deploy compose\nkforge ci init --print .\n```\n\n`kforge ci init` will:\n\n- detect the project and load `.kforge.yml` overrides\n- generate `.github/workflows/kforge-ci.yml` and/or `.gitlab-ci.yml`\n- create missing Docker assets first when the project does not have a `Dockerfile`\n- optionally add a deploy stage for `compose`, `render`, or `fly`\n- generate the matching deploy file if the selected CI deploy target needs one\n\nThe generated pipelines are based on the current `kforge` commands:\n\n- `kforge detect`\n- `kforge verify`\n- `kforge build --push`\n- deploy hooks for `docker compose`, Render, or Fly.io\n\n### Deploy\n\n```bash\nkforge deploy init\nkforge deploy init ./examples/flask-auto\nkforge deploy init --target compose\nkforge deploy init --target render,fly ./examples/django-auto\nkforge deploy init --print .\n```\n\n`kforge deploy init` will:\n\n- detect the project and load `.kforge.yml` overrides\n- generate missing Docker assets when `Dockerfile` or `kforge.hcl` do not exist yet\n- write `docker-compose.yml`, `render.yaml`, and `fly.toml`\n- let you limit output with `--target compose`, `--target render`, or `--target fly`\n- print the files instead of writing them when `--print` is set\n\n### Init\n\n```bash\nkforge init --name myapp\nkforge init --dir ./demo --force\nkforge init --detect\nkforge init --detect --framework react --node 22\nkforge init --detect --framework fastapi --python 3.12\nkforge init --detect --framework spring --java 21\nkforge init --detect --framework flask --python 3.12\nkforge init --detect --framework django --python 3.12\nkforge init --detect --print-dockerfile\n```\n\n---\n\n## Cache Backends\n\n| Type | Example |\n|---|---|\n| Registry | `type=registry,ref=muyleangin/app:cache` |\n| Local | `type=local,dest=/tmp/cache` |\n| GitHub Actions | `type=gha` |\n| S3 | `type=s3,bucket=mybucket,region=us-east-1` |\n| Azure Blob | `type=azblob,account=myaccount,name=mycache` |\n\n---\n\n## Secrets\n\n```bash\nkforge build --secret id=mysecret,src=/path/to/secret .\n```\n\nIn your Dockerfile:\n\n```dockerfile\nRUN --mount=type=secret,id=mysecret cat /run/secrets/mysecret\n```\n\n---\n\n## Project Structure\n\n```\nkforge/\n├── cmd/main.go              # entry point (standalone + Docker plugin)\n├── commands/\n│   ├── build.go             # kforge build\n│   ├── bake.go              # kforge bake\n│   ├── builder.go           # kforge builder create/ls/use/rm\n│   ├── ci.go                # kforge ci init\n│   ├── detect.go            # kforge detect\n│   ├── deploy.go            # kforge deploy init\n│   ├── doctor.go            # kforge doctor\n│   ├── init.go              # kforge init\n│   ├── verify.go            # kforge verify\n│   └── version.go           # kforge version\n├── internal/project/        # project detection + generated Docker templates\n├── internal/meta/meta.go    # shared version/tool metadata\n├── builder/builder.go       # builder config store (~/.kforge/)\n├── bake/bake.go             # HCL + JSON config file parser\n└── util/progress/\n    └── progress.go          # 5 styled progress renderers\n```\n\n---\n\n\u003cp align=\"center\"\u003e\n  Made with ❤️ by \u003cstrong\u003eIng Muyleang\u003c/strong\u003e · Founder of \u003ca href=\"https://github.com/KhmerStack\"\u003eKhmerStack\u003c/a\u003e\n\u003c/p\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmuyleanging%2Fkforge","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmuyleanging%2Fkforge","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmuyleanging%2Fkforge/lists"}