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. New in v0.9.0: dev cd - jumps back to the previous directory, just like cd -.
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. Pass --json (v0.8.0) for a machine-readable array of repo paths.
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). Pass --json (v0.8.0) to get {"repo":…,"path":…} instead.
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.
Renamed in v0.8.0: the subcommand is now dev wt. dev wkt still works as a deprecated alias (it prints a warning and will be removed later). Running dev wt with no subcommand defaults to dev wt cd.
dev wt 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 wt cd
Opens a fuzzy finder to navigate between worktrees of the current repo. The main worktree is annotated with (main). dev wt cd - (v0.9.0) jumps back to the previous directory.
dev wt 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. Prompts for confirmation unless --yes (v0.8.0) is passed.
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.
Scripting & AI agents
New in v0.8.0. dev follows agent-friendly CLI conventions so it works cleanly in scripts, CI, and with AI coding agents — never blocking on a prompt and offering machine-readable output.
--no-input
Disables every interactive prompt. Commands fall back to sensible defaults or fail fast with a clear error instead of waiting on a terminal that isn't there.
--json
Available on dev tree and dev loc — emit structured output you can pipe into jq instead of scraping text.
--no-color · NO_COLOR
Strips ANSI color from output. Also honored via the NO_COLOR environment variable.
--version
Prints the installed version and exits.
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)"