npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

terminalsense

v0.1.5

Published

A lightweight terminal daemon that provides autocorrect, inline ghost-text suggestions, and memory-based next-command prediction.

Readme

terminalsense

A lightweight terminal daemon that provides autocorrect, inline ghost-text suggestions, and memory-based next-command prediction — all without a GUI or Electron runtime.

Features

  • Autocorrect — detects and fixes mistyped commands before they execute (e.g. git comitgit commit)
  • Ghost-text suggestions — inline completions as you type, accepted with Tab
  • Memory predictions — learns your command sequences and predicts the next command

Requirements

  • Node.js 18 or later
  • bash, zsh, or PowerShell 5.1+ / pwsh

Installation

npm i terminalsense

Quick Start

1. Install

npm i terminalsense

2. Set up your shell

tac setup

This installs the shell hook into your profile, writes the hook file under ~/.terminal-autocorrect/, and starts the daemon.

If auto-detection picks the wrong shell, pass it explicitly:

tac setup bash
tac setup zsh
tac setup powershell

3. Test it

Try typing a command with a typo:

git statsu    # Press Enter → autocorrects to "git status"
npm isntall   # Press Enter → autocorrects to "npm install"
docker ps -a  # Works with any command

4. Monitor with Terminal UI

tac tui        # or tac -t

This opens a real-time dashboard showing:

  • Daemon status and PID
  • Recent autocorrections with timestamps
  • Top corrected commands
  • Current configuration
  • Live statistics

Press r to refresh, q to quit.

Windows Notes

The tool is fully supported on Windows with the following platform-specific behaviour:

  • IPC: Uses Windows named pipes (\\.\pipe\terminal-autocorrect) instead of Unix domain sockets.
  • Shell hook: Use tac init powershell for Windows Terminal / PowerShell. The hook integrates with PSReadLine for Tab completion and PreCommandLookupAction for autocorrect.
  • Stop command: Uses taskkill /F to terminate the daemon instead of SIGTERM.
  • PATH scanning: Detects executables by extension (.exe, .cmd, .bat, .ps1, .com) and strips the extension so git.exe is registered as git.
  • bash/zsh hooks: Still work inside Git Bash or WSL on Windows.

Commands

| Command | Description | |---|---| | tac start | Launch the daemon as a background process | | tac stop | Stop the running daemon | | tac status | Check whether the daemon is running | | tac tui or tac -t | Open terminal user interface dashboard | | tac setup [shell] | Install the shell hook, update the profile, and start the daemon | | tac init <shell> | Output the shell hook snippet for bash, zsh, or powershell | | tac corrections | List all autocorrections applied in the current session | | tac config set <key> <value> | Set a configuration value | | tac config get <key> | Get a configuration value | | tac config list | List all configuration keys and their current values | | tac history clear | Delete all stored command history and patterns |

The terminalsense binary is an alias for tac and accepts the same commands.

Configuration Reference

Configuration is stored at ~/.terminal-autocorrect/config.json. Use tac config set to update values.

| Key | Type | Default | Description | |---|---|---|---| | maxEditDistance | integer | 2 | Maximum edit distance for autocorrect to fire. Higher values correct more aggressively. | | maxHistoryEntries | integer | 10000 | Maximum number of history entries to retain. Oldest entries are removed when the cap is exceeded. | | historyPath | string | ~/.terminal-autocorrect/history.json | Path to the command history file. | | suggestionColor | string | dim | ANSI color name used to render ghost-text suggestions. | | enabled | boolean | true | Master switch. When false, all autocorrect and suggestion features are disabled. | | autocorrectEnabled | boolean | true | Enable or disable the autocorrect engine independently. | | suggestionsEnabled | boolean | true | Enable or disable inline ghost-text suggestions independently. | | memoryEnabled | boolean | true | Enable or disable memory-based next-command prediction independently. |

Examples

# Increase autocorrect aggressiveness
tac config set maxEditDistance 3

# Disable autocorrect but keep suggestions
tac config set autocorrectEnabled false

# Change the history file location
tac config set historyPath /tmp/tac-history.json

# View all current settings
tac config list

Data Files

All data is stored in ~/.terminal-autocorrect/:

| File | Description | |---|---| | config.json | User configuration | | history.json | Command history and learned patterns | | daemon.pid | Daemon process ID (lock file) | | daemon.sock | Unix domain socket for IPC |

Uninstalling

tac stop
npm uninstall -g terminalsense
rm -rf ~/.terminal-autocorrect

License

MIT