Why Still Need CMD?

You might say: with PowerShell, Windows Terminal, and WSL, what's CMD still good for?

In reality, CMD is still irreplaceable in these scenarios:

  • Old .bat scripts still depend on CMD's parser;
  • Some system commands (like systeminfo, sc) behave more reliably under CMD;
  • Some remote tools only allow calling CMD;
  • Legacy project READMEs that say "run in CMD."

So—CMD still gets used, but with Clink to make it pleasant.

What Is Clink?

Clink is an open-source CMD enhancement tool, essentially a DLL injected into the CMD process via cmd /K clink_init.cmd. Its core capabilities include:

  • Command and path autocomplete (Tab);
  • History search (Ctrl + R, Ctrl + S);
  • Enhanced line editing (Ctrl + A to line start, Ctrl + K delete to end);
  • Syntax coloring: Different colors for commands, arguments, paths;
  • Extensible completions: Add smart completions for git, npm, python, etc. via Lua scripts.

It doesn't modify CMD itself—just "hooks" into it, instantly modernizing the input experience.

Installation

Download the latest installer from GitHub Releases (clink_x64.exe or the MSI installer).

Run the installer with default options:

  • Check "Add Clink to CMD.exe autorun"—so CMD auto-loads Clink on startup;
  • Check "Add to PATH"—so clink tools are callable from the command line.

After installation, open CMD. The first time, you'll see Clink X.Y.Z (built ...) at the bottom—this confirms Clink loaded successfully.

Core Shortcuts (Start Immediately)

After installing Clink, these keys work right away:

ShortcutAction
TabComplete path/command; press repeatedly to cycle
Ctrl + RReverse search history (type to filter)
Ctrl + SForward search history
Ctrl + A / Ctrl + EJump to line start / end
Ctrl + K / Ctrl + UDelete to end / to start
Ctrl + WDelete one word
Alt + B / Alt + FMove cursor left / right by word
Up / DownNavigate history (supports prefix filtering)

The most used are Tab and Ctrl + R—the former saves typing paths, the latter saves scrolling through history.

Extensible Completions: clink-completions

The official clink-completions project adds smart completions for various commands (git, npm, yarn, pip, docker, kubectl, etc.).

Installation:

  1. Clone from GitHub or download the ZIP;
  2. Copy all Lua files to %LOCALAPPDATA%\clink;
  3. Restart CMD.

After installation, typing git che and pressing Tab auto-completes to checkout; typing npm in lists install, init, install-test, etc.

History Tips

Clink stores history in %LOCALAPPDATA%\clink\clink_history, persisted across sessions.

Advanced usage:

  • history command: List all history (optional count argument);
  • !n: Execute the nth command in history;
  • !!: Execute the previous command;
  • !str: Execute the most recent command starting with str.

Many people don't know that Clink history can be shared across CMD windows—very handy when working in multiple tabs simultaneously.

Configuration: Clink Settings

Clink's settings are stored in %LOCALAPPDATA%\clink\settings. Use clink set to view and modify:

clink set echo_off 0
clink set exec_match_style unambiguous
clink set autosuggest_enable true

Common settings:

  • exec_match_style: Completion matching style (prefix/contains/fuzzy);
  • history_file_lines: Number of history entries to keep;
  • color_scheme: Color scheme;
  • autosuggest_enable: Enable gray-text history suggestions (like Fish Shell);
  • prompt_prefix / prompt_suffix: Custom prompt.

Running clink set without arguments lists all configurable options.

Custom Prompt: Make CMD Feel Like Linux

The default CMD prompt is C:\Users\xxx>. Clink provides richer prompt variables:

clink set prompt_prefix "{green}{cwd}{reset} $ "

Supported color variables: {red} {green} {blue} {yellow} {cyan} {magenta} {reset}; path variables: {cwd}, {user}, {host}, {git} (requires git integration Lua script), etc.

Once configured, the CMD prompt instantly looks "modern."

Working with Windows Terminal

Clink doesn't interfere with Windows Terminal. In Windows Terminal, add CMD as a profile—Clink auto-loads on startup, and the experience takes off.

Recommended CMD profile settings for Windows Terminal:

  • Font: Cascadia Code or JetBrains Mono;
  • Background: Dark (dark gray / pure black);
  • Cursor: Bar;
  • Color scheme: One Half Dark or Tango Dark.

This combination gives you CMD with native compatibility and a modern terminal experience.

FAQ

Q: CMD hasn't changed after installing Clink?
A: Check whether "Add Clink to CMD.exe autorun" was checked. If you forgot, run clink autorun install manually.

Q: Does it conflict with PowerShell?
A: No. Clink only affects CMD processes. PowerShell is a separate program.

Q: How much resources does it use?
A: Negligible—runtime memory usage < 10 MB.

Summary

Clink is a tool that improves CMD experience with zero learning cost. After installation, path completion, history search, and line editing—"features that should have been there all along"—are all available. It doesn't change CMD's behavior; it just makes it humane.

If your workflow still involves CMD (scripts, legacy tools), strongly consider installing Clink, combined with Windows Terminal. The overall experience is far beyond "bare CMD + cmd.exe."