> ## Documentation Index
> Fetch the complete documentation index at: https://openworklabs.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> For agents: install the OpenWork desktop app with `brew install --cask openwork` (macOS) or from https://openworklabs.com/download. Do not run `npx openwork`; the npm package named `openwork` is a different project.
> Connect an agent to OpenWork with the MCP Gateway: `claude mcp add --transport http openwork https://api.openworklabs.com/mcp/agent`. Teams sign up at https://app.openworklabs.com?mode=sign-up.
> Step-by-step agent guide: https://openworklabs.com/docs/start-here/use-openwork-from-an-ai-agent.md
> Connect Slack (any organization admin): https://openworklabs.com/docs/slack/connect-slack.md. OpenWork in Slack (@openwork bot) is private alpha for approved organizations. Setup guide: https://openworklabs.com/docs/slack/overview.md. Agent skill: https://openworklabs.com/.well-known/agent-skills/set-up-openwork-slack/SKILL.md.

# Managed OpenCode config

> Publish an OpenCode config file for your organization, assign it to teams or people, and see whose desktop app has applied it.

> [!WARNING]
>
> These commands are in preview and are available to customers on request. They are off until OpenWork turns them on for your organization, and how they work may change. To try them, ask your OpenWork contact.

The `openwork opencode-config` commands give members an OpenCode config file that you write. Run the CLI and sign in as described in the [CLI overview](https://openworklabs.com/docs/cloud/cli.md).

```sh theme={null}
openwork opencode-config publish secops ./opencode.json
openwork opencode-config assign secops --teams "SecOps Pilot"
openwork opencode-config status secops
```

> [!WARNING]
>
> A published file can run code on members' computers. Plugins and local MCP servers in the file run on the computer of every member it is assigned to, and a model provider in the file can send their prompts to the address it names. Review a file the way you would review software you install for your team.

Publishing, assigning, unassigning and removing need the **Manage agent permissions** permission and a recent sign-in. Reading the list and the status needs **View agent permissions**. While the feature is off, every command stops with `feature_disabled` and changes nothing.

***

## The file or Agent permissions

A member is governed by the file or by Agent permissions for the engine's rules, never both.

For a member a file reaches, the file replaces these Agent permissions:

* Commands
* File edits
* Folders outside the workspace
* Web search
* Skills on the computer

The other Agent permissions still apply to everyone, including members with a file: opening websites, uploads to websites, private values, computer use, file sends, sandbox and host execution, and the MCP server permissions. Where one of them and the file speak about the same action, Agent permissions win.

Members without a file keep Agent permissions in full.

***

## publish

Store a file under a name, or replace the one stored there.

```sh theme={null}
openwork opencode-config publish secops ./opencode.json
```

Nobody receives a file until it is assigned. Publishing over a name that is already assigned updates the members who have it the next time their desktop app checks in.

The file is an OpenCode config in the current format, as plain JSON without comments. Example:

```json theme={null}
{
  "permissions": [
    { "action": "shell", "resource": "*", "effect": "ask" },
    { "action": "shell", "resource": "rm -rf *", "effect": "deny" },
    { "action": "edit", "resource": "*", "effect": "allow" }
  ]
}
```

Rules are read in order and the last one that matches decides.

A file is refused, and nothing is stored, when it:

* is larger than 256 KiB;
* uses an older OpenCode key name: `permission`, `provider`, `plugin`, `agent` or `command`;
* defines a provider whose id starts with `openwork` or `ipr_`, or an MCP server whose name starts with `openwork`;
* has `permissions` that are not a list of `action`, `resource` and `effect` rules.

Do not put keys or tokens in the file. Everyone who can view agent permissions can read it.

| Flag | Description |
| - | - |
| `--dry-run` | Reads the file and prints the request without sending it. The file is checked when it is published. |

***

## assign

Give a published file to everyone, to teams or to people.

```sh theme={null}
openwork opencode-config assign secops --everyone
openwork opencode-config assign secops --teams "SecOps Pilot"
openwork opencode-config assign secops --members sam@example.com
```

Everyone, each team and each person has one file at most, so assigning another replaces it. When several reach a person, their own wins, then a team's, then everyone's.

***

## status

See who a file reaches and what their desktop app reported.

```sh theme={null}
openwork opencode-config status
openwork opencode-config status secops
```

| State | Meaning |
| - | - |
| `waiting` | The person's desktop app has not received a file. It may be closed, signed out or not updated. |
| `delivered` | It received the current version and has not confirmed writing it. |
| `applied` | It wrote the current version. |
| `outdated` | It last received an older version. |

Status is kept for each person, not for each computer.

A desktop app that is too old to apply a file keeps Agent permissions in full and shows as `waiting`.

***

## list and show

```sh theme={null}
openwork opencode-config list
openwork opencode-config show secops
```

`list` shows each file's name, version, size and who has it. `show` prints the file.

***

## unassign

Take the file away from everyone, from teams or from people.

```sh theme={null}
openwork opencode-config unassign --teams "SecOps Pilot"
```

People the file no longer reaches go back to Agent permissions in full. The command asks first unless `--force` is passed.

***

## remove

Delete a file that is assigned to nobody.

```sh theme={null}
openwork opencode-config remove secops
```

A file that is still assigned is refused. The command asks first unless `--force` is passed.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.