git404hub

what is opencode-dataset-plugin fr?

codingstark-dev/opencode-dataset-plugin — explained in plain English

Analysis updated 2026-05-18

12TypeScriptAudience · researcherComplexity · 3/5Setup · easy

tl;dr

A plugin that records your OpenCode AI agent sessions into a local dataset you can review and export for training language models.

vibe map

mindmap
  root((repo))
    What it does
      Captures agent sessions
      Redacts secrets
      Review in terminal UI
      Export to training formats
    Tech stack
      TypeScript
      Bun
      OpenTUI
    Use cases
      Build a coding dataset
      Fine tune a model
      Save good examples
    Audience
      Developers
      Researchers
      OpenCode users

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

what do people make with this?

VIBE 1

Capture every tool call and edit from an OpenCode session into a JSONL dataset.

VIBE 2

Review captured session records in a terminal UI and accept or reject each one.

VIBE 3

Export accepted records into OpenAI, Alpaca, ShareGPT, or DPO training formats.

VIBE 4

Save a specific completed task as a labeled training example on demand.

what's the stack?

TypeScriptBunOpenTUIOpenCode

how it stacks up fr

codingstark-dev/opencode-dataset-pluginalamops/agetoraza-ali/blendpixel.com
Stars121212
LanguageTypeScriptTypeScriptTypeScript
Setup difficultyeasyhardeasy
Complexity3/54/52/5
Audienceresearcherdeveloperdeveloper

Figures from each repo's GitHub metadata at analysis time.

how do i run it?

Difficulty · easy time til it works · 5min

Requires OpenCode and Bun installed to run the plugin and its CLI commands.

in plain english

opencode-dataset is a plugin for OpenCode, an AI coding agent, that captures your agent sessions and turns them into a local training dataset. Every tool call, file edit, message, and permission request that happens during a session gets written to a plain text file in a line by line JSON format called JSONL, which is easy to read, diff, and load into common machine learning tools like the Hugging Face Datasets library. Before anything is saved, the plugin redacts common secrets such as API keys, bearer tokens, GitHub tokens, AWS access keys, JWTs, private keys, and fields named password, token, secret, or authorization. This means the captured dataset should not contain your credentials even if they appeared in a session. Once records are captured, you can review them using a terminal interface built with OpenTUI. It shows pending examples first so you can accept or reject them with single key presses, and switches to showing everything once nothing is left pending. There is also a one shot review mode meant for automated checks in continuous integration pipelines. Accepted records can then be exported into several formats that are commonly used to train or fine tune language models: a simple OpenAI style chat format, the Alpaca instruction format, ShareGPT conversation format, and a preference based DPO format with chosen and rejected examples. The plugin also adds a tool inside OpenCode itself called save_training_example, so you can ask the agent to save a completed task as a labeled training example directly, and that record is marked accepted right away. Installation is a single command through OpenCode's plugin system, followed by a small JSON configuration entry pointing to where the dataset file should live. The project is written in TypeScript and uses Bun for local development, testing, and building.

prompts (copy fr)

prompt 1
Install opencode-dataset in my OpenCode config and set the dataset path.
prompt 2
Save this as a training example with tags for typescript and bugfix.
prompt 3
Run the dataset review tool in pending mode and walk me through accepting records.
prompt 4
Export my accepted opencode-dataset records to the OpenAI chat format.

Frequently asked questions

what is opencode-dataset-plugin fr?

A plugin that records your OpenCode AI agent sessions into a local dataset you can review and export for training language models.

What language is opencode-dataset-plugin written in?

Mainly TypeScript. The stack also includes TypeScript, Bun, OpenTUI.

How hard is opencode-dataset-plugin to set up?

Setup difficulty is rated easy, with roughly 5min to a first successful run.

Who is opencode-dataset-plugin for?

Mainly researcher.

peek the repo → explain another one

This repo across BitVibe Labs

double-check against the repo, no cap.