Repolode
chrisant996

chrisant996/clink

Adds Bash-style Readline line editing, completion, history and Lua-scriptable prompts to the native Windows cmd.exe shell.

Stars
5,583
Forks
211
Open issues
2
Last commit
5 days ago

What is it?

Clink brings the GNU Readline library's line-editing and completion features to cmd.exe, the default Windows command prompt. It works by injecting a DLL into a cmd.exe process and intercepting a handful of Windows API calls so that the prompt and input line are handled by Clink's Readline-based editor instead of the built-in one.

Out of the box it provides auto-suggestions drawn from history, files and completions, Tab and Ctrl-Space completion, and searchable history that persists between sessions. Completion and input coloring are driven by Lua scripts, and the prompt itself can be customized with Lua, which lets cmd.exe users work with dynamic prompts similar to those found in other shells.

Clink can be installed with the setup EXE, winget, scoop, or a plain ZIP archive, and can be set to autorun whenever cmd.exe starts. It is written in C++ and built with Premake targeting Visual Studio.

Key features

  • 01Auto-suggestions based on history, files and completions as you type.
  • 02Tab and Ctrl-Space completion, including an interactive completion list.
  • 03Persistent, searchable command history saved between sessions.
  • 04Context-sensitive input coloring via Lua scripts.
  • 05Customizable prompt scripted in Lua.
  • 06Configurable key bindings and extra line-editing commands.

Use cases

  • Windows developers who regularly work in cmd.exe and want Bash-like editing and history.
  • Customizing the cmd.exe prompt dynamically with Lua scripts.
  • Adding context-aware tab completion for command-line tools on Windows.

Quick start

  1. 1

    Install Clink with winget

    winget install --id chrisant996.Clink -e
  2. 2

    Install Clink with scoop (alternative)

    scoop install clink
  3. 3

    Start cmd.exe; Clink is injected automatically if autorun is enabled, or run the Clink shortcut from the Start menu

Things to know

  • Windows only, and works only with cmd.exe.
  • Licensed under GPL-3.0, a copyleft license.

Topics

FAQ

What is clink?
Adds Bash-style Readline line editing, completion, history and Lua-scriptable prompts to the native Windows cmd.exe shell. Clink brings the GNU Readline library's line-editing and completion features to cmd.exe, the default Windows command prompt. It works by injecting a DLL into a cmd.exe process and intercepting a handful of Windows API calls so that the prompt and input line are handled by Clink's Readline-based editor instead of the built-in one.
Is clink free to use? What license does it have?
clink is open source under the GPL-3.0 license. Check the license terms before using it in commercial products.
Is clink still maintained?
Actively maintained. The last commit to clink was on Nov 2, 2026.
What can I use clink for?
Windows developers who regularly work in cmd.exe and want Bash-like editing and history. Customizing the cmd.exe prompt dynamically with Lua scripts. Adding context-aware tab completion for command-line tools on Windows.
How do I install clink?
Install Clink with winget: winget install --id chrisant996.Clink -e Install Clink with scoop (alternative): scoop install clink Start cmd.exe; Clink is injected automatically if autorun is enabled, or run the Clink shortcut from the Start menu
Where can I get clink?
The source code and installation instructions are on GitHub: https://github.com/chrisant996/clink

Summary generated by AI from the project's README. GitHub stats refresh daily.

Related projects