diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..5575bda --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,18 @@ +name: CI + +on: + push: + branches: + - main + pull_request: + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: oven-sh/setup-bun@v1 + - name: Install dependencies + run: bun install + - name: Build + run: bun run build diff --git a/README.md b/README.md index 336f59e..e56621e 100644 --- a/README.md +++ b/README.md @@ -4,19 +4,32 @@ This plugin implements the core Personal AI Infrastructure (PAI) logic as a nati ## Installation -1. Build the plugin: - ```bash - cd plugins/opencode-pai - bun run build - ``` -2. Install the plugin: - ```bash - opencode plugins install ./plugins/opencode-pai - ``` +Install the plugin using your package manager: + +```bash +bun add github:fpr1m3/opencode-pai-plugin +``` + +Or, clone the repository and build it manually: + +```bash +git clone https://github.com/fpr1m3/opencode-pai-plugin.git +cd opencode-pai-plugin +bun install +bun run build +``` ## Usage -Once installed, the plugin will automatically: +Create a new file in your project at `.opencode/plugin/my-plugin.ts` and add the following code to register the plugin: + +```typescript +import { PaiPlugin } from "opencode-pai-plugin"; + +export default PaiPlugin; +``` + +Once installed and registered, the plugin will automatically: * Load the `CORE/SKILL.md` file as core context at the start of each session. * Log all events and tool calls to the `.opencode/history/raw-outputs` directory. diff --git a/package.json b/package.json index 73ae59a..bf6ae3e 100644 --- a/package.json +++ b/package.json @@ -4,6 +4,10 @@ "description": "PAI hooks compatibility plugin for OpenCode", "main": "dist/index.js", "types": "dist/index.d.ts", + "files": [ + "dist" + ], + "repository": "fpr1m3/opencode-pai-plugin", "scripts": { "build": "tsc", "test": "bun test",