jk manual
Work across workspace directories
Inspect, add, rename, update, and forget jj workspaces.
Press W, or start with jk workspaces, to list the repository’s jj workspaces. A workspace is a
working directory with its own working-copy change. Workspaces share repository history; rewriting
an ancestor can affect changes used by other workspaces.
Start from a working directory or specify one explicitly. With this source version and jj 0.45.1,
automatic startup from a repository container without a working copy fails to select its child
workspace. From a container whose working directory is default, use jk -R default workspaces.
Replace default with the actual directory and verify the selected workspace’s path. See the
container-startup defect.
Inspect another workspace without changing directories
Begin with two workspace entries and select the one you want to inspect.
- Press
lfor its log. - Press
Enterorsfor its status. - Press
dfor its working-copy diff. - Press
Backspaceto return to the workspace list, andrto refresh that list.
These views are scoped to the selected workspace’s root. Its log is a rendered inspection view, not
the main navigable revision log; use explicit :show scratch@ or :evolog -r scratch@ commands for
further inspection, replacing scratch with that workspace’s name. Check the path in the title
before acting on what you see. Opening another workspace’s status does not switch the shell’s
current directory or the repository used by : and !. For a command that must operate on that
directory, specify -R explicitly in a jj command or reopen jk with that workspace as its startup
scope. The command prompt does not show this
scope. If its directory is missing, jk reports
the error and keeps the list open; restore the directory or choose whether its metadata should be
forgotten.
Press a in the workspace list to open lifecycle actions for the selected workspace.
Add a workspace for separate work
Choose a workspace to use as the path context. Press a a, then enter a destination path such as
../review-copy. A relative destination is resolved against the selected workspace’s root. The
final path component supplies the new workspace name.
- Read the selected workspace and root in the input form.
- Enter the destination and press
Enterto prepare the command. - Check the resolved destination, name, and exact
jj workspace addcommand. - Press
Enterto execute, orEscto cancel. - Verify the new list row, inspect its status, and check that the directory exists.
The native form supplies the destination and name. Creation revisions, a creation message, or sparse patterns require an explicit noninteractive jj command. If you undo an addition, check whether its directory remains before removing any files.
An existing destination, name collision, invalid path, or permissions problem can make add fail. Read the retained diagnostic and reopen Add to enter a corrected destination. A failed action loses its input draft. Check whether it created a directory before reusing its path.
Rename a workspace
Select it, press a r, and enter the new workspace name. Enter prepares the command; another
Enter executes it after review. Esc cancels either stage.
Rename changes jj’s workspace name; its directory path stays the same. Verify the new name in the list and the same root path in its inspection view. A duplicate name is rejected by jj; the error remains available in Command History. Reopen Rename and enter a corrected name; a failed rename does not retain the input draft. To reverse an unwanted successful rename, rename it back or inspect the operation before selecting recovery.
Update a stale workspace
After a graph rewrite from another workspace, a working directory can be stale relative to the
repository’s current operation. Select that workspace and press u, or use a u.
Read the preview’s workspace name and path. Enter runs jj workspace update-stale with that
workspace as its repository scope; Esc cancels. The command can update that directory’s files to
match its working-copy state.
After success, open its status and diff and verify that the stale warning is gone and its content is
correct. If jj reports a missing directory, concurrent change, or another failure, retain the
message from C, resolve the cause, and refresh before retrying. Inspect the operation history
before reversing a successful update.
Forget workspace metadata while keeping files
Use Forget when jj should stop tracking a workspace entry. Select it and press a f.
The preview names the workspace and explains the metadata scope. Press Enter to confirm or Esc
to cancel. The entry disappears from the refreshed list. Its directory and files remain on disk.
This action is separate from abandoning the working-copy change or deleting a directory.
Verify both results: the workspace row is gone, and any files you intended to keep still exist. Keep
the directory until you have checked the outcome. If you forgot the wrong entry, inspect the
operation in C and use jj operation recovery as appropriate before doing further cleanup.
Workspace confirmations also accept y to run and n to cancel. Their arrow and Page Up/Down keys
scroll long command text. If the terminal is too small to display a decision, enlarge it before
confirming. Run Options does not apply to workspace commands.
Check failure and recovery in context
Open C after a lifecycle action to read its exact repository argument, command, output, and
status. Use o on the record for the captured resulting operation; if none is available, jk opens
Operation Log. Inspect both the shared graph and the affected directory when recovering. Undoing
repository metadata cannot be assumed to undo unrelated file edits or remove a directory created by
add.
Watch the workflow
Check which workspace a command will change
Screenshots and terminal evidence
Read the terminal text
jk jj bookmark list › audit-context: 5416e289bcca (local) audit-context@git: 5416e289bcca (tracked, synced) Enter inspect c create m move x delete F fetch P dry-run ? help Esc back
Read the terminal text
jk jj -R /home/runner/work/jk/jk/target/manual-fixtures/workspaces.MvkFJr/workflows.8HgG9l/workspa
Working copy changes:
A ../scratch/KEEP-ME.txt
Working copy (@) : tlznmvqv 6ada6fb2 (no description set)
Parent commit (@-): qnyvzuou b2e6655a Add workspace demo files
jj command
: describe -m 'Scope audit changed startup workspace' @
enter run Ctrl-u clear backspace edit esc cancel
Read the terminal text
jk jj --no-pager --color always --repository /home/runner/work/jk/jk/target/manual-fixtures/worksp Command: jj --no-pager --color always --repository /home/runner/work/jk/jk/target/manual-fixtures/ Status: success Stdout: <empty> Stderr: Working copy (@) now at: qmquxmry 38b1b40c audit-context | (empty) Scope audit changed startup wo Parent commit (@-) : qnyvzuou b2e6655a Add workspace demo files Actions: e edit/retry command : run another jj command ? help V options r refresh j/k line space page q quit
Read the terminal text
jk jj › @ qmquxmry [email protected] 2026-01-01 12:00:00 audit-context default@ 5416e289 · │ (empty) Workspace lifecycle demo │ ○ tlznmvqv [email protected] 2026-01-01 12:00:00 scratch@ 6ada6fb2 ├─╯ (no description set) ○ qnyvzuou [email protected] 2026-01-01 12:00:00 b2e6655a │ Add workspace demo files ◆ zzzzzzzz root() 00000000 ? help H home L log r refresh enter open d diff v evolog s status space mark ... q quit
Binary, tool versions, and file hashes · Accepted pixel, text/style, and video review · action-diagnostics/bin/dependencies.log · action-diagnostics/tape-1.log · Outcome assertions 1 · Outcome assertions 2
All retained evidence (50 files)
Includes source tapes, original helper scripts, fixture details, terminal states, and logs.
- action-diagnostics/bin/dependencies.log
- action-diagnostics/manifest.json
- action-diagnostics/tape-1.log
- audit-baseline.json
- audit-recovered-assertions.json
- audit-scope-assertions.json
- audit-scope-context-bookmarks.json
- audit-scope-context-bookmarks.png
- audit-scope-context-hidden-help.json
- audit-scope-context-hidden-help.png
- audit-scope-context-input.json
- audit-scope-context-input.png
- audit-scope-context-recovered.json
- audit-scope-context-recovered.png
- audit-scope-context-result.json
- audit-scope-context-result.png
- audit-scope-context.mp4
- audit-scope-context.tape
- build-provenance.json
- capture.tape
- checkpoint-summary.json
- fixture-env.sh
- fixture.json
- source-scripts/abandon-dialog-fixture.sh
- source-scripts/action-menu-demo-fixture.sh
- source-scripts/betamax-cancellable-jj.sh
- source-scripts/betamax-fixture-env.sh
- source-scripts/betamax-fixture.sh
- source-scripts/betamax-setup.sh
- source-scripts/check-manual-coverage.py
- source-scripts/check-refresh-proof.py
- source-scripts/check-run-options-proof.py
- source-scripts/manual-assert.sh
- source-scripts/manual-audit-assert.py
- source-scripts/manual-fixture-jj.sh
- source-scripts/manual-fixture.sh
- source-scripts/manual-recordings.py
- source-scripts/package-release-archive.sh
- source-scripts/prepare-manual-evidence.py
- source-scripts/prepare-preview.sh
- source-scripts/reflow-rust-comments.py
- source-scripts/refs-remotes-demo-fixture.sh
- source-scripts/run-betamax.sh
- source-scripts/shared-selector-demo-fixture.sh
- source-scripts/test_manual_evidence.py
- source-scripts/test_manual_recordings.py
- source-scripts/workflows-demo-fixture.sh
- source-scripts/workspace-lifecycle-demo-fixture.sh
- source.tape
- accepted-review.json
Other recorded forms and recovery paths (3)
Inspect another workspace without switching scope
Screenshots and terminal evidence
Read the terminal text
jk jj -R /home/runner/work/jk/jk/target/manual-fixtures/workspaces.CSSzGn/workflows.RLxDb7/workspa Working copy changes: A ../scratch/KEEP-ME.txt Working copy (@) : psukwknu c0b49187 (no description set) Parent commit (@-): zrqnkqsw 9f6af6b1 Add workspace demo files ? help V options r refresh j/k line space page q quit
Read the terminal text
jk jj -R /home/runner/work/jk/jk/target/manual-fixtures/workspaces.CSSzGn/workflows.RLxDb7/workspa
Added regular file ../scratch/KEEP-ME.txt:
1: workspace files remain after metadata changes
? help V options r refresh j/k line space page q quit
Read the terminal text
jk jj --no-pager --color always --repository /home/runner/work/jk/jk/target/manual-fixtures/worksp Command: jj --no-pager --color always --repository /home/runner/work/jk/jk/target/manual-fixtures/ Status: success Stdout: Commit ID: c0b49187b780fcb257a9de838ca57114b9e59454 Change ID: psukwknupoqyrlkywwkwxqmqqpxlsokx Author :<redacted> Author <[email protected]> (2026-01-01 12:00:00) Committer: Alex Developer <[email protected]> (2026-01-01 12:00:00) (no description set) Added regular file KEEP-ME.txt: 1: workspace files remain after metadata changes Stderr: <empty> Actions: e edit/retry command : run another jj command ? help V options r refresh j/k line space page q quit
Read the terminal text
jk jj --no-pager --color always --repository /home/runner/work/jk/jk/target/manual-fixtures/worksp Command: jj --no-pager --color always --repository /home/runner/work/jk/jk/target/manual-fixtures/ Status: success Stdout: ○ psukwknu [email protected] 2026-01-01 12:00:00 scratch@ c0b49187 │ (no description set) │ -- operation c7dc37b64b56 snapshot working copy ○ psukwknu/1 [email protected] 2026-01-01 12:00:00 986385ef (hidden) (empty) (no description set) -- operation 88af11740632 create initial working-copy commit in workspace scratch Stderr: <empty> Actions: e edit/retry command : run another jj command ? help V options r refresh j/k line space page q quit
Binary, tool versions, and file hashes · Accepted pixel, text/style, and video review · action-diagnostics/bin/dependencies.log · action-diagnostics/tape-1.log · Outcome assertions 1
All retained evidence (46 files)
Includes source tapes, original helper scripts, fixture details, terminal states, and logs.
- action-diagnostics/bin/dependencies.log
- action-diagnostics/manifest.json
- action-diagnostics/tape-1.log
- build-provenance.json
- capture.tape
- checkpoint-summary.json
- fixture-env.sh
- fixture.json
- source-scripts/abandon-dialog-fixture.sh
- source-scripts/action-menu-demo-fixture.sh
- source-scripts/betamax-cancellable-jj.sh
- source-scripts/betamax-fixture-env.sh
- source-scripts/betamax-fixture.sh
- source-scripts/betamax-setup.sh
- source-scripts/check-manual-coverage.py
- source-scripts/check-refresh-proof.py
- source-scripts/check-run-options-proof.py
- source-scripts/manual-assert.sh
- source-scripts/manual-audit-assert.py
- source-scripts/manual-fixture-jj.sh
- source-scripts/manual-fixture.sh
- source-scripts/manual-recordings.py
- source-scripts/package-release-archive.sh
- source-scripts/prepare-manual-evidence.py
- source-scripts/prepare-preview.sh
- source-scripts/reflow-rust-comments.py
- source-scripts/refs-remotes-demo-fixture.sh
- source-scripts/run-betamax.sh
- source-scripts/shared-selector-demo-fixture.sh
- source-scripts/test_manual_evidence.py
- source-scripts/test_manual_recordings.py
- source-scripts/workflows-demo-fixture.sh
- source-scripts/workspace-lifecycle-demo-fixture.sh
- source.tape
- workspaces-inspect-assertions.json
- workspaces-inspect-diff.json
- workspaces-inspect-diff.png
- workspaces-inspect-evolog.json
- workspaces-inspect-evolog.png
- workspaces-inspect-show.json
- workspaces-inspect-show.png
- workspaces-inspect-status.json
- workspaces-inspect-status.png
- workspaces-inspect.mp4
- workspaces-inspect.tape
- accepted-review.json
Add, rename and forget a workspace
Screenshots and terminal evidence
Read the terminal text
jk jj workspace list
* default /home/runner/work/jk/jk/target/manual-fixtures/workspaces.zmNul7/workflows.4NDboK/wo
› scratch /home/runner/work/jk/jk/target/manual-fixtures/workspaces.zmNul7/workflows.4NDboK/wo
Forget workspace metadata?
Workspace scratch
Path
/home/runner/work/jk/jk/target/manual-fixtures/workspaces.zmNul7/workflows
.4NDboK/workspaces/scratch
Files are not deleted. Only jj workspace metadata is forgotten.
Exact command
jj --no-pager --color always --repository /home/runner/work/jk/jk/target/m
anual-fixtures/workspaces.zmNul7/workflows.4NDboK/workspaces/repo workspac
e forget scratch
↑/↓ Review Enter / y Confirm Esc / n Cancel
Read the terminal text
jk jj workspace list
* default /home/runner/work/jk/jk/target/manual-fixtures/workspaces.zmNul7/workflows.4NDboK/wo
› scratch /home/runner/work/jk/jk/target/manual-fixtures/workspaces.zmNul7/workflows.4NDboK/wo
Add workspace
Workspace scratch
Path
/home/runner/work/jk/jk/target/manual-fixtures/workspaces.zmNul7/workflows
.4NDboK/workspaces/scratch
Destination
/home/runner/work/jk/jk/target/manual-fixtures/workspaces.zmNul7/workflows
.4NDboK/workspaces/manual-added
Name manual-added
Exact command
jj --no-pager --color always --repository /home/runner/work/jk/jk/target/m
anual-fixtures/workspaces.zmNul7/workflows.4NDboK/workspaces/repo workspac
e add /home/runner/work/jk/jk/target/manual-fixtures/workspaces.zmNul7/wor
kflows.4NDboK/workspaces/manual-added --name manual-added
↑/↓ Review Enter / y Confirm Esc / n Cancel
Read the terminal text
jk jj workspace list
* default /home/runner/work/jk/jk/target/manual-fixtures/workspaces.zmNul7/workflows.4NDboK/wo
› manual-renamed /home/runner/work/jk/jk/target/manual-fixtures/workspaces.zmNul7/workflows.4N
scratch /home/runner/work/jk/jk/target/manual-fixtures/workspaces.zmNul7/workflows.4NDboK/wo
Rename workspace failed: Error: Failed to rename a workspace
Read the terminal text
jk jj workspace list
› * default /home/runner/work/jk/jk/target/manual-fixtures/workspaces.zmNul7/workflows.4NDboK/wo
scratch /home/runner/work/jk/jk/target/manual-fixtures/workspaces.zmNul7/workflows.4NDboK/wo
Forget workspace metadata succeeded · C history · o operations
Binary, tool versions, and file hashes · Accepted pixel, text/style, and video review · action-diagnostics/bin/dependencies.log · action-diagnostics/tape-1.log · Outcome assertions 1
All retained evidence (46 files)
Includes source tapes, original helper scripts, fixture details, terminal states, and logs.
- action-diagnostics/bin/dependencies.log
- action-diagnostics/manifest.json
- action-diagnostics/tape-1.log
- build-provenance.json
- capture.tape
- checkpoint-summary.json
- fixture-env.sh
- fixture.json
- source-scripts/abandon-dialog-fixture.sh
- source-scripts/action-menu-demo-fixture.sh
- source-scripts/betamax-cancellable-jj.sh
- source-scripts/betamax-fixture-env.sh
- source-scripts/betamax-fixture.sh
- source-scripts/betamax-setup.sh
- source-scripts/check-manual-coverage.py
- source-scripts/check-refresh-proof.py
- source-scripts/check-run-options-proof.py
- source-scripts/manual-assert.sh
- source-scripts/manual-audit-assert.py
- source-scripts/manual-fixture-jj.sh
- source-scripts/manual-fixture.sh
- source-scripts/manual-recordings.py
- source-scripts/package-release-archive.sh
- source-scripts/prepare-manual-evidence.py
- source-scripts/prepare-preview.sh
- source-scripts/reflow-rust-comments.py
- source-scripts/refs-remotes-demo-fixture.sh
- source-scripts/run-betamax.sh
- source-scripts/shared-selector-demo-fixture.sh
- source-scripts/test_manual_evidence.py
- source-scripts/test_manual_recordings.py
- source-scripts/workflows-demo-fixture.sh
- source-scripts/workspace-lifecycle-demo-fixture.sh
- source.tape
- workspaces-lifecycle-add.json
- workspaces-lifecycle-add.png
- workspaces-lifecycle-assertions.json
- workspaces-lifecycle-cancel.json
- workspaces-lifecycle-cancel.png
- workspaces-lifecycle-collision.json
- workspaces-lifecycle-collision.png
- workspaces-lifecycle-finished.json
- workspaces-lifecycle-finished.png
- workspaces-lifecycle.mp4
- workspaces-lifecycle.tape
- accepted-review.json
Bring a stale workspace up to date
Screenshots and terminal evidence
Read the terminal text
jk jj workspace list
* default /home/runner/work/jk/jk/target/manual-fixtures/workspaces-stale.SYq8aL/workflows.vbU
› scratch /home/runner/work/jk/jk/target/manual-fixtures/workspaces-stale.SYq8aL/workflows.vbU
Update stale workspace?
Workspace scratch
Path
/home/runner/work/jk/jk/target/manual-fixtures/workspaces-stale.SYq8aL/wor
kflows.vbUrW6/workspaces/scratch
Exact command
jj --no-pager --color never --repository /home/runner/work/jk/jk/target/ma
nual-fixtures/workspaces-stale.SYq8aL/workflows.vbUrW6/workspaces/scratch
workspace update-stale
↑/↓ Review Enter / y Confirm Esc / n Cancel
Read the terminal text
jk jj workspace list * default /home/runner/work/jk/jk/target/manual-fixtures/workspaces-stale.SYq8aL/workflows.vbU › scratch /home/runner/work/jk/jk/target/manual-fixtures/workspaces-stale.SYq8aL/workflows.vbU updated scratch via workspace update-stale: Working copy (@) now at: lkpsvqkm 4b6fda98 Refresh sc
Read the terminal text
jk jj -R /home/runner/work/jk/jk/target/manual-fixtures/workspaces-stale.SYq8aL/workflows.vbUrW6/w Working copy changes: A ../scratch/KEEP-ME.txt D ../scratch/README.md Working copy (@) : lkpsvqkm 4b6fda98 Refresh scratch description Parent commit (@-): lypuszsr 575ac4b4 Add workspace demo files ? help V options r refresh j/k line space page q quit
Read the terminal text
jk jj workspace list * default /home/runner/work/jk/jk/target/manual-fixtures/workspaces-stale.SYq8aL/workflows.vbU › scratch /home/runner/work/jk/jk/target/manual-fixtures/workspaces-stale.SYq8aL/workflows.vbU updated scratch via workspace update-stale: Attempted recovery, but the working copy is not stale.
Binary, tool versions, and file hashes · Accepted pixel, text/style, and video review · action-diagnostics/bin/dependencies.log · action-diagnostics/tape-1.log · Outcome assertions 1
All retained evidence (46 files)
Includes source tapes, original helper scripts, fixture details, terminal states, and logs.
- action-diagnostics/bin/dependencies.log
- action-diagnostics/manifest.json
- action-diagnostics/tape-1.log
- build-provenance.json
- capture.tape
- checkpoint-summary.json
- fixture-env.sh
- fixture.json
- source-scripts/abandon-dialog-fixture.sh
- source-scripts/action-menu-demo-fixture.sh
- source-scripts/betamax-cancellable-jj.sh
- source-scripts/betamax-fixture-env.sh
- source-scripts/betamax-fixture.sh
- source-scripts/betamax-setup.sh
- source-scripts/check-manual-coverage.py
- source-scripts/check-refresh-proof.py
- source-scripts/check-run-options-proof.py
- source-scripts/manual-assert.sh
- source-scripts/manual-audit-assert.py
- source-scripts/manual-fixture-jj.sh
- source-scripts/manual-fixture.sh
- source-scripts/manual-recordings.py
- source-scripts/package-release-archive.sh
- source-scripts/prepare-manual-evidence.py
- source-scripts/prepare-preview.sh
- source-scripts/reflow-rust-comments.py
- source-scripts/refs-remotes-demo-fixture.sh
- source-scripts/run-betamax.sh
- source-scripts/shared-selector-demo-fixture.sh
- source-scripts/test_manual_evidence.py
- source-scripts/test_manual_recordings.py
- source-scripts/workflows-demo-fixture.sh
- source-scripts/workspace-lifecycle-demo-fixture.sh
- source.tape
- workspaces-stale-assertions.json
- workspaces-stale-current.json
- workspaces-stale-current.png
- workspaces-stale-preview.json
- workspaces-stale-preview.png
- workspaces-stale-status.json
- workspaces-stale-status.png
- workspaces-stale-updated.json
- workspaces-stale-updated.png
- workspaces-stale.mp4
- workspaces-stale.tape
- accepted-review.json