{"id":27475343,"url":"https://github.com/stefanbartl/nvim-cmdlog","last_synced_at":"2025-10-14T09:36:55.446Z","repository":{"id":288022397,"uuid":"966407249","full_name":"StefanBartl/nvim-cmdlog","owner":"StefanBartl","description":"A lightweight Neovim plugin to interactively view, search, and reuse command-line mode (`:`) and shell history using Telescope with extras.","archived":false,"fork":false,"pushed_at":"2025-09-17T00:14:46.000Z","size":1591,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-17T02:29:15.984Z","etag":null,"topics":["command-history","developer-tools","interactive-tools","lazy-nvim","lua","neovim","neovim-config","neovim-plugin","nvim","nvim-lua","plugin","productivity","telescope","telescope-nvim","terminal","terminal-based","texteditor","tool","tools"],"latest_commit_sha":null,"homepage":"https://github.com/StefanBartl/nvim-cmdlog","language":"Lua","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/StefanBartl.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"docs/CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":"docs/ROADMAP.md","authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-04-14T21:56:26.000Z","updated_at":"2025-08-29T10:44:23.000Z","dependencies_parsed_at":"2025-05-31T02:28:32.113Z","dependency_job_id":"19a0aed9-a4d0-458f-bd6b-1d65e75ac9d3","html_url":"https://github.com/StefanBartl/nvim-cmdlog","commit_stats":null,"previous_names":["stefanbartl/nvim-cmdlog"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/StefanBartl/nvim-cmdlog","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StefanBartl%2Fnvim-cmdlog","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StefanBartl%2Fnvim-cmdlog/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StefanBartl%2Fnvim-cmdlog/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StefanBartl%2Fnvim-cmdlog/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/StefanBartl","download_url":"https://codeload.github.com/StefanBartl/nvim-cmdlog/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StefanBartl%2Fnvim-cmdlog/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279018620,"owners_count":26086404,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-14T02:00:06.444Z","response_time":60,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["command-history","developer-tools","interactive-tools","lazy-nvim","lua","neovim","neovim-config","neovim-plugin","nvim","nvim-lua","plugin","productivity","telescope","telescope-nvim","terminal","terminal-based","texteditor","tool","tools"],"created_at":"2025-04-16T06:41:46.677Z","updated_at":"2025-10-14T09:36:55.441Z","avatar_url":"https://github.com/StefanBartl.png","language":"Lua","funding_links":[],"categories":[],"sub_categories":[],"readme":"# nvim-cmdlog\n\nA lightweight, modern Neovim plugin to interactively view, search, and reuse command-line mode (`:`) history and shell history using Telescope (standard) ord fzf.\n\n---\n\n- [Features](#features)\n- [Installation (with Lazy.nvim)](#installation-with-lazynvim)\n  - [Load immediately](#load-immediately-recommended-for-most-setups)\n  - [Load lazily (alternative)](#load-lazily-alternative)\n    - [Option 1: Lazy-load on demand (command)](#option-1-lazy-load-on-demand-command)\n    - [Option 2: Lazy-load via keybindings](#option-2-lazy-load-via-keybindings)\n    - [Option 3: Lazy-load on specific event](#option-3-lazy-load-on-specific-event)\n- [Dependencies](#dependencies)\n- [Picker configuration (Telescope vs FzfLua)](#picker-configuration-telescope-vs-fzflua)\n  - [When to use which picker?](#when-to-use-which-picker)\n- [Usage](#usage)\n  - [Cmdlog Picker Demo](#cmdlog-picker-demo)\n  - [Command Syntax](#command-syntax)\n  - [Commands](#commands)\n  - [Shortcuts (inside pickers)](#shortcuts-inside-pickers)\n- [Development](#development)\n- [License](#license)\n- [Disclaimer](#disclaimer)\n- [Feedback](#feedback)\n\n---\n\n## Features\n\n![Cmdlog Picker UI](./docs/assets/Cmdlog-Picker-UI.png)\n\n- **Interactive command history listing**: View and search through your `:` command history interactively using [Telescope.nvim](https://github.com/nvim-telescope/telescope.nvim).\n\n- **Shell History Integration**: In addition to the standard Neovim command history, shell history for various supported shells is also included, such as:\n  - `zsh`: `~/.zsh_history`\n  - `bash`: `~/.bash_history`\n  - `fish`: `~/.local/share/fish/fish_history`\n  - `nu`: `~/.config/nushell/history.txt`\n  - `ksh`: `~/.ksh_history`\n  - `csh`: `~/.history`\n\n- **Picker Backend Options**: Choose between [Telescope.nvim](https://github.com/nvim-telescope/telescope.nvim) or [fzf-lua](https://github.com/ibhagwan/fzf-lua) for the picker backend, depending on your preference.\n\n- **Favorites Management**: Mark and manage favorite commands with ease. Your favorites are saved in the `~/.local/share/nvim-cmdlog/favorites.json` file for easy access.\n\n- **Command Execution**: Select an entry from the history to insert it into the command-line (without auto-execution), giving you control over your workflow.\n\n- **Command Previews**: Preview the output of various commands directly within the picker. Currently supported preview types include:\n  - **`:edit \u003cfile\u003e`**: Shows the file preview if the file is readable.\n  - **`:!\u003cshell\u003e`**: Simulates shell command output for supported shell commands.\n  - **`:term`, `:make`, `:lua`, and `:help`**: These command previews are in progress, with plans to cover more commands in the future.\n\n- **Custom Pickers**: Developers and users can easily create their own custom pickers. A utility file, `picker_utils.lua`, abstracts much of the configuration, making it simple to extend the functionality. Comprehensive documentation on how to create and add custom pickers is available in the `/docs/` directory.\n\n### Planned Features:\n- **Delete Single History Entries**: Easily remove individual entries from your history.\n- **Project-Based History**: Maintain separate command histories per Git project (`.git` root).\n- **Integration with `which-key`**: Add quick key bindings and descriptions for commands within your workflow.\n- **Error-Prone Command Highlighting**: Highlight commands that are prone to errors, helping you avoid mistakes.\n\n![Favorites Picker](./docs/assets/Cmdlog-Favorites-Picker.png)\n\n---\n\n## Installation (with Lazy.nvim)\n\nYou can install `nvim-cmdlog` like this:\n\n### Load immediately (recommended for most setups)\n\nThis ensures all commands (:Cmdlog, :CmdlogFavorites, etc.) are available without delay.\n\n```lua\n{\n  \"StefanBartl/nvim-cmdlog\",\n  lazy = false,\n  dependencies = {\n    \"nvim-lua/plenary.nvim\",\n    \"nvim-telescope/telescope.nvim\", -- Required if you use picker = \"telescope\"\n    \"ibhagwan/fzf-lua\",              -- Required if you use picker = \"fzf\"\n  },\n  config = function()\n    require(\"cmdlog\").setup({\n      picker = \"telescope\",  -- or \"fzf\"\n    })\n  end,\n}\n```\n\n### Load lazily (alternative)\n\nYou can also lazy-load the plugin if you prefer:\n\n#### Option 1: Lazy-load on demand (command)\n\n```lua\n{\n  \"StefanBartl/nvim-cmdlog\",\n  lazy = true,\n  cmd = {\n    \"CmdlogNvimFull\", \"CmdlogNvim\", \"CmdlogFull\", \"Cmdlog\",  -- see Note!\n    \"CmdlogShellFull\", \"CmdlogShell\", \"CmdlogFavorites\"\n  },\n  dependencies = {\n    \"nvim-lua/plenary.nvim\",\n    \"nvim-telescope/telescope.nvim\",\n    \"ibhagwan/fzf-lua\",\n  },\n  config = function()\n    require(\"cmdlog\").setup({\n      picker = \"fzf\", -- or \"telescope\"\n    })\n  end,\n}\n```\n\n\u003e **Note**: Only the commands listed here will be available for lazy-loading. Make sure to include the ones you intend to use, such as `Cmdlog`, `CmdlogFavorites`, etc. If a command is omitted, it won't work when lazy-loaded.\n\n#### Option 2: Lazy-load via keybindings\n\n```lua\n{\n  \"StefanBartl/nvim-cmdlog\",\n  lazy = true,\n  keys = {\n    { \"\u003cleader\u003ecl\", \"\u003ccmd\u003eCmdlog\u003cCR\u003e\", desc = \"Show command history\" },\n    { \"\u003cleader\u003ecf\", \"\u003ccmd\u003eCmdlogFavorites\u003cCR\u003e\", desc = \"Show favorites\" },\n  },\n  dependencies = {\n    \"nvim-lua/plenary.nvim\",\n    \"nvim-telescope/telescope.nvim\",\n    \"ibhagwan/fzf-lua\",\n  },\n  config = function()\n    require(\"cmdlog\").setup({\n      picker = \"telescope\",\n    })\n  end,\n}\n```\n\n---\n\n#### Option 3: Lazy-load on specific event\n\n```lua\n{\n  \"StefanBartl/nvim-cmdlog\",\n  lazy = true,\n  event = \"VeryLazy\", -- or e.g. \"BufReadPost\"\n  dependencies = {\n    \"nvim-lua/plenary.nvim\",\n    \"nvim-telescope/telescope.nvim\",\n  },\n  config = function()\n    require(\"cmdlog\").setup({\n      picker = \"telescope\",  -- or \"fzf\"\n  })\n}\n```\n\nNote: If you lazy-load the plugin, make sure to define how it should be triggered (`cmd`, `keys`, `event`, etc.), otherwise commands like `:Cmdlog` won’t be available.\n\n---\n\n## Dependencies\n\nMake sure the following plugins are installed:\n\n- [telescope.nvim](https://github.com/nvim-telescope/telescope.nvim)\n- [plenary.nvim](https://github.com/nvim-lua/plenary.nvim) – required for favorites functionality\n- [fzf-lua](https://github.com/ibhagwan/fzf-lua) (only if picker = \"fzf\")\n\n---\n\n## Picker configuration (Telescope vs FzfLua)\n\nBy default, `nvim-cmdlog` uses **Telescope** for all pickers and UI interactions.\nHowever, you can switch to [fzf-lua](https://github.com/ibhagwan/fzf-lua) by setting:\n\n```lua\nrequire(\"cmdlog\").setup({\n  picker = \"fzf\",\n})\n```\n\n| Picker                | Notes                                                                                                        |\n| :-------------------- | :----------------------------------------------------------------------------------------------------------- |\n| `telescope` (default) | Full feature support, including command previews (e.g., file contents for `:edit somefile.txt`)              |\n| `fzf`                 | Minimal, fast UI. **Currently no preview support** for commands like `:edit`. (Planned for future versions.) |\n\n### When to use which picker?\n\n- **Telescope**: Recommended if you want previews, fuzzy sorting, and a richer UI experience.\n- **FzfLua**: Recommended if you prefer speed, simplicity, and minimal dependencies.\n\n| Feature                           | Telescope             | FzfLua                |\n| :-------------------------------- | :-------------------- | :-------------------- |\n| Fuzzy Search                      | ✅ Built-in            | ✅ Built-in            |\n| Command Previews (`:edit`)        | ✅ Available           | ❌ Not available yet   |\n| Favorite toggling (`\u003cC-f\u003e`)       | ✅ Available           | ✅ Available           |\n| Performance (Speed)               | ⚡ Good                | ⚡⚡ Very fast          |\n| UI Customization (Prompt, Border) | ✅ Highly customizable | ✅ Highly customizable |\n| External Dependencies             | Telescope + Plenary   | Only Plenary          |\n\n---\n\n## Usage\n\nThis plugin provides several Telescope-based pickers to explore and reuse command-line history.\n\n### Cmdlog Picker Demo\n\n![Cmdlog Picker Demo](./docs/assets/Cmdlog-Picker-Demo.gif)\n\n### Command Syntax\n\n`{Cmdlog}{Util}[optional Full]`\n\n### Commands\n\n| Command            | Description                                                                  |\n| ------------------ | ---------------------------------------------------------------------------- |\n| `:CmdlogFavorites` | Shows commands you've marked as favorites                                    |\n| `:Cmdlog`          | Combines favorites and history, showing only unique commands (no duplicates) |\n| `:CmdlogFull`      | Combines favorites and full history, allowing duplicates                     |\n| `:CmdlogNvim`      | Shows only unique Neovim (`:`) commands (latest occurrence kept)             |\n| `:CmdlogNvimFull`  | Shows full Neovim (`:`) history, including duplicates                        |\n| `:CmdlogShell`     | Shows unique shell history (latest occurrence kept)                          |\n| `:CmdlogShellFull` | Shows full shell history, including duplicates                               |\n\n---\n\n### Shortcuts (inside pickers)\n\n- `\u003cCR\u003e`: Insert command into `:` (does not execute)\n- `\u003cTab\u003e`: Toggle favorite\n- `\u003cC-r\u003e`: Refresh picker\n\n---\n\n## Development\n\nTo develop or contribute:\n\n1. Clone the repo:\n\n```bash\ngit clone https://github.com/StefanBartl/nvim-cmdlog ~/.config/nvim/lua/plugins/nvim-cmdlog\n```\n\n2. Symlink or load manually via your plugin manager.\n3. Make changes, test with :Cmdlog, submit PRs or open issues.\n\n**Contributions are welcome** – whether it's a bugfix, feature, or idea!\n\n---\n\n## License\n\n[MIT License](./LICENSE)\n\n---\n\n## Disclaimer\n\nℹ️ This plugin is under active development – some features are planned or experimental.\nExpect changes in upcoming releases.\n\n---\n\n## Feedback\n\nYour feedback is very welcome!\n\nPlease use the [GitHub issue tracker](https://github.com/StefanBartl/nvim-cmdlog/issues) to:\n- Report bugs\n- Suggest new features\n- Ask questions about usage\n- Share thoughts on UI or functionality\n\nFor general discussion, feel free to open a [GitHub Discussion](https://github.com/StefanBartl/nvim-cmdlog/discussions).\n\nIf you find this plugin helpful, consider giving it a ⭐ on GitHub — it helps others discover the project.\n\n---\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstefanbartl%2Fnvim-cmdlog","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstefanbartl%2Fnvim-cmdlog","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstefanbartl%2Fnvim-cmdlog/lists"}