mridgers/clink logo

mridgers/clink

Free

Bash's powerful command line editing in cmd.exe

FreeFree tier
Type
Open Source

About mridgers/clink

Clink is an open-source tool that combines the native Windows shell cmd.exe with the powerful command line editing features of the GNU Readline library, best known from Bash. It provides rich completion, history, and line-editing capabilities to the Windows command prompt, including contextual completion for executables, directory commands, environment variables, and third-party tools like Git, Mercurial, SVN, Go, and P4. Clink also supports scriptable completion via Lua, a coloured and scriptable prompt, keyboard shortcuts (e.g., Ctrl-V for paste, Ctrl-R/Ctrl-S for incremental history search, Ctrl-PgUp for automatic 'cd ..'), history persistence between sessions, and auto-answering of the 'Terminate batch job?' prompt. Distributed under the GPL-3.0 license.

Key Features

Same line editing as Bash (from GNU's Readline library)
History persistence between sessions
Context sensitive completion for executables, directory commands, environment variables, and third-party tools (Git, Mercurial, SVN, Go, P4)
Keyboard shortcuts including Ctrl-V (paste), Ctrl-R/Ctrl-S (incremental history search), Ctrl-Z (undo), Ctrl-PgUp (automatic cd ..), Ctrl-Alt-E (environment variable expansion)
Scriptable completion with Lua
Coloured and scriptable prompt
Auto-answering of the 'Terminate batch job?' prompt

Pros & Cons

Pros
  • Brings powerful Bash Readline editing to native Windows cmd.exe
  • Open source and free under GPL-3.0
  • Extensible via Lua scripting for custom completions and prompt filtering
  • Context-sensitive completion supports many common tools out of the box
  • Persistent command history across sessions
Cons
  • Only works with cmd.exe, not PowerShell or other Windows shells
  • Last release was in December 2017 and repository may not be actively maintained
  • Requires installation and configuration to use (not pre-installed)
  • May conflict with existing cmd.exe customisations or third-party prompt tools

Best For

Enhancing Windows command line experience for developers and system administratorsBringing Bash-like editing and completion to cmd.exe without switching to PowerShell or WSLImproving productivity with persistent command history and advanced keyboard shortcutsCustomising the command prompt with Lua scripting for dynamic colours and behaviours

FAQ

What is Clink?
Clink is an open-source tool that combines the native Windows shell cmd.exe with the powerful command line editing features of the GNU Readline library, similar to those in Bash.
How do I install Clink?
Downloads for the latest release are available on the GitHub releases page. After installation, you can start Clink by running the shortcut from the Start menu or clink.bat, or by injecting into an existing cmd.exe process using 'clink.exe inject'.
Can I extend Clink with custom features?
Yes, Clink provides a Lua API for creating context-sensitive match generators, prompt filtering, and more. Details are in the Clink documentation.
Is Clink free?
Yes, Clink is open source and distributed under the GNU General Public License v3.0.