A CLI tool for easily managing jujutsu workspaces.
- Bun runtime
- Jujutsu (jj) and a jj repository
bun i -g github:foo-x/jwThis makes the jw command available globally.
jw initCreates .jwconfig in the repository root.
jw new <name> [-r <revision>]- Any
/in the name is automatically converted to- - The workspace is created in
<parent of default>/<repo><suffix>/<name>(suffix defaults to__ws) - Files specified in
.jwconfigare copied - Commands specified in
.jwconfigare executed
jw listjw go [name]Can be used with shell's cd command:
cd $(jw go <name>)jw rm <name>- Runs
jj workspace forget - Deletes the workspace directory
jw rename <old> <new>jw copy <name>Copies files specified in .jwconfig from the default workspace to the specified workspace.
jw cleanjw thisSwitches the default workspace to the current workspace's revision. This is useful when you want to synchronize the default workspace with your work in another workspace.
- Must be run from a non-default workspace
jw use <name>Switches the default workspace to the specified workspace's revision. This is useful when you want to switch to another workspace's revision from the default workspace.
- Must be run from the default workspace
jw versionsource <(jw completion bash)Create a .jwconfig file in the project root:
{
"copyFiles": [],
"postCreateCommands": [],
"workspacesDirSuffix": "__ws"
}copyFiles: Files/directories to copy when creating a workspacepostCreateCommands: Commands to run after creating a workspaceworkspacesDirSuffix: Suffix for the workspaces parent directory (optional)
bun install
bun link
jw <command>MIT