Your first plugin
English | 中文
Summary
This page takes you from an empty folder to a plugin you can see in the studio, then removes it again. The plugin is a small tool that greets someone by name. You need a set-up Delorun, Node.js 24.9 or newer and pnpm; the first section says how to check them. Nothing here needs a model key. When you have finished, you will have made one plugin, changed it while Delorun ran, and uninstalled it. Write a plugin for Delorun is the full reference, and Where to customise what helps you decide whether a plugin is the right tool for your change.
Contents
- What you need
- Make the plugin
- Load it
- See it in the studio
- Change it while it runs
- Remove it
- Go further
What you need
- A set-up Delorun:
delorun setuphas finished (Install and first run). - Node.js 24.9 or newer. Check it with
node --version. - pnpm, which you install yourself. The pnpm that Delorun carries is private to
delorun pluginand is not on your command path. Install pnpm withnpm install -g pnpm, or as pnpm.io describes, and check it withpnpm --version.
A plugin runs inside Delorun with your access, outside the sandbox that confines the agent's commands, so install only plugins whose code you trust. This one is yours, and you can read all of it.
Make the plugin
In a folder where you keep projects, run:
delorun plugin new hello-plugin
cd hello-plugin
pnpm install
pnpm run builddelorun plugin new writes a folder named hello-plugin and prints the files it made: package.json, cordis.patch.yml, locale/en.json, src/index.ts, tsdown.config.ts, tsconfig.json, .gitignore and README.md. src/index.ts is the whole plugin: it registers one tool, hello_plugin, that returns Hello, <name>!. pnpm install fetches the build tools and pnpm run build writes lib/index.js, the file Delorun loads.
Check that your Delorun accepts the plugin:
delorun plugin check .It prints which Delorun and DeepSeek Harness versions the plugin's package.json admits and ends with The installer admits it on this release.
Load it
delorun start
delorun plugin dev .delorun start starts Delorun in the background. delorun plugin dev . links the folder into your profile and keeps running, so leave that terminal open and use another for the next steps. It rebuilds and reloads the plugin each time you save a file.
In the second terminal, ask what Delorun did:
delorun changes listUnder Recent changes it lists Loaded without review: hello-plugin from and the folder. Delorun records every change to what it runs. Changes protection is off by default, so a plugin you link loads without waiting for you; Changing your harness explains what protection on does instead.
See it in the studio
Open the studio with delorun open. If it was open already, reload the page. In the sidebar, choose Plugins. Under Installed plugins you now see Hello plugin, with the line Gives the agent the hello_plugin tool, which greets someone by name. Choose it to see its page: its version, v0.1.0, its README, and an Uninstall button.
The title and the line come from locale/en.json in your folder. The plugin gives the agent the hello_plugin tool; to use it in a chat you need a model key (Model providers).
Change it while it runs
With delorun plugin dev . still running, open src/index.ts and change the tool's description from Greet someone by name. to Greet someone warmly by name. Save the file. Delorun builds the plugin and loads the new code without a restart, and delorun changes list shows a second line, Loaded without review: hello-plugin: changes in and the folder.
If you turn changes protection on, an edit waits for your review instead and loads only when you apply it. To load your own edits live with protection on, run delorun changes work hello-plugin first, and delorun changes done hello-plugin when you have finished (Changing your harness).
Remove it
- In the terminal that runs
delorun plugin dev ., press Ctrl+C. The plugin stays installed. - In the studio, choose Plugins in the sidebar, then Hello plugin, then Uninstall. The studio says
What it provides goes away once it is uninstalled.Choose Uninstall again to confirm. Hello plugin is gone from Installed plugins, anddelorun doctorno longer lists it.
delorun changes undo <id> takes one recorded change back, but it stops what that change loaded without uninstalling the plugin: Hello plugin stays on the Plugins page as not running until you uninstall it, and the undo prints the command that does: delorun plugin remove hello-plugin. Your hello-plugin folder is never deleted; remove it yourself when you no longer want it.
Go further
- Write a plugin for Delorun: the other kinds of plugin (an agent preset, a page in the studio, a bundle of settings), installing from a folder, git or npm, version ranges, logs, a debugger and safe mode.
- Changing your harness: review, apply, discard and undo what your plugins and your agent change.
- DeepSeek Harness's tutorial on writing a tool.
Write a plugin for Delorun
Writing a Delorun plugin from nothing to running: delorun plugin new, the dev loop with delorun plugin dev, checking version ranges, installing from a folder, git or npm, build approvals, logs, the debugger, safe mode, and why a fork of a shipped package needs its own name.
Changing your harness
Changing what Delorun runs: why a plugin you link from a folder runs a copy kept in your Delorun home, what loads without review while protection is off, the default, how delorun changes lists, shows, applies, discards and undoes changes, the second confirmation, working on a plugin with live reload, changing Delorun itself, turning one plugin off, what happens when a change stops Delorun from starting, the protection setting, and the studio's Changes section.