Skip to content

feat: add funes remove command - #107

Merged
dacorvo merged 3 commits into
mainfrom
feat/funes-remove
Jul 23, 2026
Merged

feat: add funes remove command#107
dacorvo merged 3 commits into
mainfrom
feat/funes-remove

Conversation

@dacorvo

@dacorvo dacorvo commented Jul 23, 2026

Copy link
Copy Markdown
Collaborator

Add a funes remove command to undo funes add.

Comment thread src/hooks.rs Outdated
Comment thread src/hooks.rs Outdated

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 remove subcommand 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.

Comment thread src/codex.rs
Comment thread src/hermes.rs

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 18 out of 18 changed files in this pull request and generated 4 comments.

Comment thread src/pi.rs
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 thread src/hooks.rs
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");
Comment thread src/codex.rs
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());
Comment thread src/claude.rs
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());
@dacorvo
dacorvo merged commit c2c7191 into main Jul 23, 2026
8 checks passed
@dacorvo
dacorvo deleted the feat/funes-remove branch July 23, 2026 09:01
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.

2 participants