Skip to content

Commit 4269d6a

Browse files
tusharmathTushar Mathurautofix-ci[bot]
authored
refactor(update): switch to github releases and curl (#2383)
Co-authored-by: Tushar Mathur <tushar@Tushars-MacBook-Pro.local> Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
1 parent 141ddc0 commit 4269d6a

3 files changed

Lines changed: 7 additions & 11 deletions

File tree

README.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<h1 align="center">⚒️ Forge: AI-Enhanced Terminal Development Environment</h1>
22
<p align="center">A comprehensive coding agent that integrates AI capabilities with your development environment</p>
33

4-
<p align="center"><code>npx forgecode@latest</code></p>
4+
<p align="center"><code>curl -fsSL https://forgecode.dev/install.sh | sh</code></p>
55

66
[![CI Status](https://img.shields.io/github/actions/workflow/status/antinomyhq/forge/ci.yml?style=for-the-badge)](https://github.com/antinomyhq/forge/actions)
77
[![GitHub Release](https://img.shields.io/github/v/release/antinomyhq/forge?style=for-the-badge)](https://github.com/antinomyhq/forge/releases)
@@ -41,7 +41,7 @@
4141
To get started with Forge, run the command below:
4242

4343
```bash
44-
npx forgecode@latest
44+
curl -fsSL https://forgecode.dev/install.sh | sh
4545
```
4646

4747
On first run, Forge will guide you through setting up your AI provider credentials using the interactive login flow. Alternatively, you can configure providers beforehand:
@@ -53,7 +53,6 @@ forge provider login
5353
# Then start Forge
5454
forge
5555
```
56-
5756
That's it! Forge is now ready to assist you with your development tasks.
5857

5958
## Usage Examples

crates/forge_main/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ strum_macros.workspace = true
4646

4747
convert_case.workspace = true
4848
update-informer = { version = "1.2.0", default-features = false, features = [
49-
"npm",
49+
"github",
5050
"ureq",
5151
"rustls-tls",
5252
] }

crates/forge_main/src/update.rs

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,11 @@ use forge_api::{API, Update};
55
use forge_tracker::VERSION;
66
use update_informer::{Check, Version, registry};
77

8-
/// Package name for forge on npm.
9-
const FORGE_NPM_PACKAGE: &str = "forgecode";
10-
11-
/// Runs npm update in the background, failing silently
8+
/// Runs the official installation script to update Forge, failing silently
129
async fn execute_update_command(api: Arc<impl API>) {
1310
// Spawn a new task that won't block the main application
1411
let output = api
15-
.execute_shell_command_raw(&format!("npm update -g {FORGE_NPM_PACKAGE} --force"))
12+
.execute_shell_command_raw("curl -fsSL https://forgecode.dev/install.sh | sh")
1613
.await;
1714

1815
match output {
@@ -72,8 +69,8 @@ pub async fn on_update(api: Arc<impl API>, update: Option<&Update>) {
7269
return;
7370
}
7471

75-
let informer =
76-
update_informer::new(registry::Npm, FORGE_NPM_PACKAGE, VERSION).interval(frequency.into());
72+
let informer = update_informer::new(registry::GitHub, "antinomyhq/forge", VERSION)
73+
.interval(frequency.into());
7774

7875
if let Some(version) = informer.check_version().ok().flatten()
7976
&& (auto_update || confirm_update(version).await)

0 commit comments

Comments
 (0)