Skip to content

added uninstall option - #4

Merged
hsyvy merged 3 commits into
helloagentai:mainfrom
hsyvy:main
May 11, 2026
Merged

hsyvy merged 3 commits into
helloagentai:mainfrom
hsyvy:main

Conversation

@hsyvy

@hsyvy hsyvy commented May 11, 2026

Copy link
Copy Markdown
Contributor

No description provided.

hsyvy and others added 3 commits May 11, 2026 12:49
`logout` removes one account's creds; for a full uninstall the user had
to combine it with `stop`, manually `rm -rf ~/.helloagent-hermes`, and
finally `npm uninstall -g`. Three local steps, easy to get wrong.

`helloagent-hermes uninstall` collapses the local side into one
confirm-then-execute command:
  1. enumerates everything it would remove (running daemon, every paired
     account with its handle for transparency, the state dir)
  2. prints the plan and prompts "Proceed? [y/N]:" (skip with --yes)
  3. on confirm: SIGTERMs the daemon, deletes every account's creds,
     `fs.rm -rf` the state dir (creds subtree + bridge.log + anything
     else under our state path)
  4. prints the two remaining steps it can't do — `npm uninstall -g
     @helloagentai/hermes` (npm's job) and revoking the agent token via
     the HelloAgent web UI (no CLI surface for this on the server side)

The "nothing to remove" path short-circuits: if there's no daemon, no
accounts, and no state dir, the command prints a hint to run
`npm uninstall -g ...` and exits without prompting.

Incompatible (e.g. version-mismatched) creds are handled the same way
`logout` already handles them: we read leniently to recover a handle for
display, then delete the files. Throwing on bad creds during uninstall
would defeat the point.

README gains an "Uninstall" section walking through the three steps
(local nuke, `npm uninstall`, server-side revocation) with a note that
only the first two are reversible.

Verified with a seeded temp state dir:
  HA_HERMES_BRIDGE_DIR=/tmp/state helloagent-hermes uninstall --yes
prints the plan, removes the dir, exits 0.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Add `uninstall` command for full local teardown
@hsyvy
hsyvy merged commit 9bd3296 into helloagentai:main May 11, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant