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

cdproject

v0.1.3

Published

Fast project directory switch helper

Readme

cdp

cdp ("CD Project") saves paths to directories you work with often. Instead of cd /long/path/to/your/project, type cdp project.

Explicit naming. No fuzzy matching. No learning period. Just names you choose.

Why cdp?

Tools like zoxide learn your habits over time. cdp takes a different approach:

  • You name itcdp init api saves the current directory as "api". No guessing.
  • It just works — No frequency tracking, no database to maintain, no fuzzy heuristics.
  • Team-ready — Export and import configs. Share project shortcuts across machines.
  • Minimal — Single config file, atomic writes, no dependencies beyond Node.

Quick Start

cd /path/to/project
cdp init myproject    # saves "myproject" -> /path/to/project

cdp myproject         # prints /path/to/project
cd myproject          # now you're there

Installation

npm install -g cdproject

Shell setup

cdp outputs a path. It needs a shell wrapper to change directories for you.

cdp setup
source ~/.zshrc    # or source ~/.bashrc

For tab completion:

cdp setup --completion
source ~/.zshrc    # or source ~/.bashrc

Usage

Save a project

cd /var/www/api
cdp init api

cdp infers the name from the directory if you omit it:

cdp init          # saves as "api" if directory is /var/www/api

Jump to a project

cdp api

With the shell wrapper, cd happens automatically. Without it, cdp prints the path:

cdp api           # with wrapper: changes directory
                  # without wrapper: outputs /var/www/api

List all projects

cdp list

Output:

api       /var/www/api
web       /var/www/web

Remove a project

cdp remove old-project

Rename a project

cdp rename api backend-api

Interactive mode

Run cdp with no arguments:

cdp

Shows a numbered list of saved projects. Select by number or name.

Export config

cdp export > backup.json

Pipe to share across machines:

cdp export | ssh other-machine 'cdp import'

Import config

cdp import backup.json

Or from stdin:

cat backup.json | cdp import

Diagnose issues

cdp doctor

Checks config file, saved paths, and shell integration.

Shell Wrapper

The wrapper intercepts cdp calls and runs cd on the output. Here's what it does:

cdp() {
  if [ "$#" -eq 0 ]; then
    # Interactive mode
    # ...
  fi

  case "$1" in
    init|list|remove|rename|doctor|export|import|help|--help|-h|--version|-v|setup)
      command cdp "$@"
      ;;
    *)
      cd "$(command cdp "$@")" || return 1
      ;;
  esac
}

Add it manually to ~/.zshrc or ~/.bashrc if cdp setup doesn't work.

Configuration

Config lives at ~/.cdp/projects.json.

{
  "version": 1,
  "projects": {
    "api": {
      "path": "/var/www/api",
      "createdAt": "2024-01-15T10:00:00.000Z",
      "updatedAt": "2024-01-15T10:00:00.000Z"
    }
  }
}

Atomic writes prevent corruption if the process is interrupted.

Troubleshooting

"cdp isn't changing directories"

The shell wrapper is missing or not loaded.

grep "cdp()" ~/.zshrc

If empty, run cdp setup again and source ~/.zshrc.

"Project not found"

cdp list           # check what exists
cdp doctor         # diagnose config and paths

"Config corrupted"

cdp export > backup.json    # save what you have
rm ~/.cdp/projects.json     # delete config
cdp init myproject          # recreate

Interactive mode not working

Make sure the shell wrapper includes the interactive selection block. If you added cdp() manually, copy the full function from the installation section.

Commands

| Command | Description | |---------|-------------| | cdp init [name] | Save current directory | | cdp list | List all saved projects | | cdp remove <name> | Remove a project | | cdp rename <old> <new> | Rename a project | | cdp setup [--completion] | Add shell wrapper | | cdp doctor | Diagnose config and integration | | cdp export | Export config to stdout | | cdp import [file] | Import config from file or stdin | | cdp <name> | Jump to project |

License

MIT