{"id":32799401,"url":"https://github.com/eirikb/gg","last_synced_at":"2026-04-06T12:03:34.848Z","repository":{"id":57540003,"uuid":"414118602","full_name":"eirikb/gg","owner":"eirikb","description":"Universal tools wrapper","archived":false,"fork":false,"pushed_at":"2026-03-03T11:41:01.000Z","size":534,"stargazers_count":25,"open_issues_count":7,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-03-10T09:23:48.490Z","etag":null,"topics":["cli","cross-platform","executable-manager","executable-wrapper","gradle","gradle-wrapper","gradlew","node","rust","software-version-manager","version-manager"],"latest_commit_sha":null,"homepage":"","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/eirikb.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":"2021-10-06T07:49:31.000Z","updated_at":"2026-03-03T11:32:01.000Z","dependencies_parsed_at":"2024-07-13T16:50:17.434Z","dependency_job_id":"b5736da6-a784-4307-a2ad-5fd153a9f923","html_url":"https://github.com/eirikb/gg","commit_stats":null,"previous_names":[],"tags_count":179,"template":false,"template_full_name":null,"purl":"pkg:github/eirikb/gg","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eirikb%2Fgg","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eirikb%2Fgg/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eirikb%2Fgg/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eirikb%2Fgg/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eirikb","download_url":"https://codeload.github.com/eirikb/gg/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eirikb%2Fgg/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31471470,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-06T08:36:52.050Z","status":"ssl_error","status_checked_at":"2026-04-06T08:36:51.267Z","response_time":112,"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","cross-platform","executable-manager","executable-wrapper","gradle","gradle-wrapper","gradlew","node","rust","software-version-manager","version-manager"],"created_at":"2025-11-06T02:07:47.865Z","updated_at":"2026-04-06T12:03:34.835Z","avatar_url":"https://github.com/eirikb.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# `gg.cmd`\n\n[![gg.cmd](https://github.com/eirikb/gg/actions/workflows/gg.yml/badge.svg)](https://github.com/eirikb/gg/actions/workflows/gg.yml)\n[![Release](https://badgen.net/github/release/eirikb/gg)](https://github.com/eirikb/gg/releases/latest/download/gg.cmd)\n\n[**[Changelog]**](https://github.com/eirikb/gg/releases)\n[**[Download]**](https://github.com/eirikb/gg/releases/latest/download/gg.cmd)\n\n![Image](https://github.com/user-attachments/assets/35d6bc4f-ea3b-4673-a874-45703c4de1d8)\n\n![Image](https://github.com/user-attachments/assets/93876050-9c28-4389-a77c-5a88f5af2811)\n\n`gg.cmd` is a cross-platform and cross-architecture command-line interface (CLI) that acts as an executable wrapper for\nvarious tools such as Gradle, JDK/JVM, Node.js, and Java. **It requires zero external dependencies** - works on plain\nAlpine and Ubuntu containers without curl/wget or updated CA certificates (all networking is built-in). Similar in\nfunctionality to gradlew (without need for JDK initially installed).\n\nInstall with bash (wget):\n\u003e wget ggcmd.io/gg.cmd\n\nInstall with bash (curl):\n\u003e curl -L ggcmd.io \u003e gg.cmd\n\nInstall with PowerShell:\n\u003e wget ggcmd.io -OutFile gg.cmd\n\nor\n\n[Download the latest release](https://github.com/eirikb/gg/releases/latest/download/gg.cmd)\n\n## GitHub Action\n\n```yaml\n- uses: eirikb/gg/action@main\n- run: gg.cmd gradle build\n```\n\n**Install?**  \nThe concept involves placing a copy of `gg.cmd` in the root directory of your project.  \nThis is similar to what you would do with `gradlew` or `mvnw`, except this method is applicable to multiple tools.  \nAs a result, your colleagues would not have to install anything on their host machines.\n\n## Features\n\n- **Zero dependencies** - Works on minimal containers (Alpine, Ubuntu) without curl/wget or CA certificates\n- **Configuration system** - Define version requirements and command aliases via `gg.toml` files\n- Simplify the management of other executables in your project\n- Automatically detect and execute the required executable version using project configuration files (such\n  as `package.json` for Node.js projects)\n- Support for chaining multiple executables (e.g. `gradle@6:java@17`)\n- Cross-platform compatibility (Windows, macOS, and Linux)\n- Cross-architecture compatibility (x86_64 and ARM)\n- Fast and lightweight\n\nBy default, installs tools in a global cache directory (`$HOME/.cache/gg` on Unix, `%UserProfile%\\.cache\\gg` on\nWindows).\nUse the `-l` flag to use a local cache (`.cache/gg` in current directory) instead.\nAdds every dependency into `PATH` before executing.\n\n## Configuration\n\n`gg.cmd` supports project-specific configuration via a `gg.toml` file. This allows you to define version requirements\nand command aliases for your project.\n\nNote, this is not a full task runner, if you need a full task runner, consider using [just](https://just.systems/),\n\n### Creating a Configuration File\n\nCreate a `gg.toml` configuration file in your project root:\n\n```bash\n./gg.cmd config init\n```\n\nThis creates a `gg.toml` file with the following structure:\n\n```toml\n# gg configuration file\n# See https://github.com/eirikb/gg for more information\n\n[dependencies]\n# Define version requirements for tools\n# Examples:\n# node = \"^18.0.0\"\n# java = \"17\"\n# gradle = \"~7.6.0\"\n\n[aliases]\n# Define command shortcuts\n# Examples:\n# build = \"gradle clean build\"\n# serve = \"node@18 server.js\"\n# test = \"npm test\"\n```\n\n### Configuration Features\n\n**Version Dependencies**: Ensure team members use compatible tool versions\n\n```toml\n[dependencies]\nnode = \"^18.0.0\"      # Allow 18.x.x versions\njava = \"17\"           # Require exactly Java 17\ngradle = \"~7.6.0\"     # Allow 7.6.x versions\n```\n\n**Command Aliases**: Create shortcuts for common commands\n\n```toml\n[aliases]\nbuild = \"gradle clean build\"\nserve = \"node@18 server.js --port 3000\"\ntest = \"npm test\"\ngen = \"dart scripts/generate.dart\"\n```\n\n### Using Aliases\n\nOnce defined, aliases can be used directly:\n\n```bash\n./gg.cmd build           # Expands to: ./gg.cmd gradle clean build\n./gg.cmd serve --dev     # Expands to: ./gg.cmd node@18 server.js --port 3000 --dev  \n./gg.cmd test --coverage # Expands to: ./gg.cmd npm test --coverage\n```\n\nAliases support `\u0026\u0026` for sequential execution:\n\n```toml\n[aliases]\nclean-build = \"gradle clean build\"\nbuild-and-test = \"clean-build \u0026\u0026 npm test\"\n```\n\n### Viewing Configuration\n\nView your current configuration:\n\n```bash\n./gg.cmd config show\n```\n\nThis will display the configuration file location, its contents, and parsed aliases/dependencies.\n\n## Usage\n\nUsing `gg.cmd` is easy. Simply place the executable in the root of your project and run it with the `gg.cmd` command\nfollowed\nby the desired executable and its required dependencies:\n\n```bash\n./gg.cmd [gg options] \u003cexecutable name\u003e@\u003cversion\u003e\u003c+include_tags\u003e\u003c-exclude_tags\u003e:\u003cdependent executable name\u003e@\u003cversion\u003e\u003c+include_tags\u003e\u003c-exclude_tags\u003e [executable arguments]\n```\n\n### Example\n\n```bash\nsh gg.cmd npm install\n```\n\n```\nUsage: ./gg.cmd [options] \u003cexecutable name\u003e@\u003cversion\u003e:\u003cdependent executable name\u003e@\u003cversion\u003e [program arguments]\n\nOptions:\n    -l              Use local cache (.cache/gg) instead of global cache\n    -v              Info output\n    -vv             Debug output\n    -vvv            Trace output\n    -w              Even more output\n    -h, --help      Print help\n    -V, --version   Print version\n    --os \u003cOS\u003e       Override target OS (windows, linux, mac)\n    --arch \u003cARCH\u003e   Override target architecture (x86_64, arm64, armv7)\n\nBuilt in commands:\n    update          Check for updates for all tools (including gg)\n    update -u       Update all tools that have updates available\n    update \u003ctool\u003e   Check for updates for specific tool (e.g., update flutter, update gg)\n    update \u003ctool\u003e -u Update specific tool (e.g., update flutter -u, update gg -u)\n    update \u003ctool\u003e -u -f Force update specific tool even if up to date (e.g., update gg -u -f)\n    help            Print help\n    tools           List all available tools\n    clean-cache     Clean cache (prompts for confirmation)\n    config init     Create a new gg.toml configuration file\n    config show     Show current configuration\n\nUpdate options:\n    -u              Actually perform the update (vs just checking)\n    -f              Force re-download even if already up to date (use with -u)\n    --major         Include major version updates (default: skip major versions)\n\nVersion syntax:\n    @X              Any X.y.z version (e.g. node@14 for any Node.js 14.x.y)\n    @X.Y            Any X.Y.z patch version (e.g. node@14.17 for any Node.js 14.17.z)\n    @X.Y.Z          Exactly X.Y.Z version (e.g. node@14.17.0 for exactly Node.js 14.17.0)\n    @^X.Y.Z         X.Y.Z or any compatible newer version (caret prefix)\n    @~X.Y.Z         X.Y.Z or any newer patch version (tilde prefix)\n    @=X.Y.Z         Exactly X.Y.Z version (equals prefix, same as X.Y.Z without prefix)\n\nExamples:\n    ./gg.cmd node\n    ./gg.cmd -l node                                      (use local cache)\n    ./gg.cmd gradle@6:java@17 clean build\n    ./gg.cmd -l gradle@6:java@17 clean build             (use local cache)\n    ./gg.cmd node@10 -e 'console.log(1)'\n    ./gg.cmd node@14.17.0 -v\n    ./gg.cmd -vv -w npm@14 start\n    ./gg.cmd java@-jdk+jre -version\n    ./gg.cmd jbang hello.java\n    ./gg.cmd bld version\n    ./gg.cmd maven compile\n    ./gg.cmd run:java@17 soapui\n    ./gg.cmd run:java@14 env\n    ./gg.cmd update\n    ./gg.cmd gh/cli/cli --version\n    ./gg.cmd --os windows --arch x86_64 deno --version    (test Windows Deno on Linux)\n    ./gg.cmd --os mac deno --help                         (test macOS Deno from anywhere)\n\nExample tools:\n    node        Node.js JavaScript runtime (npm, npx will also work)\n    java        Java runtime and development kit\n    gradle      Gradle build automation tool\n    go          Go programming language\n    flutter     Flutter SDK (dart will also work)\n\nRun 'gg tools' to see all available tools with descriptions\n\nGitHub repos can be accessed directly:\n    gh/\u003cowner\u003e/\u003crepo\u003e    Any GitHub release (e.g. gh/cli/cli)\n\nAvailable tags by tools:\n    java: +jdk, +jre, +lts, +sts, +mts, +ea, +ga, +headless, +headfull, +fx, +normal, +hotspot (defaults: +jdk, +ga)\n    node: +lts\n    go: +beta (excluded by default)\n    openapi: +beta (excluded by default)\n```\n\n## Node\n\nVersion from:\n\n* `engines` in `package.json`\n* Contents of `.nvmrc`\n\n## Gradle\n\nVersion from:\n\n* `distributionUrl` in `gradle/wrapper/gradle-wrapper.properties`\n* `distributionUrl` in `gradle.properties`\n\nDownload URL from:\n\n* `distributionUrl` in `gradle/wrapper/gradle-wrapper.properties`\n* `distributionUrl` in `gradle.properties`\n\n## JBang\n\nThe Java version is read from the JBang script using the [\n`//JAVA magic comment`](https://www.jbang.dev/documentation/guide/latest/javaversions.html).\n\n## Java\n\nVersion from:\n\n* `jdkVersion` in `gradle/wrapper/gradle-wrapper.properties`\n* `jdkVersion` in `gradle.properties`\n\n## Flutter\n\nVersion from:\n\n* `environment.flutter` in `pubspec.yaml`\n\n## Examples\n\nHere are a few examples of how `gg.cmd` can make your life easier:\n\n### Execute gradle\n\n```bash\n./gg.cmd gradle build\n```\n\n### Replace gradlew and gradle JARs by `gg.cmd`\n\nYou can replace `gradlew` with a single `gg.cmd` and `gradle.properties` and can\ndelete these files:\n\n* `gradle/wrapper/gradle-wrapper.jar`\n* `gradle/wrapper/gradle-wrapper.properties`\n* `gradlew`\n* `gradlew.bat`\n\n### Execute bld\n\nIn this example, [bld](https://rife2.com/bld) is used to run an app using `bld` for the build process:\n\n```bash\n./gg.cmd bld run\n```\n\n### Execute JBang\n\n```bash\n./gg.cmd jbang script.java\n```\n\n### Execute specific version of Node.js\n\n```bash\n./gg.cmd node@14\n```\n\n### Execute specific version of Gradle and the required version of JVM/JDK\n\n```bash\n./gg.cmd gradle@6:java@17 clean build\n```\n\n### Create a new node project\n\n```bash\n./gg.cmd npm init -y\n```\n\n### Create a new React project\n\n```bash\n./gg.cmd npx create-react-app my-app\ncp gg.cmd my-app\ncd my-app\n./gg.cmd npm start\n```\n\n### Execute code hosted on GitHub\n\n`gg.cmd` offers a GitHub executor.\nIt smartly checks the content and the available release files.\n\nFor instance, one can run [GitHub's CLI tool](https://cli.github.com/):\n\n```bash\n\u003e sh ./gg.cmd gh/cli/cli --version\ngh version 2.73.0 (2025-05-19)\nhttps://github.com/cli/cli/releases/tag/v2.73.0\n```\n\n### Using Configuration and Aliases\n\nCreate a `gg.toml` configuration file:\n\n```bash\n./gg.cmd config init\n```\n\nAdd some aliases and dependencies:\n\n```toml\n[dependencies]\nnode = \"^18.0.0\"\ngradle = \"~7.6.0\"\n\n[aliases]\ndev = \"node@18 server.js --dev\"\nbuild = \"gradle clean build\"\ntest = \"npm test --coverage\"\n```\n\nNow use the aliases:\n\n```bash\n./gg.cmd dev                # Runs: ./gg.cmd node@18 server.js --dev\n./gg.cmd build --parallel   # Runs: ./gg.cmd gradle clean build --parallel\n./gg.cmd test               # Runs: ./gg.cmd npm test --coverage\n```\n\n## Cache Management\n\n`gg.cmd` supports both global and local cache modes:\n\n### Global Cache (Default)\n\nBy default, tools are cached globally and shared across all projects:\n\n- **Unix/Linux/macOS**: `$HOME/.cache/gg`\n- **Windows**: `%UserProfile%\\.cache\\gg`\n\n```bash\n./gg.cmd node -v          # Uses global cache\n./gg.cmd gradle build     # Uses global cache\n```\n\n### Local Cache\n\nUse the `-l` flag to cache tools locally in the current project:\n\n```bash\n./gg.cmd -l node -v       # Uses .cache/gg in current directory\n./gg.cmd -l gradle build  # Uses .cache/gg in current directory\n```\n\n### Custom Cache Location\n\nSet the `GG_CACHE_DIR` environment variable to use a custom cache location:\n\n```bash\nexport GG_CACHE_DIR=\"/path/to/custom/cache\"\n./gg.cmd node -v          # Uses /path/to/custom/cache\n./gg.cmd -l node -v       # Still uses /path/to/custom/cache (ignores -l)\n```\n\n**Note**: When `GG_CACHE_DIR` is set, it takes precedence over both global and local cache modes.\n\n## Contributing\n\nWe welcome contributions to `gg.cmd`. If you have an idea for a new feature or have found a bug, please open an issue on\nthe [GitHub repository](https://github.com/eirikb/gg).\n\n## License\n\n`gg.cmd` is licensed under the MIT License. See [LICENSE](LICENSE) for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feirikb%2Fgg","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feirikb%2Fgg","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feirikb%2Fgg/lists"}