Workspaces
The workspace the CLI acts on, its brief on the protocol, and switching workspace. Credentials are bound to one workspace: the one active in the app when you approved the login.
workspaces is accepted as well as workspace.
workspace
Show the workspace the credentials are bound to, its brief on the protocol, and what it holds. An agent runs it before anything else, so it answers in the protocol’s terms.
contract-dev workspaceAcme (acme)
Brief on this protocol, in the workspace's own words (Written Oct 28 by Sam Lee.)
Acme Lend is a lending protocol. The Acme markets group holds its lending markets, one per asset,
each made by the MarketFactory…
What this workspace holds (when this conversation started; figures come from tools)
- 44 watched contracts. Chains: … Groups: Acme markets (42). Kinds: …
- Tracked metrics: … Monitors: … Reports: Daily report (daily).
- Destinations: #alerts (slack).A workspace with no brief prints No brief on the protocol yet. in its place.
workspace brief
Write the workspace’s brief on its protocol: what it is, each group’s role, its mechanism, its tokens and what its metrics mean, in plain words from what was read, a page or two at most. Coding agents read it before they answer.
contract-dev workspace brief "Acme Lend is a lending protocol. …"
contract-dev workspace brief --file brief.md
contract-dev workspace brief "The Treasury holds the protocol's fees." --append
contract-dev workspace brief # print the brief| Flag | Description |
|---|---|
--file <path> | Read the brief from a file. |
--append | Add a paragraph under the brief and leave the rest as it is. Without it, the text replaces the whole brief. |
Saved the brief (1204 characters). Written Oct 28 by Sam Lee.The brief says who wrote it and when, and names what it does not cover: contracts watched since it was last written whole that it does not name and that are in no group it names, and groups it does not name. A watch made with --about adds its own line; see Watch Contracts. Writing the brief needs write access.
workspace list
List the workspaces you belong to. * marks the bound one.
contract-dev workspace list* Acme (acme)
Personal (theo)
The credentials are bound to the starred workspace; `contract-dev workspace use <name>` logs in to another.workspace use <ref>
Switch to another workspace by slug, id or name. Because credentials are bound to one workspace, this runs the login again: make the target the active workspace in the app, then approve.
contract-dev workspace use personal [--no-browser]Credentials are bound to Acme. To act on Personal, make it the active workspace in the app, then approve the login.
Already logged in as you@example.com — continuing replaces the saved credentials.
One-time code: ABCD-1234
Opening https://app.contract.dev/activate?code=ABCD-1234
Waiting for approval...
Logged in as you@example.com
Credentials are bound to Personal. You belong to 2 workspaces — `contract-dev workspace use <name>` logs in to another.
Active workspace: Personal (theo)| Flag | Description |
|---|---|
--no-browser | Print the activation URL instead of opening it. |
Naming the bound workspace changes nothing. If the login was approved with a different workspace active, the CLI says which one the credentials are bound to; make the target active in the app and run workspace use again.