Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion src/rtk/devcontainer-feature.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
{
"name": "rtk",
"id": "rtk",
"version": "1.0.0",
"version": "1.1.0",
"description": "CLI proxy that reduces LLM token consumption by 60-90% on common dev commands. Single Rust binary, zero dependencies.",
"options": {
"version": {
"type": "string",
"default": "latest",
"description": "Version of rtk to install from GitHub releases e.g. v0.38.0"
},
"ghtoken": {
"type": "string",
"default": "",
"description": "GitHub token to use for accessing 'latest' release API (optional, but recommended to avoid rate limits)"
}
}
}
8 changes: 7 additions & 1 deletion src/rtk/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,13 @@ check_packages curl jq ca-certificates

# Function to get the latest version from GitHub API
get_latest_version() {
curl -s "${GITHUB_API_REPO_URL}/latest" | jq -r ".tag_name"
if [ -n "$GHTOKEN" ]; then
# Use the token for authentication to avoid rate limits
AUTH_HEADER="-H \"Authorization: Bearer $GHTOKEN\""
else
AUTH_HEADER=""
fi
curl -s ${AUTH_HEADER} "${GITHUB_API_REPO_URL}/latest" | jq -r ".tag_name"
}

# Check if a version is passed as an argument
Expand Down