Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 24 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,9 @@ ucode setup # agents and models (start here)
ucode setup mcps # managed MCP servers
ucode setup skills # managed skills
ucode setup spend-tiers # spend-based routing
ucode apply # publish it to the workspace
ucode claude --local # optionally test the local draft
ucode codex --local # edit and test as often as needed
ucode apply # publish the latest draft to the workspace
```

`ucode setup` walks through the agents to enable and which one bare `ucode` launches, then per agent:
Expand All @@ -238,10 +240,10 @@ that switches the default agent and model as the workspace burns through a budge
command also offers to publish right away, so you can apply changes incrementally; answering the
section prompts also runs the matching `ucode configure` step, which does configure this machine.

Everything is written to `~/.ucode/managed-state.json` — the one local managed-config file — which
`ucode apply` publishes. Re-running `ucode setup` keeps the MCP servers, skills, tracing table, and
tiered spend policy already authored, rather than clearing them; to drop one, edit the file and reload
it with `ucode setup --from-file`.
Everything is written to `~/.ucode/managed-state.json` — the editable local draft — which
`ucode apply` publishes. Re-running `ucode setup` keeps the MCP servers, skills, tracing
table, and tiered spend policy already authored, rather than clearing them; to drop one, edit the
file and reload it with `ucode setup --from-file`.

```bash
# Review the manifest and the exact payload `ucode apply` would publish.
Expand All @@ -251,6 +253,18 @@ ucode setup show
ucode setup --from-file ./managed-config.json
```

To test before publishing, add `--local` to a launch. The override lasts for that invocation only:

```bash
ucode --local # test the draft's configured default agent
ucode claude --local # or test a specific enabled agent
```

Without `--local`, launches always use the workspace-published config when one exists. The local
draft is never turned into a persistent mode and ordinary launches never overwrite it, so an admin
can edit and test it repeatedly. Spend-tier recommendations begin after publication because they
are resolved server-side.

Once the manifest looks right, publish it:

```bash
Expand Down Expand Up @@ -304,7 +318,9 @@ their next ucode run.
| `ucode setup help` | Walk through the whole setup sequence, marking what's already configured |
| `ucode setup show` | Print the authored config and the payload `ucode apply` would publish |
| `ucode setup --from-file <file>` | Load a hand-written managed config instead of running the prompts |
| `ucode apply` | Publish the authored managed config to the workspace, after a diff and confirmation (admins only) |
| `ucode --local` | Launch the draft's default agent for an optional local test |
| `ucode <agent> --local` | Launch a specific agent using the local draft for this invocation only |
| `ucode apply` | Publish the latest local draft to the workspace, whether or not it was tested |
| `ucode apply --yes` | Publish without the confirmation prompt |

## Managed Local Files
Expand All @@ -320,7 +336,8 @@ their next ucode run.
| `~/.copilot/.env` | GitHub Copilot CLI |
| `~/.pi/agent/models.json` | Pi |
| `~/.cursor/mcp.json` | Cursor Agent (MCP servers only) |
| `~/.ucode/managed-state.json` | The managed config — authored by `ucode setup` (admins) and refreshed from the workspace on launch |
| `~/.ucode/managed-state.json` | The editable managed-config draft authored by `ucode setup` |
| `~/.ucode/managed-cache/<workspace-hash>.json` | Per-workspace published-config cache with fetch metadata |

Existing files are backed up before being overwritten. `ucode revert` restores backups.

Expand Down
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ dependencies = [
# transitively by mcp itself); `ucode.mcp_proxy` selects whichever the
# installed SDK uses at runtime, so no direct httpx2 dependency is declared.
"httpx>=0.27.1",
# Polished searchable/selectable prompts for the managed-config setup wizard. Questionary remains
# in use for the specialized MCP pickers, whose custom viewport and toolbar depend on its API.
"InquirerPy>=0.3.4",
# `ucode mcp-proxy` bridges a client's stdio MCP transport to a Databricks
# streamable-HTTP MCP endpoint, injecting a freshly-minted OAuth bearer per
# request, via the SDK's stdio server + streamable-HTTP client. Works against
Expand Down
Loading