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

cdx-dir

v0.1.6

Published

Interactive directory navigator for quickly drilling into folders from your shell.

Downloads

46

Readme

cdx-dir

cdx-dir is an Ink-based directory navigator. It lets you drill into child directories with the keyboard, then returns the selected path so a shell wrapper can cd into it.

Install From npm

npm install -g cdx-dir

cdx-dir prints the selected directory path. To actually change your current shell directory, add a cdx shell function.

Bash/Zsh Wrapper

Add this function to ~/.bashrc, ~/.zshrc, or another shell profile:

cdx() {
  local dir
  dir="$(cdx-dir "$@")" || return
  [ -n "$dir" ] && cd "$dir"
}

Reload your shell profile, then run:

cdx

PowerShell Wrapper

$oldProfile = $PROFILE
$backup = "$PROFILE.bak"

if (Test-Path $oldProfile) {
  Copy-Item $oldProfile $backup -Force
  Remove-Item $oldProfile -Force
}

New-Item -ItemType File -Path $oldProfile -Force

Add this function to your PowerShell profile:


@'
function cdx {
  $dir = cdx-dir @args
  if ($dir) {
    Set-Location -LiteralPath $dir
  }
}
'@ | Set-Content -Path $PROFILE -Encoding UTF8

Reload your profile:

. $PROFILE

Then run:

cdx

Keys

  • Type text: filter child directories by name
  • Up / Down: move selection
  • k / j: move selection
  • Tab: enter highlighted directory
  • Backspace: delete search text; when search is empty, go to parent directory
  • Enter: confirm current directory
  • Esc: clear search text; when search is empty, cancel
  • Ctrl+C: cancel

The directory list shows a fixed six-row window. When there are more matches, moving past the top or bottom automatically scrolls the window.

Dot folders such as .config, .codex, and .ssh are shown by default.

Local Development

bun install
bun run test
bun run typecheck
bun run build

Run the built CLI directly:

node dist/cli.js

Direct CLI execution prints the selected path. Use the wrapper above when you want the parent shell to change directories.