dev
A CLI tool for navigating your projects without the cognitive overhead.
What it does
dev enforces a single opinionated directory structure for all your repos:
~/src/<source>/<org>/<project>
Everything lives under ~/src, organized by where the repo comes from, who owns it, and what it's called. The path is deterministic — you can always derive it from the URL. No more wondering where you cloned something six months ago.
Commands
dev clone <url>
Clones a repository into the correct path under ~/src. The path is derived automatically from the URL — no decisions to make.
dev cd [query]
Fuzzy-find any project under ~/src and navigate to it. If no query passed, opens up a fuzzy search, else picks the best match. Requires shell integration via dev init.
dev init
Prints the shell integration snippet. Add eval "$(dev init)" to your .zshrc or .bashrc to enable dev cd.
dev new <name>
New in v0.3.0. Creates a new project directory under ~/src/<source>/<org>/<name>, initializes a git repo, and cd's into it. On first use, prompts for your default source and org. Override per-invocation with --source and --org.
dev tree
New in v0.4.0. Displays an ASCII tree view of all repositories under ~/src, showing the source/org/project hierarchy. Useful for getting an overview of your repository organization at a glance.
dev loc [query]
New in v0.6.0. Prints the full path to a repository to stdout. Perfect for composing with other commands like code $(dev loc project) or ls $(dev loc repo).
Worktrees
New in v0.7.0. Work on multiple branches simultaneously using git worktrees. Worktrees live under ~/src__worktrees/, separate from ~/src/, so they don't show up in dev cd or dev tree.
dev wkt new <branch>
Creates a new worktree with a new branch and cd's into it. The directory is named <repo>__<branch> — slashes in branch names are replaced with -- to keep paths flat.
dev wkt cd
Opens a fuzzy finder to navigate between worktrees of the current repo. The main worktree is annotated with (main).
dev wkt rm [branch]
Removes a worktree, its local branch, and its remote branch. From a linked worktree, removes the current one and cd's to main. From main, specify a branch or pick one from the fuzzy finder. Always prompts for confirmation.
The worktree root is configurable in ~/.config/dev/config.json via the worktree_root key (supports ~ expansion).
Plugins
New in v0.5.0. You can extend dev with your own subcommands — no need to modify the binary. Any executable on your PATH named dev-<name> becomes available as dev <name>.
For example, create a script called dev-ll:
#!/bin/sh ls -la "$DEV_CWD"
Make it executable and place it somewhere on your PATH:
chmod +x dev-ll mv dev-ll ~/.local/bin/
Now dev ll just works. Plugins show up under their own section in dev help, receive all arguments verbatim, and get two environment variables: DEV_ROOT (the ~/src base path) and DEV_CWD (the current working directory). Plugins can be written in any language. Built-in commands always take precedence.
Install
Via Homebrew:
brew tap dsaiztc/tap brew install dev
Or with Go:
go install github.com/dsaiztc/dev@latest
Then add to your ~/.zshrc or ~/.bashrc:
eval "$(dev init)"