@jolter/jdt provides the jdt CLI for building, validating,
running, and packaging Jolter plugins.
npm install -D @jolter/jdt
npx jdt init
npx jdt build
npx jdt run list-tools
npx jdt run resolve-tool example latest
npx jdt pack --version 1.0.0jdt pack writes:
dist/plugin.wasmdist/plugin.release.jsondist/checksums.txt
jdt init
jdt build
jdt build --wasm ./prebuilt.wasm
jdt manifest --version 1.2.3
jdt validate
jdt pack --version 1.2.3
jdt run list-tools
jdt run resolve-tool <tool> <selector> --os linux --arch x64
jdt run validate-installed <tool> <version> <root>jdt build uses Bytecode Alliance jco componentize with
@bytecodealliance/componentize-js. Componentization currently requires
Node.js even when the rest of the toolkit is run with Bun. It fails if
compilation fails. Use --wasm only when
intentionally packaging a prebuilt artifact.
jdt run executes the local TypeScript/JavaScript plugin API and validates the
returned shape. It is a developer runner, not Jolter's production sandbox.
Plugins export these functions from src/plugin.ts or src/plugin.js:
import type { Platform, Tool, ToolRelease } from "jolter-development-toolkit/types/plugin-api";
export function listTools(): Tool[] {
return [{ name: "example", commands: ["example"] }];
}
export function resolveTool(tool: string, selector: string, platform: Platform): ToolRelease {
return {
version: "1.0.0",
url: `https://example.com/${tool}-${platform.os}-${platform.arch}.tar.gz`,
sha256: "0".repeat(64),
archiveFormat: "tar.gz",
stripComponents: 1,
commands: [tool],
};
}
export function validateInstalled(tool: string, version: string, root: string): boolean {
return true;
}Tool releases may return stable versions such as 1.0.0 or prerelease
versions such as 1.0.0-rc.1. Plugin release manifests produced by
jdt manifest still use stable semver versions.
jolter-plugin-jolterThe official Jolter Plugin for the Jolter runtime & tools manager.
bun install
bun test
bun run format:checkSee CONTRIBUTING.md for contribution guidelines and local development notes.
Publishing is handled by GitHub Actions and npm Trusted Publishing. To publish:
- Update
package.jsonandCHANGELOG.md. - Open and merge a pull request.
- Create a GitHub release whose tag matches the package version, for example
v1.0.0.
When the release is published, .github/workflows/npm-publish.yml verifies the
package and publishes it to npm with provenance using OIDC.