GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - codingstark-dev/opencode-dataset-plugin: Capture OpenCode agent sessions into a local JSONL dataset, review examples in an OpenTUI terminal UI, and export to the formats LLM researchers actually use.

BranchesTags
Open more actions menu

Latest commit

 

History

4 Commits
4 Commits

Folders and files

NameName
Last commit message
Last commit date
dist
dist
 
 
src
src
 
 
test
test
 
 
.gitignore
.gitignore
 
 
AGENTS.md
AGENTS.md
 
 
CLAUDE.md
CLAUDE.md
 
 
README.md
README.md
 
 
bun.lock
bun.lock
 
 
index.ts
index.ts
 
 
package.json
package.json
 
 
tsconfig.json
tsconfig.json
 
 

Repository files navigation

opencode-dataset

Capture OpenCode agent sessions into a local JSONL dataset, review examples in an OpenTUI terminal UI, and export to the formats LLM researchers actually use.

Fast path

Install once:

opencode plugin opencode-dataset

Add the plugin to opencode.json:

{
  "$schema": "https://opencode.ai/config.json",
  "plugin": [
    [
      "opencode-dataset",
      {
        "datasetPath": ".opencode/datasets/opencode-dataset.jsonl"
      }
    ]
  ]
}

The older opencode-dataset-plugin package name also works, but opencode-dataset is the shorter recommended name.

OpenCode installs npm plugins with Bun at startup. Captured records are written as newline-delimited JSON so they are easy to diff, stream, and load with Hugging Face Datasets:

from datasets import load_dataset

dataset = load_dataset("json", data_files=".opencode/datasets/opencode-dataset.jsonl")

What It Captures

  • Tool calls with redacted args/output
  • Session diffs and edited file paths
  • Message and message-part events
  • Permission ask/reply records
  • Explicit high-quality examples through the save_training_example tool

Secrets are redacted before storage for common API keys, bearer tokens, GitHub tokens, AWS access keys, JWTs, private keys, and sensitive object keys like password, token, secret, and authorization.

Review

Run the OpenTUI review surface:

bunx opencode-dataset review --path .opencode/datasets/opencode-dataset.jsonl

When there are pending records, the TUI starts in pending review mode. When everything is already accepted or rejected, it opens in all-records mode so you can still inspect the dataset.

Keys:

  • j / k: move
  • a: accept
  • r: reject
  • t: toggle pending/all records
  • q: quit

For CI or quick checks:

bunx opencode-dataset review --once --path .opencode/datasets/opencode-dataset.jsonl

Export

Accepted records export by default. Add --include-pending when you want a quick raw dump before review.

bunx opencode-dataset export --format openai --path .opencode/datasets/opencode-dataset.jsonl > train.openai.jsonl
bunx opencode-dataset export --format alpaca --path .opencode/datasets/opencode-dataset.jsonl > train.alpaca.jsonl
bunx opencode-dataset export --format sharegpt --path .opencode/datasets/opencode-dataset.jsonl > train.sharegpt.jsonl
bunx opencode-dataset export --format dpo --path .opencode/datasets/opencode-dataset.jsonl > train.dpo.jsonl

Formats:

  • canonical: raw plugin records
  • openai: { "messages": [{ "role": "user" }, { "role": "assistant" }] }
  • alpaca: { "instruction", "input", "output" }
  • sharegpt: { "conversations": [{ "from": "human" }, { "from": "gpt" }] }
  • dpo: { "prompt", "chosen", "rejected" }

Agent Tool

The plugin registers save_training_example. Ask OpenCode to call it after a good completed task:

Save this as a training example with tags ["typescript", "bugfix"].

The saved record is marked accepted immediately, so it exports without needing review.

Local Development

bun install
bun run build
bun run typecheck
bun test
bun run demo
bun run review -- --once
bun run export:openai

bun run demo appends a sample accepted record to .opencode/datasets/opencode-dataset.jsonl.

About

Capture OpenCode agent sessions into a local JSONL dataset, review examples in an OpenTUI terminal UI, and export to the formats LLM researchers actually use.

Topics

datasetdataset-generationopencodeopencode-pluginopencode-skills

Resources

Readme
Activity

Stars

13 stars

Watchers

0 watching

Forks

1 fork
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.