gpt-4.1-mini-2025-04-14· OpenAI
LMArena Human Preference 140K
give me a shell command to get the latest release from github
- User
give me a shell command to get the latest release from github
- Assistant
To get the latest release tag from a GitHub repository using a shell command, you can use
curlto query the GitHub API andjqto parse the JSON response.Here’s a generic command to get the latest release tag name:
curl --silent "https://api.github.com/repos/OWNER/REPO/releases/latest" | jq -r .tag_nameReplace:
OWNERwith the GitHub username or organization nameREPOwith the repository name
Example:
To get the latest release tag of the
docker/clirepository:curl --silent "https://api.github.com/repos/docker/cli/releases/latest" | jq -r .tag_name
Notes:
- You need
jqinstalled to parse JSON. On Amazon Linux 2023, you can install it with:sudo dnf install jq - If you want to avoid rate limits, you can authenticate with a GitHub token by adding a header:
curl -H "Authorization: token YOUR_GITHUB_TOKEN" --silent "https://api.github.com/repos/OWNER/REPO/releases/latest" | jq -r .tag_name
Let me know if you want a version without
jq!
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.