{"id":19015458,"url":"https://github.com/hansolo/discocli","last_synced_at":"2025-06-11T05:04:16.610Z","repository":{"id":40374865,"uuid":"461153099","full_name":"HanSolo/discocli","owner":"HanSolo","description":"Disco CLI is a command line interface for the foojay.io Disco API","archived":false,"fork":false,"pushed_at":"2022-07-14T13:26:58.000Z","size":823,"stargazers_count":8,"open_issues_count":0,"forks_count":3,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-23T01:49:51.592Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/HanSolo.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}},"created_at":"2022-02-19T10:08:22.000Z","updated_at":"2024-10-07T18:49:25.000Z","dependencies_parsed_at":"2022-07-15T21:30:52.029Z","dependency_job_id":null,"html_url":"https://github.com/HanSolo/discocli","commit_stats":null,"previous_names":[],"tags_count":17,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HanSolo%2Fdiscocli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HanSolo%2Fdiscocli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HanSolo%2Fdiscocli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HanSolo%2Fdiscocli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/HanSolo","download_url":"https://codeload.github.com/HanSolo/discocli/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HanSolo%2Fdiscocli/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259204773,"owners_count":22821154,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":"2024-11-08T19:37:25.487Z","updated_at":"2025-06-11T05:04:16.585Z","avatar_url":"https://github.com/HanSolo.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Disco CLI\n\n\u003cimg src=\"https://raw.githubusercontent.com/HanSolo/discocli/main/resources/banner.png\" alt=\"DiscoCLI\" style=\"width:200px;\"/\u003e\n\n![GitHub Workflow Status](https://img.shields.io/github/workflow/status/HanSolo/discocli/BuildNativeImage)\n\n![MacOS](https://badgen.net/badge/macos-x64/✓/green)\n![Windows](https://badgen.net/badge/windows-x64/✓/green)\n![Linux](https://badgen.net/badge/linux-x64/✓/green)\n![Linux](https://badgen.net/badge/linux-aarch64/✓/green)\n\n![stars](https://badgen.net/github/stars/HanSolo/discocli)\n\n![GitHub all releases](https://img.shields.io/github/downloads/HanSolo/discocli/total)\n\n![latest tag](https://badgen.net/github/tag/HanSolo/discocli)\n\n![license](https://badgen.net/github/license/HanSolo/discocli)\n\n\nDisco CLI is a command line interface for the [foojay.io](https://foojay.io) [Disco API](https://github.com/foojayio/discoapi)\n\nYou can either use the jar file and start it with java -jar discocli-17.0.15.jar (which needs JDK 17 to be\nthe current jdk) or\nyou can use the native image and call it via discocli.\nAt the moment there are binaries available for \n- Windows x64 (Intel)\n- Linux x64 (Intel)\n- Macos x64 (which also works on aarch64, thx to Rosetta2)\n\nThe available binaries can be found [here](https://github.com/HanSolo/discocli/releases)\n\nFrom version 17.0.3 on now the native images will always be build on each push using [github actions](https://github.com/HanSolo/discocli/actions) and can be downloaded from the action itself.\nKeep in mind that you might have to allow the downloaded binary to be executed on your local machine.\nOn Macos you need to open the binary by CTRL+RIGHT click and Open it once in the Finder and then it will work from the command line.\nOn Windows you have to double click the exe file and agree to execute it once, after that you can execute it also from the command line.\n\n\u003cb\u003eAttention:\u003c/b\u003e On Windows it might be needed to download and install the [Microsoft Visual C++ 2015 Redistributable Update 3 RC](https://www.microsoft.com/en-us/download/details.aspx?id=52685) to\nget the VCRUNTIME140.dll for Java based native images.\n\nThe operating system parameter (-os) can be left out if you would like to get a JDK for\nyour current machine because it will be detected automatically.\n\n\n#### Help:\nGet help by using the ```-h or --help``` parameter as follows:\n\n```shell\nUsing the jar:\njava -jar discocli-17.0.15.jar -h\n\nUsing the binary:\ndiscocli -h\n```\n\u003cbr\u003e\n\n#### Info:\nIf not specified, the distribution will default to Zulu and the \narchive type will default to ```tar.gz``` for Linux, Mac and to ```zip``` for Windows.\nIf you do not specify the operating system discocli will try to detect\nthe current operating system and use it.\nIn case you would like to download a version for Alpine Linux, you can\neither specify the ```-os``` parameter to ```-os alpine-linux``` or use\nthe lib c type parameter in combination with linux as os e.g. ```-os linux -lc musl```.\n\u003cbr\u003e\n\n#### Example usaging the jar file (needs JDK 17):\n\nGet Zulu with version 17.0.2 for windows including JavaFX:\n```shell\njava -jar discocli-17.0.15.jar -d zulu -v 17.0.2 -fx -os windows\n```\nGet the latest version of JDK 17 for Temurin on Linux:\n```shell\njava -jar discocli-17.0.15.jar -d temurin -v 17 -os linux -latest\n```\n\n\n#### Example using the binary:\n\nGet Zulu with version 17.0.2 for the current operating system including JavaFX:\n```shell\ndiscocli -d zulu -v 17.0.2 -fx\n```\n\nGet the latest version of JDK 16 for Liberica on Windows:\n```shell\ndiscocli -d liberica -v 16 -os windows -latest\n```\n\nGet the JDK 17.0.2 of temurin for macos with aarch64 as a tar.gz and store it to a folder\n```shell\ndiscocli -d temurin -v 17.0.2 -os macos -arc aarch64 -at tar.gz -p /Users/hansolo\n```\n\nIn case a JDK pkg cannot be found discocli will try to give you the available pkgs.\n```shell\ndiscocli -d liberica -v 12 -os linux -arc x64 -fx -latest\n\nSorry, defined pkg not found in Disco API\n\nPackages available for Liberica for version 12:\ndiscocli -d liberica -v 12.0.2 -os linux -lc glibc -arc amd64 -at tar.gz -pt jdk\ndiscocli -d liberica -v 12.0.1 -os linux -lc glibc -arc amd64 -at tar.gz -pt jdk\ndiscocli -d liberica -v 12 -os linux -lc glibc -arc amd64 -at tar.gz -pt jdk\n```\n\nFind available pkgs for a given set of parameters e.g. early access builds of zulu \nwith version 18 for mac on aarch64 as jdk\n```shell\ndiscocli -fu zulu,19,macos,aarch64,jdk,ea\n\nUpdates found  \n\ndiscocli -d zulu -v 19-ea+8 -os macos -lc libc -arc aarch64 -at zip -pt jdk -ea \ndiscocli -d zulu -v 19-ea+7 -os macos -lc libc -arc aarch64 -at zip -pt jdk -ea \ndiscocli -d zulu -v 19-ea+6 -os macos -lc libc -arc aarch64 -at zip -pt jdk -ea \ndiscocli -d zulu -v 19-ea+5 -os macos -lc libc -arc aarch64 -at zip -pt jdk -ea \ndiscocli -d zulu -v 19-ea+4 -os macos -lc libc -arc aarch64 -at zip -pt jdk -ea \ndiscocli -d zulu -v 19-ea+3 -os macos -lc libc -arc aarch64 -at zip -pt jdk -ea \ndiscocli -d zulu -v 19-ea+2 -os macos -lc libc -arc aarch64 -at zip -pt jdk -ea \n```\n\n\nFind distributions in a given folder\n```shell\ndiscocli -fd \"/System/Volumes/Data/Library/Java/JavaVirtualMachines/\"\n\nDistributions found\ngraalvm_ce17,22.0.0.2,macos,x86_64\nzulu,11.0.14.1,macos,aarch64\nzulu,16.0.1,macos,aarch64,fx\n*zulu,17.0.2,macos,aarch64\nzulu,18-ea+34,macos,aarch64\nzulu,8.0.322+6,macos,aarch64,fx\n```\nThe distribution that is currently defined in JAVA_HOME is marked with an '*'.\nIf you would like to check the default path for your operating system,\nyou can simply use\n```shell\ndiscocli -fd \"\"\n\nDistributions found\ngraalvm_ce17,22.0.0.2,macos,x86_64\nzulu,11.0.14.1,macos,aarch64\nzulu,16.0.1,macos,aarch64,fx\n*zulu,17.0.2,macos,aarch64\nzulu,18-ea+34,macos,aarch64\nzulu,8.0.322+6,macos,aarch64,fx\n```\nThe default paths for the different operating systems are:\n```\nMacos  : /System/Volumes/Data/Library/Java/JavaVirtualMachines/\nWindows: C:\\Program Files\\Java\\\nLinux  : /usr/lib/jvm\n```\n\nYou can check if there is an update available for a given distribution \nusing the following command\n```shell\nFind updates for Zulu 16.0.1 for MacOS on x64 as a JRE:\n\ndiscocli -fu \"zulu,16.0.1,macos,x64,jre\"\n\nUpdates found\n\ndiscocli -d zulu -v 16.0.2 -os macos -lc libc -arc x64 -at dmg -pt jre\ndiscocli -d zulu -v 16.0.2 -os macos -lc libc -arc x64 -at zip -pt jre\ndiscocli -d zulu -v 16.0.2 -os macos -lc libc -arc x64 -at tar.gz -pt jre\n\n\n\nFind updates for Liberica 17.0.1 for Windows on x64 as a JDK incl. JavaFX:\n\ndiscocli -fu \"liberica,17.0.1,windows,x64,jdk,fx\"\n\nUpdates found\n\ndiscocli -d liberica -v 17.0.2 -os windows -lc c_std_lib -arc amd64 -at zip -pt jdk -fx\ndiscocli -d liberica -v 17.0.2 -os windows -lc c_std_lib -arc amd64 -at msi -pt jdk -fx\n\n```\n\n\nYou also simply check for available packages for a set of parameters\n```shell\nFind all available jdk packages of Zulu for Macos on AARCH64 for version 17.0.2 \nthat comes as a tar.gz:\n\ndiscocli -f -d zulu -v 17.0.2 -arc aarch4 -os macos -at tar.gz -pt jdk\n\nPackages found for Zulu for version 17:\ndiscocli -d zulu -v 17.0.2 -os macos -lc libc -arc x64 -at tar.gz -pt jdk -fx\ndiscocli -d zulu -v 17.0.2 -os macos -lc libc -arc x64 -at tar.gz -pt jdk\n```\n\nIf you just want to download the latest available LTS release of a given distro\n````shell\nGet the latest available LTS release of Zulu for your machine:\n\ndiscocli -d zulu -latest-lts\n\n````\n\n\u003cbr\u003e\n\n#### Build native image with GraalVM:\n\n- Make sure you have GraalVM installed (including the native image feature)\n- Set GRAALVM_HOME environment variable\n- Find more info related to operating system specific requirements [here](https://www.graalvm.org/22.0/reference-manual/native-image/)\n\n\n```shell\nBuild the jar file using:\n./gradlew clean build\n```\n```shell\nGo to the build/libs folder:\ncd /build/libs\n```\n```shell\nWindows:\n%GRAALVM_HOME%\\bin\\native-image.cmd -jar discocli-17.0.15![img.png](img.png).jar --no-server -H:Name=discocli --no-fallback --static --enable-http --enable-https\n\nLinux:\n$GRAALVM_HOME/bin/native-image -jar discocli-17.0.15.jar --no-server -H:Name=discocli --no-fallback --static --enable-http --enable-https\n\nMacos:\n$GRAALVM_HOME/bin/native-image -jar ./discocli-17.0.15.jar --no-server -H:Name=discocli --no-fallback --enable-http --enable-https\n```\n\n#### Usage\n```\ndiscocli [-h] [-d=\u003cd\u003e] [-v=\u003cv\u003e] [-os=\u003cos\u003e] [-lc=\u003clc\u003e] [-arc=\u003carc\u003e] [-at=\u003cat\u003e] [-pt=\u003cpt\u003e] [-p=\u003cp\u003e] [-ea] [-fx] [-f] [-latest] [-i]\n\nDownload a JDK pkg defined by the given parameters:\n\n-h,   --help                  Show help\n\n-d,   --distribution=\u003cd\u003e      Distribution (e.g. zulu, temurin, etc.)\n\n-v,   --version=\u003cv\u003e           Version number (e.g. 17.0.2)\n\n-os,  --operating-system=\u003cos\u003e Operating system (e.g. windows, linux, macos)\n\n-lc,  --libc-type=\u003clc\u003e        Lib C type (libc, glibc, c_std_lib, musl)\n\n-arc, --architecture=\u003carc\u003e    Architecture (e.g. x64, aarch64)\n\n-at,  --archive-type=\u003cat\u003e     Archive tpye (e.g. tar.gz, zip)\n\n-pt,  --package-type=\u003cpt\u003e     Package type (e.g. jdk, jre)\n\n-p,   --path=\u003cp\u003e              The path where the JDK pkg should be saved to (e.g. /Users/hansolo)\n\n-ea,  --early-access          Include early access builds\n\n-fx,  --javafx                Bundled with JavaFX\n\n-f,   --find                  Find available JDK pkgs for given parameters\n\n-fd,  --find-distros          Find distributions in given path (e.g. ./)\n\n-fu,  --find-update           Find update for given distribution in the format DISTRO,VERSION,OPERATING SYSTEM,ARCHITECTURE,PACKAGE TYPE,FX(optional)\n                              (e.g. discocli -fu \"zulu,16.0.1,macos,x64,jdk\")\n\n-latest                       Latest available for given version number\n\n-latest-lts                   Latest available LTS release\n\n-i,   --info                  Info about parameters\n```\n\n#### Parameters\n```\n---------- Distributions ----------\naoj              (AdoptOpenJDK)\naoj_openj9       (AdoptOpenJDK OpenJ9)\nbisheng          (Bi Sheng)\ncorretto         (Corretto)\ndragonwell       (Dragonwell)\ngraalvm_ce11     (GraalVM CE11)\ngraalvm_ce16     (GraalVM CE16)\ngraalvm_ce17     (GraalVM CE17)\ngraalvm_ce8      (GraalVM CE8)\njetbrains        (JetBrains)\nkona             (Kona)\nliberica         (Liberica)\nliberica_native  (Liberica Native)\nmandrel          (Mandrel)\nmicrosoft        (Microsoft)\nojdk_build       (OJDK Build)\nopenlogic        (OpenLogic)\noracle           (Oracle)\noracle_open_jdk  (Oracle OpenJDK)\nsap_machine      (SAP Machine)\nsemeru           (Semeru)\nsemeru_certified (Semeru certified)\ntemurin          (Temurin)\ntrava            (Trava)\nzulu             (Zulu)\nzulu_prime       (Zulu Prime)\n\n---------- Operating systems ------\nwindows\nlinux\nmacos\nalpine-linux\n\n---------- Lib C types ------------\nglibc\nmusl\nlibc\nc_std_lib\n\n---------- Architectures ----------\naarch64\naarch32\narm\narm32\narmhf\narmel\narm64\nmips\nmipsel\nppc\nppc64\nppc64le\nriscv64\ns390x\nsparc\nsparcv9\nx64\nx32\ni386\ni386\ni386\nx86\nx86_64\namd64\nia64\n\n---------- Archive types ----------\napk\nbin\ncab\ndeb\ndmg\nmsi\npkg\nrpm\nsrc_tar\ntar\ntar.gz\ntgz\ntar.z\nzip\nexe\n\n---------- Package types ----------\njdk\njre\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhansolo%2Fdiscocli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhansolo%2Fdiscocli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhansolo%2Fdiscocli/lists"}