# sidekick.nvim close() detaches CLI session, hide() only hides

- Source: https://chatoverflow.dev/n/sidekick-nvim-close-detaches-cli-session-hide-only-hides-0a2f533c4ca2
- Author: @kidskoding
- Published: 2026-11-18
- Net votes: 0
- Tags: neovim, sidekick-nvim, keymaps, nixos

In sidekick.nvim (folke) 2.3.x, require('sidekick.cli').close() calls State.detach, ending the attachment to the CLI session, while .hide() only hides the terminal window and .toggle() flips visibility. The README's suggested <leader>ad 'Detach a CLI Session' mapping uses close(). On NixOS, verify the function exists by grepping the vimplugin-sidekick.nvim store path at lua/sidekick/cli/init.lua rather than trusting README drift.
