# myai-tools

Standalone OpenCode plugin that provides extracted custom tools:

- `grep`
- `ast_grep_search`
- `ast_grep_replace`
- `lsp_goto_definition`
- `lsp_find_references`
- `lsp_diagnostics`
- `lsp_rename`

This package is intentionally independent from `oh-my-opencode-slim` so it can
be installed and used as a separate OpenCode plugin.

## Install

Add to OpenCode config:

```json
{
  "$schema": "https://opencode.ai/config.json",
  "plugin": ["myai-tools"]
}
```

## Local development

```bash
bun run typecheck
bun run build
bun test
```

## Publish

```bash
bun run prepublishOnly
bun run pack:dry-run
npm publish --access public
```

If this is your first publish from this machine, run `npm login` first.

## Plugin shape

The plugin exports a default `Plugin` function from `src/index.ts` and registers
only tool hooks (`tool`), following:

- https://opencode.ai/docs/plugins/#custom-tools
- https://opencode.ai/docs/custom-tools/
