Add self-update command
CI / Build (push) Waiting to run
CI / Test (push) Waiting to run
CI / Build (push) Waiting to run
CI / Test (push) Waiting to run
This commit is contained in:
+2
-2
@@ -6,12 +6,12 @@ Cassady tools may list, search, and read this directory. Mutating tools are bloc
|
||||
|
||||
## Contents
|
||||
|
||||
- [Commands](commands.md): CLI forms, global flags, in-chat commands, and keys.
|
||||
- [Commands](commands.md): CLI forms, global flags, `cass update`, in-chat commands, and keys.
|
||||
- [Configuration](configuration.md): `~/.cass` files, setup, precedence, schema examples, and validation.
|
||||
- [Providers and models](providers.md): built-in OpenAI-compatible providers, custom endpoints, model discovery, and reasoning metadata.
|
||||
- [Access modes and tool safety](access-modes.md): what tools can read, write, edit, and run in each mode.
|
||||
- [Experimental Rust embedding API](embedding.md): import Cassady from Rust, start headless sessions, stream events, and handle approvals.
|
||||
- [Workflows](workflows.md): common ways to inspect code, apply edits, run checks, switch models, and resume chats.
|
||||
- [Troubleshooting](troubleshooting.md): symptoms, likely causes, fixes, and verification commands.
|
||||
- [Platform notes](platforms.md): macOS, Linux, and Windows environment/path notes.
|
||||
- [Platform notes](platforms.md): macOS, Linux, Windows, release artifact, and update notes.
|
||||
- [Glossary](glossary.md): short definitions for Cassady terms.
|
||||
|
||||
+28
-1
@@ -9,10 +9,11 @@ cass [OPTIONS]
|
||||
cassady [OPTIONS]
|
||||
cass check [OPTIONS]
|
||||
cass setup [OPTIONS]
|
||||
cass update [OPTIONS]
|
||||
cass --resume [CHAT_ID]
|
||||
```
|
||||
|
||||
Run `cass --help`, `cass check --help`, or `cass setup --help` for the help generated by the current binary.
|
||||
Run `cass --help`, `cass check --help`, `cass setup --help`, or `cass update --help` for the help generated by the current binary.
|
||||
|
||||
## Startup behavior
|
||||
|
||||
@@ -61,6 +62,32 @@ Missing API keys for inactive providers are warnings. A missing active API key i
|
||||
|
||||
Runs the interactive setup wizard in a terminal. It configures OpenAI-compatible providers, API key environment-variable references, and first models. It updates `config.json`, `providers.json`, and `models.json` while preserving unrelated entries where possible.
|
||||
|
||||
### `cass update`
|
||||
|
||||
Checks official GitHub releases for Cassady, including Cassady prereleases, and updates the current install directory. The updater runs before provider/model config is loaded, so it can be used even if `~/.cass` is missing or invalid.
|
||||
|
||||
By default, Cassady selects the matching prebuilt archive for the current platform, downloads the archive and `.sha256` file, verifies SHA-256, stages both `cass` and `cassady`, and replaces same-directory binaries with rollback backups. If no prebuilt archive is available, it can build from the selected release source when you choose source mode.
|
||||
|
||||
Useful options:
|
||||
|
||||
- `--check`: check the selected release without installing.
|
||||
- `--dry-run`: show the selected release, mode, asset, and install plan without downloading or installing.
|
||||
- `--yes` / `-y`: accept default prompts for non-interactive use.
|
||||
- `--prebuilt`: require a matching prebuilt archive.
|
||||
- `--source`: build from release source even when a prebuilt archive exists.
|
||||
- `--to TAG`: use a specific release tag such as `v0.2.7`.
|
||||
|
||||
Examples:
|
||||
|
||||
```sh
|
||||
cass update --check
|
||||
cass update --dry-run
|
||||
cass update
|
||||
cass update --source
|
||||
```
|
||||
|
||||
The updater does not invoke `sudo` or administrator prompts. If the install directory is not writable, rerun the update from an install location you own or update through the same package manager or manual process you originally used.
|
||||
|
||||
## In-chat commands
|
||||
|
||||
Type `/` to open command autocomplete.
|
||||
|
||||
+15
-2
@@ -52,9 +52,22 @@ That directory contains `config.json`, `providers.json`, `models.json`, `global.
|
||||
## Non-interactive contexts
|
||||
|
||||
- `cass check` is suitable for scripts and CI because it prints text and exits non-zero on errors.
|
||||
- `cass update --check` and `cass update --dry-run` are suitable for scripts that only need release status or an install plan.
|
||||
- `cass update --yes` accepts default prompts for scripted updates, but still fails instead of escalating privileges when the install directory is not writable.
|
||||
- `cass setup` requires an interactive terminal.
|
||||
- `cass` chat is an interactive terminal UI.
|
||||
|
||||
## Release artifacts
|
||||
## Release artifacts and updates
|
||||
|
||||
When using release archives, each archive contains both `cass` and `cassady`. Put the extracted binaries somewhere on your `PATH` or run them by explicit path. Cassady itself does not install, update, or manage PATH entries.
|
||||
When using release archives, each archive contains both `cass` and `cassady`. Put the extracted binaries somewhere on your `PATH` or run them by explicit path.
|
||||
|
||||
`cass update` can update release-archive installs from official GitHub releases. It supports the same prebuilt targets as the release process:
|
||||
|
||||
- macOS Apple Silicon: `aarch64-apple-darwin`
|
||||
- Linux x86_64: `x86_64-unknown-linux-gnu`
|
||||
- Linux ARM64: `aarch64-unknown-linux-gnu`
|
||||
- Windows x86_64: `x86_64-pc-windows-gnu`
|
||||
|
||||
On macOS and Linux, the updater replaces same-directory `cass` and `cassady` binaries with backups and rollback on failure. On Windows, replacing a running `.exe` is more constrained; if automatic replacement is unavailable, Cassady leaves staged files in place and reports manual copy guidance instead of partially modifying the install.
|
||||
|
||||
If Cassady is installed through a package manager in the future, prefer that package manager's update command instead of `cass update`.
|
||||
|
||||
@@ -143,6 +143,29 @@ Likely cause: Windows CRLF line endings or invisible whitespace differences.
|
||||
|
||||
Fix: re-read the exact target region and preserve the line endings in `old_text`, or use a smaller unique snippet.
|
||||
|
||||
## Update command problems
|
||||
|
||||
Symptom: `cass update` cannot complete.
|
||||
|
||||
Likely causes and fixes:
|
||||
|
||||
- Network or GitHub API failure: retry later or verify proxy/firewall settings.
|
||||
- No matching prebuilt archive: use `cass update --source` if you have Rust installed, or download the release archive manually for a supported target.
|
||||
- SHA-256 mismatch: do not install the archive. Retry the update; if it repeats, check the GitHub release page before proceeding.
|
||||
- Missing Rust toolchain in source mode: install Rust/Cargo yourself, then rerun `cass update --source`. Cassady does not install Rust automatically.
|
||||
- Non-writable install directory: update through the original install method, move Cassady to a directory you own, or manually replace the binaries. Cassady does not run `sudo` for you.
|
||||
- PATH conflict: `cass update` updates the current executable directory. Run `which cass` / `which cassady` on macOS/Linux or `Get-Command cass` in PowerShell to confirm which binary your shell starts.
|
||||
- Windows replacement limitation: if Cassady reports that automatic replacement is unavailable, use the staged file paths it prints and copy them after the running process exits.
|
||||
|
||||
Useful checks:
|
||||
|
||||
```sh
|
||||
cass update --check
|
||||
cass update --dry-run
|
||||
cass --version
|
||||
cassady --version
|
||||
```
|
||||
|
||||
## Terminal rendering problems
|
||||
|
||||
Symptom: the UI appears garbled or keys do not behave as expected.
|
||||
|
||||
Reference in New Issue
Block a user