# CLI plugins
Plugins configured in `opencode.json(c)` that expose a TUI component are loaded automatically by the CLI. To learn how
to build plugins, see [Building plugins](/build/plugins). You do not need to add the same package to `cli.json`. The CLI
gets the active plugin list from the connected OpenCode server, so this also works when the server is remote.
Use `cli.json` for CLI-only plugins. These plugins run locally in the terminal and remain active when the CLI connects
to a remote server:
```json title="cli.json"
{
"plugins": [
"opencode.example",
"[email protected]",
"@example/opencode-tui",
"@example/[email protected]",
"./plugins/status",
"../plugins/status",
"/home/user/plugins/status",
"file:///home/user/plugins/status"
]
}
```
Entries are processed in order. Prefix an ID or wildcard with `-` to disable matching plugins:
```json title="cli.json"
{
"plugins": ["*", "-opencode.notifications", "-team.*"]
}
```
Pass plugin options with the object form:
```json title="cli.json"
{
"plugins": [
{
"package": "@example/opencode-tui",
"options": {
"compact": true
}
}
]
}
```
OpenCode also discovers plugins under the global config directory and project `.opencode` directories. Each plugin uses
the same layout as a published package, with server and TUI entrypoints kept together.
```text title="Plugin discovery paths"