From ff578f0738b508d5f7f08603b5bc6fc0f3cb2b50 Mon Sep 17 00:00:00 2001 From: Val Alexander Date: Wed, 1 Jul 2026 04:14:01 -0500 Subject: [PATCH] docs: add install-debugging and uninstall guides for CLI and Coven Codes Add four dedicated guides and wire them into the sidebar: - cli/install-debugging.mdx, cli/uninstall.mdx - coven-codes/install-debugging.mdx, coven-codes/uninstall.mdx (new section) Also drop the duplicate leading H1 in reference/dispatch-contract.mdx so check:no-leading-h1 (and the full build) passes. Co-Authored-By: Claude Opus 4.8 (1M context) --- content/docs/cli/install-debugging.mdx | 177 ++++++++++++++++++ content/docs/cli/meta.json | 2 + content/docs/cli/uninstall.mdx | 93 +++++++++ .../docs/coven-codes/install-debugging.mdx | 116 ++++++++++++ content/docs/coven-codes/meta.json | 10 + content/docs/coven-codes/uninstall.mdx | 68 +++++++ content/docs/meta.json | 2 +- content/docs/reference/dispatch-contract.mdx | 2 - 8 files changed, 467 insertions(+), 3 deletions(-) create mode 100644 content/docs/cli/install-debugging.mdx create mode 100644 content/docs/cli/uninstall.mdx create mode 100644 content/docs/coven-codes/install-debugging.mdx create mode 100644 content/docs/coven-codes/meta.json create mode 100644 content/docs/coven-codes/uninstall.mdx diff --git a/content/docs/cli/install-debugging.mdx b/content/docs/cli/install-debugging.mdx new file mode 100644 index 0000000..9c4b5a8 --- /dev/null +++ b/content/docs/cli/install-debugging.mdx @@ -0,0 +1,177 @@ +--- +title: "Install Debugging" +summary: "Diagnose a failed or broken Coven CLI install: coven not found, wrong platform package, PATH gaps, stale npx cache, and source-build failures." +description: "Debugging guide for Coven CLI installation problems across npm, native platform packages, and Cargo/source builds." +read_when: + - The coven command is not found after install + - npm reports a missing optional platform dependency + - A source build of the CLI fails +--- + +import { Callout } from 'fumadocs-ui/components/callout'; + +Use this page when installing the Coven CLI did not produce a working `coven` command. For runtime failures after a successful install (daemon, harness, or session problems), see [Troubleshooting](/docs/reference/troubleshooting) and [Harness Troubleshooting](/docs/harnesses/troubleshooting). + +## Start With Doctor + +If `coven` runs at all, run it first: + +```sh +coven doctor +``` + +`doctor` reports store, project, daemon, socket, and harness readiness. If `coven doctor` fails because the command is not found, work through the sections below. + +If `coven` is not on `PATH` yet, you can still exercise the published package without a global install: + +```sh +npx @opencoven/cli doctor +pnpm dlx @opencoven/cli doctor +``` + +## Install Decision Flow + +```mermaid +flowchart LR + Start([coven install broken?]) --> Runs{coven runs at all?} + Runs -- no --> Found["`coven` not found\ncheck install method + PATH"] + Runs -- yes --> Version{correct version?} + Version -- no --> Stale["Stale npx cache or old global\nreinstall @latest"] + Version -- yes --> Native{native package resolved?} + Native -- no --> Platform["Missing optional platform dep\nreinstall from target OS/CPU"] + Native -- yes --> Doctor["coven doctor"] + + Found --> Method{how installed?} + Method -- npm global --> NpmFix["npm root -g on PATH?"] + Method -- source --> CargoFix["~/.cargo/bin on PATH?"] + Method -- native binary --> BinFix["binary dir on PATH?"] + NpmFix --> Doctor + CargoFix --> Doctor + BinFix --> Doctor + Stale --> Doctor + Platform --> Doctor +``` + +## Fast Triage + +| Symptom | Likely cause | Fix | +| --- | --- | --- | +| `coven: command not found` | Install dir not on `PATH`, or global install failed | Confirm install method, then add its bin dir to `PATH`. | +| `coven` runs an old version | Stale `npx` cache or an old global install shadows the new one | Clear the cache / reinstall `@latest`; check `which -a coven`. | +| npm warns about a missing optional dependency | The native platform package did not resolve for your OS/CPU | Reinstall `@opencoven/cli` from the environment where you run it. | +| `Unsupported platform` on install | OS/CPU is not covered by a published native package | Build from source, or use a supported platform / WSL2. | +| Source build fails to compile | Toolchain or dependency mismatch | Update Rust stable and retry a clean `cargo build`. | + +## `coven` Command Not Found + +The fix depends on how you installed. + +### npm global install + +Confirm npm's global bin directory and that it is on `PATH`: + +```sh +npm root -g +npm bin -g +echo "$PATH" | tr ':' '\n' | grep -F "$(npm bin -g)" +``` + +If the global bin directory is missing from `PATH`, add it in your shell profile, open a new terminal, and retry: + +```sh +coven doctor +``` + +If the global install itself failed (for example, permission errors writing to the global prefix), prefer a user-writable npm prefix or a version manager over `sudo npm install -g`. + +### Native binary + +If you downloaded a native binary directly, make sure its directory is on `PATH`: + +```sh +which -a coven +echo "$PATH" | tr ':' '\n' +``` + +### Source build + +If you built with Cargo, make sure Cargo's bin directory is on `PATH`: + +```sh +echo "$PATH" | tr ':' '\n' | grep "$HOME/.cargo/bin" +``` + +## Wrong Or Stale Version + +`npx` caches packages, so a one-off invocation can run an older CLI than you expect. Confirm what is actually running: + +```sh +which -a coven +coven --version +``` + +Reinstall the latest global build, or clear the `npx` cache and rerun: + +```sh +npm install -g @opencoven/cli@latest +coven doctor +``` + +If more than one `coven` appears in `which -a coven`, an earlier install is shadowing the new one on `PATH`. Remove the stale copy or reorder `PATH` so the intended install wins. + +## Missing Native Platform Package + +The npm wrapper `@opencoven/cli` resolves a matching native package (`@opencoven/cli-macos`, `@opencoven/cli-linux-x64`, `@opencoven/cli-windows`) as an optional dependency. If npm cannot resolve one for your OS/CPU pair, `coven` will not run even though the wrapper installed. + + +Installing on one platform and copying `node_modules` to another skips the native package for the target. Reinstall `@opencoven/cli` from the same OS/CPU where you plan to run `coven`. + + +Check what npm published and what resolved: + +```sh +npm view @opencoven/cli version dist-tags +npm view @opencoven/cli-macos version dist-tags +npm view @opencoven/cli-linux-x64 version dist-tags +npm view @opencoven/cli-windows version dist-tags +``` + +The published wrapper currently targets `darwin-arm64`, `linux-x64`, and `win32-x64`. Alpine/musl is not covered by the published wrapper today. On an unsupported platform, build from source or use the WSL2 path — see [Install Coven](/docs/guide/install#platform-notes). + +## Source Build Failures + +Build from source when you are contributing, testing unreleased behavior, or running on an unsupported npm platform: + +```sh +git clone https://github.com/OpenCoven/coven.git +cd coven +cargo build --workspace +cargo run -p coven-cli -- doctor +``` + +If the build fails to compile, update the Rust toolchain and retry from a clean state: + +```sh +rustup update stable +cargo clean +cargo build --workspace +``` + +To install the built binary onto your Cargo bin path: + +```sh +cargo install --path crates/coven-cli +coven doctor +``` + +## Evidence To Collect + +When an install problem needs a support report, include: + +- The install method (`npx`, global npm, native binary, or source build). +- The output of `coven --version` and `which -a coven`. +- Your OS and CPU architecture. +- For npm installs, the output of the `npm view` commands above and any missing-optional-dependency warning. +- For source builds, the failing `cargo build` output. + +Do not paste secrets or private paths into a report. Once `coven` runs, continue with [Doctor](/docs/cli/doctor). diff --git a/content/docs/cli/meta.json b/content/docs/cli/meta.json index bbae8f2..2d3daad 100644 --- a/content/docs/cli/meta.json +++ b/content/docs/cli/meta.json @@ -6,6 +6,8 @@ "pages": [ "index", "install", + "install-debugging", + "uninstall", "interactive", "doctor", "daemon", diff --git a/content/docs/cli/uninstall.mdx b/content/docs/cli/uninstall.mdx new file mode 100644 index 0000000..95f0733 --- /dev/null +++ b/content/docs/cli/uninstall.mdx @@ -0,0 +1,93 @@ +--- +title: "Uninstall" +summary: "Remove the Coven CLI cleanly: stop the daemon, remove the install, and decide whether to delete local Coven state." +description: "Uninstall reference for the Coven CLI across npm global installs, Cargo/source builds, and local state under COVEN_HOME." +read_when: + - You want to remove the coven command + - You are deciding whether to delete local session state +--- + +import { Callout } from 'fumadocs-ui/components/callout'; + +Use this page to remove the Coven CLI. Removing the CLI and deleting local state are separate steps — do the first for a routine uninstall, and the second only when you intentionally want to erase session history. + +## Stop The Daemon First + +The daemon holds the local socket and owns running sessions. Stop it before removing the CLI so nothing is left listening: + +```sh +coven sessions --all --plain +coven daemon status +coven daemon stop +``` + +If sessions are still running, let them finish, kill them, or archive them first. Removing the CLI does not clean up a daemon that is already running. + +## Remove The Install + +Remove the CLI using the same method you installed with. + +### npm global install + +```sh +npm uninstall -g @opencoven/cli +``` + +If you used `npx`/`pnpm dlx` for one-off runs, there is nothing to uninstall — clearing your package manager cache is enough to drop the downloaded copy. + +### Cargo / source build + +If you installed the Rust binary with `cargo install`: + +```sh +cargo uninstall coven-cli +``` + +If you only ran `cargo build`/`cargo run` from a cloned checkout, deleting the checkout removes the build: + +```sh +rm -rf coven # the cloned OpenCoven/coven directory +``` + +### Native binary + +If you placed a native binary on `PATH` yourself, delete that file. Confirm nothing remains: + +```sh +which -a coven +``` + +## Verify Removal + +```sh +which -a coven +``` + +No output means the command is gone. If a path still prints, another install is still present — remove it with the matching method above. + +## Local State + +Coven keeps local state under `COVEN_HOME` (default `~/.coven`), including session history, events, and the daemon socket. Uninstalling the CLI does **not** delete this directory. + + +`rm -rf ~/.coven` permanently deletes your local session history and events. Do this only when you intend to erase all local Coven data, not as a routine uninstall or update step. + + +Remove local state only when you deliberately want it gone: + +```sh +rm -rf ~/.coven +``` + +If you set a custom `COVEN_HOME`, remove that path instead of `~/.coven`. + +## Reinstalling Later + +Removing the CLI while keeping `~/.coven` lets you reinstall later and pick up your existing sessions: + +```sh +npm install -g @opencoven/cli@latest +coven doctor +``` + +See [Install Coven](/docs/guide/install) for full install paths and [Install Debugging](/docs/cli/install-debugging) if the reinstall does not produce a working `coven` command. diff --git a/content/docs/coven-codes/install-debugging.mdx b/content/docs/coven-codes/install-debugging.mdx new file mode 100644 index 0000000..72ae461 --- /dev/null +++ b/content/docs/coven-codes/install-debugging.mdx @@ -0,0 +1,116 @@ +--- +title: "Install Debugging" +summary: "Diagnose a failed Coven Codes desktop install: blocked installers, an app that will not launch, and a client that cannot reach the local daemon." +description: "Debugging guide for the Coven Codes desktop application across macOS, Linux, and Windows installs." +read_when: + - The Coven Codes app will not install or open + - The app opens but cannot reach the Coven daemon + - You need to confirm which release you installed +--- + +import { Callout } from 'fumadocs-ui/components/callout'; + +Coven Codes is a first-party desktop application, distributed as a published build rather than an npm package. Use this page when installing or opening the app did not produce a working workspace. + + +Coven Codes ships from [`OpenCoven/coven-codes` releases](https://github.com/OpenCoven/coven-codes/releases). Download the build that matches your OS and CPU, and confirm the current channel there before relying on any version-specific behavior. + + +Coven Codes is a client. It talks to the local `coven` daemon over the Unix socket at `~/.coven/coven.sock`, the same boundary every other client uses. It does not bypass daemon validation, and it should stay useful with clear fallback states even when Coven is not installed. Two failure classes matter here: the **app itself** will not install or launch, and the app launches but **cannot reach the daemon**. + +## Install Decision Flow + +```mermaid +flowchart LR + Start([Coven Codes broken?]) --> Installs{installer runs?} + Installs -- no --> Blocked["OS blocked the installer\nGatekeeper / SmartScreen / exec bit"] + Installs -- yes --> Opens{app opens?} + Opens -- no --> Launch["App will not launch\ncheck arch + quarantine + logs"] + Opens -- yes --> Daemon{reaches daemon?} + Daemon -- no --> Socket["Client cannot connect\ncheck coven daemon + COVEN_HOME"] + Daemon -- yes --> Version{versions compatible?} + Version -- no --> Compat["Update app or Coven\nso API versions overlap"] + Version -- yes --> Done([Working]) + + Blocked --> Opens + Launch --> Daemon + Socket --> Daemon + Compat --> Done +``` + +## Fast Triage + +| Symptom | Likely cause | Fix | +| --- | --- | --- | +| Installer is blocked or "damaged" | OS gatekeeping on an unsigned/quarantined download | Allow the app in OS security settings; re-download over HTTPS from Releases. | +| App icon appears but nothing opens | Wrong CPU build, or the download is quarantined | Install the build for your architecture; clear the quarantine attribute. | +| App opens but shows no sessions / "daemon unavailable" | The `coven` daemon is stopped, or the app uses a different `COVEN_HOME` | `coven daemon start`; make sure the app and CLI share the same `COVEN_HOME`. | +| App works but launch/kill/input is refused | Expected — the daemon is the authority | Check session liveness with `coven sessions --all`; the daemon validates every sensitive request. | +| Features missing or API errors | App and daemon expose non-overlapping API versions | Update Coven Codes or the CLI so supported versions overlap. | + +## Installer Is Blocked + +Because the app is downloaded rather than installed from a package registry, the OS may gate the first launch. + +### macOS + +If macOS reports the app is damaged or from an unidentified developer, it is quarantined. Open it once from Finder with **Control-click → Open**, or allow it under **System Settings → Privacy & Security**. Re-download over HTTPS if the file may be corrupted. + +### Windows + +If SmartScreen blocks the installer, choose **More info → Run anyway** for a build you downloaded yourself from Releases. Prefer the signed installer when one is published. + +### Linux + +For an `AppImage`, make it executable before running it: + +```sh +chmod +x CovenCodes-*.AppImage +./CovenCodes-*.AppImage +``` + +If the AppImage will not start, confirm FUSE is available on your distribution, or extract and run it with `--appimage-extract`. For a `.deb`/`.rpm`, install it with your system package manager instead. + +## App Will Not Launch + +If the installer succeeded but the app does not open: + +- Confirm you installed the build for your CPU architecture (for example, Apple Silicon vs Intel on macOS). +- On macOS, clear a stuck quarantine attribute on the installed app bundle: + + ```sh + xattr -dr com.apple.quarantine "/Applications/Coven Codes.app" + ``` + +- Re-download from Releases if the file may be truncated or corrupted, and reinstall. + +## App Cannot Reach The Daemon + +If Coven Codes opens but shows no sessions or reports the daemon is unavailable, the problem is the client-to-daemon link, not the install. Verify the daemon from a terminal: + +```sh +coven doctor +coven daemon status +coven daemon start +``` + + +Coven Codes connects to the socket under `COVEN_HOME` (default `~/.coven`, socket `~/.coven/coven.sock`). If the CLI uses a custom `COVEN_HOME` that the app does not, they will not see the same daemon or sessions. Point both at the same path. + + +Coven Codes is designed to stay useful when Coven is not installed — it should present a clear "install Coven" state rather than failing silently. If you see that state, the app is working; install or start Coven to connect. See [Install Coven](/docs/guide/install). + +## Version Or API Mismatch + +Clients and the daemon negotiate a supported API version (`/api/v1`). If the app is much newer or older than the installed CLI/daemon, some features can be rejected. Update whichever side is behind so their supported versions overlap. See [API Version Rejected](/docs/reference/troubleshooting#api-version-rejected). + +## Evidence To Collect + +For a support report, include: + +- The Coven Codes version and the release you downloaded, plus your OS and CPU architecture. +- Whether the failure is install, launch, or daemon connectivity. +- The output of `coven doctor` and `coven daemon status`. +- Whether the app and CLI use the same `COVEN_HOME`. + +Do not paste secrets or private paths into a report. To remove the app, see [Uninstall](/docs/coven-codes/uninstall). diff --git a/content/docs/coven-codes/meta.json b/content/docs/coven-codes/meta.json new file mode 100644 index 0000000..df9c7a2 --- /dev/null +++ b/content/docs/coven-codes/meta.json @@ -0,0 +1,10 @@ +{ + "title": "Coven Codes", + "description": "The Coven Codes desktop app", + "root": true, + "icon": "LuMonitor", + "pages": [ + "install-debugging", + "uninstall" + ] +} diff --git a/content/docs/coven-codes/uninstall.mdx b/content/docs/coven-codes/uninstall.mdx new file mode 100644 index 0000000..a0bfd2b --- /dev/null +++ b/content/docs/coven-codes/uninstall.mdx @@ -0,0 +1,68 @@ +--- +title: "Uninstall" +summary: "Remove the Coven Codes desktop app on macOS, Linux, and Windows, and decide what to do with local Coven state." +description: "Uninstall reference for the Coven Codes desktop application, including per-OS removal and shared Coven state under COVEN_HOME." +read_when: + - You want to remove the Coven Codes app + - You are deciding whether to delete local Coven state +--- + +import { Callout } from 'fumadocs-ui/components/callout'; + +Use this page to remove the Coven Codes desktop app. Removing the app, clearing its own settings, and deleting shared Coven state are separate steps — a routine uninstall only needs the first. + +## Close The App First + +Quit Coven Codes before removing it so no window is holding a connection to the daemon. Removing the app does not stop the `coven` daemon or end running sessions — the daemon is a separate process managed by the CLI. If you also want to stop background work, see [CLI Uninstall → Stop the daemon first](/docs/cli/uninstall#stop-the-daemon-first). + +## Remove The App + +Uninstall using the method that matches how you installed the desktop build. + +### macOS + +Quit the app, then move the bundle to the Trash: + +```sh +rm -rf "/Applications/Coven Codes.app" +``` + +If you installed from a `.dmg`, eject any mounted disk image and delete the downloaded `.dmg`. + +### Windows + +Uninstall through **Settings → Apps → Installed apps**, or **Control Panel → Programs and Features**, and select Coven Codes. If you ran a portable build, delete the folder you extracted it to. + +### Linux + +For an `AppImage`, delete the file you downloaded and any desktop entry you created for it. For a `.deb`/`.rpm`, remove it with your system package manager, for example: + +```sh +sudo apt remove coven-codes +``` + +## Remove App Settings And Caches + +The app stores its own window state, settings, and caches in the OS application-data location. Remove these only if you want a clean slate; they are separate from your Coven session history. + +- **macOS:** `~/Library/Application Support`, `~/Library/Caches`, and `~/Library/Preferences` entries for Coven Codes. +- **Linux:** the app's directories under `~/.config`, `~/.cache`, and `~/.local/share`. +- **Windows:** the app's folders under `%APPDATA%` and `%LOCALAPPDATA%`. + +## Local Coven State + +Coven Codes reads local Coven state from `COVEN_HOME` (default `~/.coven`), but it does not own it — the daemon and CLI do. Removing the app does not touch this directory, and you usually should not delete it when uninstalling only the app. + + +`~/.coven` holds your session history, events, and the daemon socket, shared with the CLI and other clients. Delete it only when you intend to erase all local Coven data — not as part of removing the desktop app. See [CLI Uninstall → Local state](/docs/cli/uninstall#local-state). + + +## Verify Removal + +Confirm the app is gone from your applications list, and that no Coven Codes process is running. The `coven` CLI and daemon are unaffected: + +```sh +coven doctor +``` + +To reinstall later, download the current build from [`OpenCoven/coven-codes` releases](https://github.com/OpenCoven/coven-codes/releases). If the reinstall does not open or cannot reach the daemon, see [Install Debugging](/docs/coven-codes/install-debugging). diff --git a/content/docs/meta.json b/content/docs/meta.json index 192ac96..cfc2925 100644 --- a/content/docs/meta.json +++ b/content/docs/meta.json @@ -1,3 +1,3 @@ { - "pages": ["guide", "cli", "daemon", "harnesses", "memory-models", "openapi", "reference"] + "pages": ["guide", "cli", "coven-codes", "daemon", "harnesses", "memory-models", "openapi", "reference"] } diff --git a/content/docs/reference/dispatch-contract.mdx b/content/docs/reference/dispatch-contract.mdx index 10e07a0..d6bc0fa 100644 --- a/content/docs/reference/dispatch-contract.mdx +++ b/content/docs/reference/dispatch-contract.mdx @@ -9,8 +9,6 @@ read_when: - Debugging duplicate execution, lost replies, or out-of-order processing --- -# Dispatch contract - The contract for message and task dispatch between the orchestrator and familiars, and for replies back. The bus guarantees **at-least-once delivery** and **per-stream FIFO ordering**; everything stronger (exactly-once, global order) is