Skip to content

refactor(update): switch to github releases and curl#2383

Merged
tusharmath merged 5 commits intomainfrom
update-using-curl
Feb 17, 2026
Merged

refactor(update): switch to github releases and curl#2383
tusharmath merged 5 commits intomainfrom
update-using-curl

Conversation

@tusharmath
Copy link
Copy Markdown
Collaborator

@tusharmath tusharmath commented Feb 11, 2026

Summary

Replace npm-based installation and update mechanism with GitHub releases and the official installation script, providing a more reliable and platform-agnostic update experience.

Context

The update system previously relied on npm for both installation (npx forgecode@latest) and updates (npm update -g forgecode --force). This approach had several limitations:

  • Required npm to be installed on the user's system
  • Version checking was done via npm registry instead of GitHub releases
  • Inconsistent with the actual binary distribution method (GitHub releases)

The official installation script (curl -fsSL https://forgecode.dev/install.sh | sh) is the recommended method for installing Forge and handles platform detection, binary downloads, and dependency installation (fzf, bat, fd) automatically.

Changes

  • README.md: Updated installation command from npx forgecode@latest to curl -fsSL https://forgecode.dev/install.sh | sh
  • crates/forge_main/src/update.rs:
    • Changed version check registry from registry::Crates to registry::GitHub with repo "antinomyhq/forge"
    • Updated update command to use the official installation script instead of npm
  • crates/forge_main/Cargo.toml: Changed update-informer feature from "crates" to "github"

Key Implementation Details

The update system now:

  1. Checks for new versions by querying GitHub releases at antinomyhq/forge
  2. When an update is available and confirmed (or auto-update is enabled), executes the official installation script
  3. The script handles platform detection (aarch64-apple-darwin, x86_64-unknown-linux-gnu, etc.) and downloads the appropriate binary

Use Cases

  • Users can install Forge without npm by running curl -fsSL https://forgecode.dev/install.sh | sh
  • Update mechanism now checks the actual release version from GitHub releases
  • Consistent installation and update experience across different platforms

Testing

# Verify the code compiles
cargo check

# Run update-related tests
cargo test --package forge_main --lib update

# Verify installation script works
curl -fsSL https://forgecode.dev/install.sh | sh

@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Feb 11, 2026

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.

✅ tusharmath
❌ forge-code-agent
You have signed the CLA already but the status is still pending? Let us recheck it.

@github-actions github-actions Bot added the type: refactor Code refactoring and restructuring. label Feb 11, 2026
// Spawn a new task that won't block the main application
let output = api
.execute_shell_command_raw(&format!("npm update -g {FORGE_NPM_PACKAGE} --force"))
.execute_shell_command_raw("curl -fsSL https://forgecode.dev/install.sh | sh")
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if someone has already installed using npm,we should use npm for update

@github-actions
Copy link
Copy Markdown

Action required: PR inactive for 5 days.
Status update or closure in 10 days.

@github-actions github-actions Bot added the state: inactive No current action needed/possible; issue fixed, out of scope, or superseded. label Feb 16, 2026
@tusharmath tusharmath enabled auto-merge (squash) February 17, 2026 03:18
@tusharmath tusharmath disabled auto-merge February 17, 2026 03:22
@tusharmath tusharmath enabled auto-merge (squash) February 17, 2026 03:22
@tusharmath tusharmath merged commit 4269d6a into main Feb 17, 2026
14 of 16 checks passed
@tusharmath tusharmath deleted the update-using-curl branch February 17, 2026 03:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

state: inactive No current action needed/possible; issue fixed, out of scope, or superseded. type: refactor Code refactoring and restructuring.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants