CLI command
jeden workspace
Inspect, validate, or adopt an existing local repository as Jeden's default workspace.
Exact invocation#
jeden workspace [status|discover [path]|adopt <path>] [--json]Inputs and options#
- No action defaults to
status.discoveraccepts an optional existing path and otherwise inspects the current directory.adoptrequires a path. - A relative path is resolved from the invocation directory;
--jsonreturns the same operation report as a JSON object. - The supported sources are an existing readable directory and a Git working tree detected by an existing
.gitdirectory or worktree file in that path or an ancestor. Jeden session history is associated through each canonicalstate.jsoncwd; it is not re-imported.
Output and state effect#
discover validates without writing. adopt validates the complete source first, then atomically stores its canonical absolute path as workspace.defaultPath in ~/.jeden/config.yml. A later interactive, run, or pursue task uses that workspace unless --cwd is explicit; adoption from a running terminal first-use or setup screen also rebases that session before its next agent turn. The result names the accepted path, source kind, repository root, existing sessions accepted or unreadable, and imported/unchanged/conflicting/rejected counts. It never copies, cleans, resets, or writes the repository or its session ledgers.
Refusals and boundaries#
- A missing
adoptpath is refused withUsage: jeden workspace adopt <path> [--json]; an unknown action prints the complete workspace usage. - A path containing
.., a missing or unreadable path, a non-directory, a malformed existing.jeden/config.json, or a user-config write failure is refused before selection changes. - If a previously adopted path is unavailable, implicit task startup fails and names
--cwdas the explicit override instead of silently changing workspace.