You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Bruno's CLI runs the same .bru files the GUI edits — bruno run collections/payments/Login.bru works straight out of a checked-out repo. Bowire's CLI today reads from ~/.bowire/ hard-wired through BowireUserContext. For a git-backed workspace (#147) to actually be useful in CI / scripts / on-call, the CLI needs to read from the workspace's configured storageRoot — same root the workbench writes to.
Proposal
Three new CLI commands + a storageRoot-aware read path.
bowire workspace init <path>
Sets up a git-backed workspace at the given directory.
Creates the directory tree expected by the per-file format (#TBD-perFileFormat).
Drops a workspace.json manifest seeded with name + colour + schema version.
Writes a default .gitignore (bodies/, secrets/, *.legacy, .bowire-cache/).
Runs git init unless --no-git is passed.
Reports next steps so the operator knows what to commit.
bowire workspace export [--from <wsId>] <path>
Copies an existing workspace's state from ~/.bowire/workspaces/<wsId>/ into the target path (= same shape as init). Used to move a personal scratchpad into a shared git repo.
Defaults --from to the currently active workspace.
Refuses to overwrite a non-empty path unless --force.
Doesn't modify the source workspace; the operator can later switch the workspace's storageRoot to the new path.
bowire workspace import <path>
Registers an existing git-backed workspace in the workbench's workspace list (without copying anything — storageRoot points at the directory in place).
Reads <path>/workspace.json for the name + colour.
Adds the entry to bowire_workspaces + sets storageRoot.
Refuses if the manifest is missing or workspaceFormatVersion is unsupported.
bowire workspace migrate-format
Walks an existing workspace storage root, splits the legacy bundles (single-file environments, collections) into per-file shape. Idempotent; bumps the manifest's workspaceFormatVersion.
Read-path: every CLI command honours storageRoot
Today:
~/.bowire/workspaces/<wsId>/recordings/...
After this issue:
<storageRoot OR default>/<entity>/...
Resolution order in BowireUserContext.GetUserPath(suffix, workspaceId?):
Explicit --workspace-root <path> CLI flag wins.
Active workspace's storageRoot from bowire_workspaces.
Why
Bruno's CLI runs the same
.brufiles the GUI edits —bruno run collections/payments/Login.bruworks straight out of a checked-out repo. Bowire's CLI today reads from~/.bowire/hard-wired throughBowireUserContext. For a git-backed workspace (#147) to actually be useful in CI / scripts / on-call, the CLI needs to read from the workspace's configuredstorageRoot— same root the workbench writes to.Proposal
Three new CLI commands + a storageRoot-aware read path.
bowire workspace init <path>Sets up a git-backed workspace at the given directory.
workspace.jsonmanifest seeded with name + colour + schema version..gitignore(bodies/, secrets/, *.legacy,.bowire-cache/).git initunless--no-gitis passed.bowire workspace export [--from <wsId>] <path>Copies an existing workspace's state from
~/.bowire/workspaces/<wsId>/into the target path (= same shape asinit). Used to move a personal scratchpad into a shared git repo.--fromto the currently active workspace.--force.storageRootto the new path.bowire workspace import <path>Registers an existing git-backed workspace in the workbench's workspace list (without copying anything —
storageRootpoints at the directory in place).<path>/workspace.jsonfor the name + colour.bowire_workspaces+ setsstorageRoot.workspaceFormatVersionis unsupported.bowire workspace migrate-formatWalks an existing workspace storage root, splits the legacy bundles (single-file
environments,collections) into per-file shape. Idempotent; bumps the manifest'sworkspaceFormatVersion.Read-path: every CLI command honours
storageRootToday:
After this issue:
Resolution order in
BowireUserContext.GetUserPath(suffix, workspaceId?):--workspace-root <path>CLI flag wins.storageRootfrombowire_workspaces.~/.bowire/workspaces/<wsId>/.All consumers (
bowire run,bowire mock,bowire export,bowire scan, …) pick up step (1) or (2) without per-command plumbing.Acceptance
bowire workspace init <path>creates the tree + manifest +.gitignore+git init.bowire workspace export [--from wsId] <path>copies state with the per-file format.bowire workspace import <path>registers an existing workspace.bowire workspace migrate-formatupgrades legacy bundles to per-file.BowireUserContextwith the new precedence chain.--workspace-rootflag overrides for one-off CI runs that don't want to register a workspace.Composes with
storageRootprecedence sits before per-identity.Out of scope
bowire workspace push / pull— wraps git in the CLI. Operators run git themselves for v1.