---
title: Package and load a Vector Configuration
description: Build an ESM Configuration Package, expose its OpenCode Plugin Entrypoint, publish it through your existing workflow, and connect it to a project.
sidebar:
  label: Package
---

A Configuration Package is an ordinary ESM package. Vector supplies the configuration API, while your package toolchain owns compilation, publication, installation, and version selection.

## Keep the package boundary small

Use this structure for the project-summary example:

<FileTree>

- packages/team-opencode/
  - src/
    - extensions/
      - project-summary.ts
    - opencode.ts
  - dist/
    - extensions/
      - project-summary.js
    - opencode.js
  - package.json

</FileTree>

The entrypoint composes and default-exports the Vector Configuration.

```ts title="src/opencode.ts"
import { defineVector } from '@evilkiwi/vector';

import { projectSummary } from './extensions/project-summary.js';

export default defineVector({
  id: 'team-opencode',
  build: () => ({ commands: [projectSummary] }),
});
```

Expose the built ESM module through an ordinary package export.

```json title="package.json"
{
  "name": "@acme/team-opencode",
  "type": "module",
  "dependencies": {
    "@evilkiwi/vector": "^0.0.0"
  },
  "exports": {
    "./opencode": "./dist/opencode.js"
  }
}
```

Build and publish the package through the private registry, npm channel, or workspace your team already uses.

## Connect a project to the package

Add a project-local entrypoint that re-exports the package's default value.

```ts title=".opencode/team-configuration.ts"
export { default } from '@acme/team-opencode/opencode';
```

Point OpenCode at that local module with an absolute file URL.

```json title="opencode.json"
{
  "plugins": ["file:///absolute/path/to/project/.opencode/team-configuration.ts"]
}
```

Reload OpenCode and invoke `/project-summary` to check the installed package. If the module fails to load or the command is missing, use [Troubleshoot](/activate/troubleshoot).

Read [Lifecycle](/activate/lifecycle) to follow the loaded entrypoint through registration.
