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

mkdcd

v0.1.0

Published

Tiny mkdir + cd shortcut: make a directory (recursively) and cd into it.

Readme

mkdcd

mkdir + cd in one tiny command. Create a directory (recursively when the path is nested) and step into it — no more mkdir foo && cd foo.

$ mkdcd projects/app/src
created projects/app/src
$ pwd
/home/you/projects/app/src
  • Tiny: one POSIX sh script, no compilation, no dependencies.
  • Cross-platform: Linux + macOS, works in bash, zsh, and fish.
  • Recursive by default; choose to land on the leaf or the newly-created root.

How it works (the one thing to know)

A program can't change your shell's current directory — only the shell can. So mkdcd comes in two parts:

  1. a binary (mkdcd) that does the mkdir -p and prints the target path, and
  2. a shell function that runs the binary and cds into whatever it printed.

You install the binary once, then add one line to your shell rc to enable the cd part. Without that line, mkdcd still creates the directory and prints its path — it just won't move your shell.


Install

Homebrew (macOS / Linux)

brew install Abdelhak-Bahri/tap/mkdcd
# or, from the formula in this repo:
brew install --formula ./Formula/mkdcd.rb

npm

npm install -g mkdcd

Debian / Ubuntu (apt / .deb)

# grab the .deb from Releases, then:
sudo apt install ./mkdcd_0.1.0_all.deb
# (build one yourself with: nfpm package -p deb  — see "Build a package" below)

curl one-liner

curl -fsSL https://raw.githubusercontent.com/Abdelhak-Bahri/mkdcd/main/install.sh | sh

Build from source

There's nothing to compile — it's a script. Just install it:

git clone https://github.com/Abdelhak-Bahri/mkdcd
cd mkdcd
make install                       # -> ~/.local/bin/mkdcd  (no root)
sudo make install PREFIX=/usr/local  # system-wide

Enable the cd (shell integration)

Add the matching line to your shell config, then restart your shell:

# bash  (~/.bashrc)
eval "$(mkdcd init bash)"

# zsh   (~/.zshrc)
eval "$(mkdcd init zsh)"

# fish  (~/.config/fish/config.fish)
mkdcd init fish | source

(Or source the shipped mkdcd.sh / mkdcd.fish files directly.)


Usage

mkdcd [OPTIONS] <dir>
mkdcd init <bash|zsh|fish|posix>

| Option | Meaning | | ---------------- | ------------------------------------------------------------- | | -l, --leaf | cd into the deepest created directory (default) | | -r, --root | cd into the shallowest newly-created directory | | -q, --quiet | suppress the "created" message | | -h, --help | show help | | -v, --version | show version |

Examples

mkdcd app                 # create ./app, cd into it
mkdcd a/b/c               # create a/b/c, cd into a/b/c        (leaf)
mkdcd -r a/b/c            # create a/b/c, cd into 'a'          (new root)
mkdcd "logs $(date +%F)"  # spaces are fine when quoted

Leaf vs. root: for mkdcd a/b/c where a already exists but b and c are new, --leaf lands you in a/b/c, while --root lands you in a/b (the topmost directory this command actually created).


Build a package (maintainers)

Uses nfpm to build .deb and .rpm from the same config:

nfpm package -f nfpm.yaml -p deb   # -> mkdcd_0.1.0_all.deb
nfpm package -f nfpm.yaml -p rpm

Test

make check      # or: sh test/test.sh

Uninstall

make uninstall              # if installed via make
npm uninstall -g mkdcd      # if installed via npm
brew uninstall mkdcd        # if installed via brew
rm ~/.local/bin/mkdcd       # if installed via curl

Then remove the mkdcd init … line from your shell rc.

License

MIT — see LICENSE.