Home AI SkillsInshellisense: AI-Powered Command Completion for Your Linux Terminal

Inshellisense: AI-Powered Command Completion for Your Linux Terminal

by Knowledge Base Linux
Inshellisense showing IDE-style autocomplete suggestions in a Linux terminal

The default tab completion in bash and zsh is surprisingly blind: it completes file names and little else, leaving you to memorize every flag of every tool you use. Inshellisense changes that. It is Microsoft’s open-source, IDE-style autocomplete runtime for the terminal, with rich command specifications for more than 600 command-line tools. Type git checkout -- and instead of silence you get a navigable list of flags with descriptions, argument hints, and subcommand documentation, right inside your shell. In this guide, you will install inshellisense on Linux, wire it permanently into bash, zsh, or fish, master its keybindings, and tune its behavior through a simple TOML configuration file.

Inshellisense runtime autocomplete displaying command flags and descriptions in bash

Prerequisites

Inshellisense is distributed as a Node.js package, so the requirements are light:

  • Node.js 18 or newer with npm available on your PATH.
  • One of the supported shells: bash, zsh, or fish (this guide covers Linux; pwsh and nushell are also supported).
  • A terminal emulator with UTF-8 support. A Nerd Font is optional but makes the suggestion icons render nicely.
  • Basic comfort with editing your shell’s startup file, such as ~/.bashrc.

Step 1: Install Inshellisense on Linux

First confirm your Node.js version meets the minimum requirement, then install the package globally from the npm registry:

node --version
npm install -g @microsoft/inshellisense

The install unpacks platform-native binaries alongside the JavaScript runtime. Once it finishes, run the built-in diagnostic command to verify everything is healthy:

is doctor

If is doctor reports any problems, it tells you exactly what is wrong, usually a Node.js version below 18 or a missing shell integration directory. Fix the reported issue before continuing.

Step 2: Try Inshellisense in a Temporary Session

Before changing any configuration files, take inshellisense for a test drive. Running is with no arguments starts an autocomplete session inside your current shell:

is

Your prompt looks the same, but the shell is now wrapped in inshellisense’s runtime. Try typing docker run -- or npm run and watch the suggestion panel appear with flags, descriptions, and valid values. Use the arrow keys to move through suggestions, Tab to accept one, and Esc to dismiss the panel. When you are done experimenting, type exit to leave the session and return to your plain shell.

You can always check whether you are inside an inshellisense session with:

is -c

This prints whether the current shell is wrapped, which is handy when you are debugging your setup later.

Step 3: Make Inshellisense Permanent with the Shell Plugin

Starting is manually every time gets old fast. The is init command generates a shell-specific initialization snippet; appending it to your shell’s startup file makes inshellisense start automatically with every new terminal session. Pick the command for your shell:

# bash
is init bash >> ~/.bashrc

# zsh
is init zsh >> ~/.zshrc

# fish
is init fish >> ~/.config/fish/config.fish

One rule matters here: the inshellisense plugin must be the last command in your startup file. Anything placed after it, such as initializing a prompt theme or plugin manager afterward, can break the integration. After appending the snippet, reload your shell configuration:

source ~/.bashrc   # or: source ~/.zshrc

Open a new terminal tab and start typing a command. The suggestion panel should appear automatically, which confirms the plugin is active. If it does not appear, run is -c to check whether the session wrapper loaded.

Step 4: Master the Inshellisense Keybindings

Inshellisense captures a small set of keys, and only while the suggestion panel is visible. Every other key passes straight through to your shell, so your normal typing is never disturbed:

Action Keybinding
Accept the current suggestion Tab
Move to the next suggestion Down arrow
Move to the previous suggestion Up arrow
Dismiss the suggestions Esc

The muscle memory to build is simple: type until the panel shows what you want, tap the down arrow a few times if needed, and hit Tab to insert it. If the panel ever gets in your way, one Esc press hands control back to the plain shell. These defaults suit most people, but every binding is customizable through the configuration file covered in Step 6.

