feat: add funes remove command - #107
Merged
Merged
Conversation
dacorvo
commented
Jul 23, 2026
There was a problem hiding this comment.
Pull request overview
This PR adds a new funes remove <agent> CLI command intended to reverse funes add by unregistering agent integrations (MCP registrations, hooks/plugins/extensions) while preserving memories, transcripts, and unrelated agent configuration.
Changes:
- Introduces
funes removesubcommand with per-agent uninstall implementations (Claude, Codex, Hermes, pi). - Adds shared integration removal helpers (
run_remove, safe tree/file deletion, empty-dir pruning). - Adds integration tests and updates docs/README/AGENTS to document the new lifecycle command.
Reviewed changes
Copilot reviewed 16 out of 16 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/support/mod.rs | Test helpers to stub agent CLIs and run funes remove in isolated HOME/PATH. |
| tests/remove.rs | New integration tests verifying remove behavior per agent and missing-CLI behavior. |
| src/pi.rs | Adds pi::uninstall() to unregister the fixed-source extension and delete extracted files. |
| src/main.rs | Adds remove CLI subcommand and dispatches to agent-specific uninstall routines. |
| src/lib.rs | Adds internal integration module to share uninstall helpers. |
| src/integration.rs | New helper module for idempotent CLI removal + safe file/tree cleanup. |
| src/hooks.rs | Adds hooks uninstall support (Claude extracted plugin tree cleanup; Codex hooks/script cleanup). |
| src/hermes.rs | Adds hermes::uninstall() plus hook/allowlist removal logic for Hermes automation. |
| src/codex.rs | Adds codex::uninstall() to remove hooks and unregister MCP server. |
| src/claude.rs | Adds claude::uninstall() to remove MCP registration, plugin/marketplace entries, and extracted files. |
| README.md | Adds funes remove <agent> to the command summary table. |
| docs/README.md | Updates getting-started link text to reflect add/remove lifecycle. |
| docs/configuration.md | Documents remove as the inverse of add for agent integration files. |
| docs/automation.md | Documents funes remove behavior for Claude/Codex/Hermes automation integrations. |
| docs/add.md | Expands guide to cover funes remove semantics and guarantees. |
| AGENTS.md | Updates agent integration section to include funes remove. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
dacorvo
force-pushed
the
feat/funes-remove
branch
from
July 23, 2026 06:56
ee8b045 to
f746391
Compare
Comment on lines
+92
to
+94
| println!( | ||
| "`pi` isn't on PATH — extracted integration files were removed. Once it is, remove the registration manually: pi remove {source}" | ||
| ); |
Comment on lines
+43
to
44
| pub(crate) fn apply_funes_hooks(mut cfg: Value, desired: &[Hook]) -> Value { | ||
| let obj = cfg.as_object_mut().expect("cfg is a JSON object"); |
| install_hooks(memory.as_deref())?; | ||
|
|
||
| let funes = std::env::var("FUNES_BIN").unwrap_or_else(|_| "funes".to_string()); | ||
| let args = mcp_add_args(&funes, memory.as_deref()); |
| install_hooks(memory.as_deref())?; | ||
|
|
||
| let funes = std::env::var("FUNES_BIN").unwrap_or_else(|_| "funes".to_string()); | ||
| let args = mcp_add_args(&funes, memory.as_deref()); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add a
funes removecommand to undofunes add.