Add JSON output support for erk current command #616
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.

Extends the
erk currentcommand with--jsonflag to output worktree information in machine-readable format. Enables automation tools and scripts to reliably extract current worktree details (name, path, is_root status) with strict schema validation.Files Changed
Added
src/erk/cli/json_schemas.pyCurrentCommandResponse classModified
src/erk/cli/commands/current.py- Added --json flag and JSON response handlingtests/commands/display/test_current.py- Added 3 new JSON output testsKey Changes
CurrentCommandResponsePydantic schema (name, path, is_root fields)--jsonflag routes output through JSON serialization layerTest Results
All 1575 tests passing. CI validation complete.