feat: add built-in upgrade command for self-update (#898)
Adds a new `agent-browser upgrade` command that automatically detects the installation method (npm, Homebrew, or Cargo) and runs the appropriate update command. **Changes:** - Added new `upgrade.rs` module with upgrade logic - Updated `main.rs` to handle the `upgrade` command - Added upgrade help text in `output.rs` - Updated README.md and documentation with upgrade instructions - Updated SKILL.md to mention the upgrade command **Implementation details:** - Fetches latest version from npm registry to show version diff - Auto-detects installation method by checking Homebrew, Cargo paths, and npm global packages - Provides fallback instructions if installation method cannot be determined - Uses existing color module for consistent styled output - Gracefully handles network failures and continues with upgrade Fixes #895
This commit is contained in:
@@ -58,6 +58,16 @@ On Linux, install system dependencies:
|
||||
agent-browser install --with-deps
|
||||
```
|
||||
|
||||
### Updating
|
||||
|
||||
Upgrade to the latest version:
|
||||
|
||||
```bash
|
||||
agent-browser upgrade
|
||||
```
|
||||
|
||||
Detects your installation method (npm, Homebrew, or Cargo) and runs the appropriate update command automatically.
|
||||
|
||||
### Requirements
|
||||
|
||||
- **Chrome** - Run `agent-browser install` to download Chrome from [Chrome for Testing](https://developer.chrome.com/blog/chrome-for-testing/) (Google's official automation channel). No Playwright or Node.js required for the daemon.
|
||||
@@ -339,6 +349,7 @@ agent-browser reload # Reload page
|
||||
```bash
|
||||
agent-browser install # Download Chrome from Chrome for Testing (Google's official automation channel)
|
||||
agent-browser install --with-deps # Also install system deps (Linux)
|
||||
agent-browser upgrade # Upgrade agent-browser to the latest version
|
||||
```
|
||||
|
||||
## Authentication
|
||||
|
||||
Reference in New Issue
Block a user