A place for the work in between
desk gives quick experiments and one-off clones named workspaces, a few commands to move between them, and a prompt that shows where you are.
Terminal
$ desk new octocat/Hello-World Cloning into '/home/you/.desk/workspaces/misty-ember'... desk: created misty-ember (misty-ember) $ desk new desk: created drifting-tundra (drifting-tundra) $ desk cd mis (misty-ember) $
Why desk
Stop collecting test-2 and tmp-fix
Throwaway work tends to stick around: test-2, tmp-fix, a third clone of the same repo. desk keeps it in one place, under names you can remember.
Scratch workspaces
desk new gives you an empty directory with a name like drifting-tundra. No naming, no deciding where it lives.
Repository workspaces
desk new owner/repo clones into its own workspace. Run it again, however you spell the URL, and you're back in the same clone.
Your prompt knows
In zsh, oh-my-zsh, bash, and fish, your prompt shows the workspace and where you are inside it.
One list
desk list shows every workspace and its origin, instantly and offline. * marks the one you're in.
Names, not paths
desk cd misty jumps to a workspace by name or unique prefix. With no name, it goes to the top of the current one.
Gone when you say so
desk rm shows uncommitted and unpushed work, then asks. Nothing is deleted automatically.
How it works
Four commands, from idea to done
Everything else is your normal shell and tools. Nothing happens in the background.
Start
desk newCreates a workspace with a two-word name and moves you there.
Clone
desk new owner/repoClones into a new workspace, or returns to the existing clone.
Move around
desk cd mistyJump between workspaces by name or prefix. Your prompt follows.
Finish
desk rmDeletes the workspace you're in, after you confirm.
Shell integration
Your prompt shows where you are
One line in your shell's startup file lets desk change your directory and puts the current workspace in front of your prompt, in zsh, oh-my-zsh, bash, and fish.
- The workspace name and your path inside it, in front of your prompt
- desk new and desk cd change your directory
- Tab completion for commands and workspace names
- Works with oh-my-zsh themes and fish's default prompt
- desk_prompt_info for placing it in a custom prompt
➜ ~ desk cd misty (misty-ember) ➜ misty-ember cd src/api (misty-ember/src/api) ➜ api desk list drifting-tundra scratch * misty-ember https://github.com/octocat/Hello-World.git
eval "$(desk init zsh)" to ~/.zshrc, or the bash or fish equivalent.Try it without touching your real workspaces
Point desk at a separate data root while you get a feel for it. Unset the variable to go back.
export DESK_HOME="$HOME/.desk-trial"