Usage
facet system to talk to external tools, most often AI coding harnesses (OpenCode, Claude Code, Codex, etc.). Adapters define where assets and configuration live on disk.
The install flow downloads the source, bundles it into a self-contained adapter.js, verifies it exports a valid adapter, and places it in ~/.facets/adapters/<name>/.
Specifier formats:
| Format | Example | Description |
|---|---|---|
| Built-in name | opencode | Resolves to the first-party npm package |
| npm package | @acme/adapter-custom | Downloads from the npm registry |
| Git URL | git+https://github.com/user/repo.git | Clones the repository |
| Git URL with ref | git+https://github.com/user/repo.git#v1.0.0 | Clones at a specific tag/branch |
| Local path | ./path/to/adapter | Uses a local directory |
opencode— OpenCode adapter (@agent-facets/adapter-opencode)claude-code— Claude Code adapter (@agent-facets/adapter-claude-code)codex— Codex adapter (@agent-facets/adapter-codex)
facet adapter remove
~/.facets/adapters/.
Environment variables
FACETS_ADAPTERS_DIR
Overrides the base directory used for installed adapters. When set, install, list, remove, and build all read from and write to this directory instead of the default ~/.facets/adapters/.
--target-dir flag is not supported because it would require persistent configuration so that later invocations (such as facet build) could locate adapters placed in non-default locations.