How Inshellisense Runtime Autocomplete Works

Understanding what happens under the hood helps you get more out of the tool. Inshellisense ships with autocomplete specifications for over 600 command-line tools, describing each tool’s subcommands, flags, options, and the values those options accept. When you type, the runtime parses the current command line, matches it against the relevant specification, and renders the matching suggestions in a panel drawn directly over your terminal.

The suggestions are context-aware in ways plain tab completion cannot be. Typing npm run in a project directory lists the scripts from your package.json. Typing git checkout offers branch names. Flags show their descriptions and accepted values, so kubectl get -- teaches you the options instead of just completing them. Inshellisense can also expand your shell aliases for bash and zsh when you enable useAliases in the configuration, so completions work through the shortcuts you already use every day.

If you enjoy AI assistance in the terminal beyond autocomplete, our ShellGPT guide shows how to generate full commands from natural-language prompts, and the terminal shortcuts guide covers the keyboard habits that pair well with inshellisense.

Step 5: Customize Inshellisense with the Configuration File

All inshellisense settings live in a TOML file at ~/.inshellisenserc. Create it with your favorite editor and add the options you want. A practical starting configuration looks like this:

# ~/.inshellisenserc
useNerdFont = true
maxSuggestions = 10
boxBorderStyle = "rounded"
useAliases = true

Here is what each setting does. useNerdFont enables the icon glyphs in suggestions if your terminal uses a Nerd Font. maxSuggestions controls how many rows the panel shows at once. boxBorderStyle switches the panel border between "square" (the default) and "rounded". useAliases turns on alias expansion for bash and zsh.

You can also rebind the keys. The following example moves suggestion acceptance to Ctrl+Space instead of Tab:

[bindings.acceptSuggestion]
key = "space"
control = true

[bindings.dismissSuggestions]
key = "escape"

Changes to the configuration file take effect the next time an inshellisense session starts, so open a new terminal after editing.

Step 6: Update and Uninstall Inshellisense

Keeping the tool current is a two-step process: update the npm package, then reinitialize the unpacked resources so the new version’s specs and shell scripts take effect:

npm install -g @microsoft/inshellisense
is reinit

If you ever want to remove it completely, is uninstall removes the binaries, resources, and shell integration. Remember to also delete the is init line from your ~/.bashrc, ~/.zshrc, or fish config afterward.

Troubleshooting Inshellisense Issues

The suggestion panel never appears. First run is -c to confirm the session wrapper is active. If it is not, check that the is init line is the last line in your shell startup file; plugin managers and prompt initializers placed after it are the most common cause of a broken integration.

No suggestions for the AWS, Azure, or Google Cloud CLIs. This is expected, not a bug. The specifications for az, gcloud, and aws are too large to bundle, so inshellisense does not provide completions for them. Everything else in its 600-tool catalog works normally.

Installation fails or behaves strangely. Verify Node.js is version 18 or newer with node --version. Older Node versions are the leading cause of cryptic install errors. Run is doctor after any fix to re-verify the installation.

Shell startup feels slower. The inshellisense wrapper adds a small amount of startup time. If it bothers you, skip the permanent plugin and start sessions manually with is only when you need autocomplete, for example during long administrative sessions.

Stale suggestions after an upgrade. Run is reinit to rebuild the unpacked resources from the updated package. This also fixes most issues where specs seem out of date after an npm update.

Conclusion

Inshellisense brings the discovery experience of an IDE into the one place sysadmins live: the terminal. You installed it with a single npm command, wired it permanently into your shell of choice, learned the four keybindings that drive it, and customized its appearance and behavior through a TOML config. The result is fewer trips to man pages, fewer mistyped flags, and faster command composition across the 600-plus tools it understands. For the full specification list and the latest releases, see the official inshellisense repository on GitHub.

You may also like

KbLinux

Typically replies within a day

Hello, Welcome to the site. Please click below button for chatting me through Telegram.