Installation
Actioneer is published to npm as @gesslar/actioneer. It ships as pure ES
modules with TypeScript declarations and has no build step.
Node.js
Section titled “Node.js”Install from npm:
npm install @gesslar/actioneerThen import the auto-detected build (recommended):
import {ActionBuilder, ActionRunner} from "@gesslar/actioneer"Explicit variants
Section titled “Explicit variants”The package exposes node and browser entrypoints if you want to pin one
explicitly:
// Node.js build — includes file-based hook loading via withHooksFile()import {ActionBuilder, ActionRunner, ActionHooks} from "@gesslar/actioneer/node"
// Browser build — fully functional in Node.js, but no file-based hooksimport {ActionBuilder, ActionRunner} from "@gesslar/actioneer/browser"Browser
Section titled “Browser”No install required — import directly from a CDN.
jsDelivr (runtime only)
Section titled “jsDelivr (runtime only)”<script type="module"> import {ActionBuilder, ActionRunner} from "https://cdn.jsdelivr.net/npm/@gesslar/actioneer/+esm"</script>esm.sh (runtime with types)
Section titled “esm.sh (runtime with types)”import {ActionBuilder, ActionRunner} from "https://esm.sh/@gesslar/actioneer"esm.sh can also serve the .d.ts for editor support:
https://esm.sh/@gesslar/actioneer?dtsFull browser example
Section titled “Full browser example”<script type="module"> import {ActionBuilder, ActionRunner} from "https://esm.sh/@gesslar/actioneer"
class MyAction { setup(builder) { builder .do("step1", ctx => { ctx.result = ctx.input * 2; return ctx }) .do("step2", ctx => { return ctx.result }) } }
const builder = new ActionBuilder(new MyAction()) const runner = new ActionRunner(builder) const result = await runner.run({input: 5}) console.log(result) // 10</script>TypeScript
Section titled “TypeScript”The package ships declaration files under src/types and exposes them through
the package types entrypoint, so editors get completions and quick help out of
the box:
import {ActionBuilder, ActionRunner} from "@gesslar/actioneer"No tsconfig setup is required to consume the types.
Next step
Section titled “Next step”With Actioneer installed, build your first pipeline in the Quick Start.