A key makes the job safe to send twice. If a job with the same key already succeeded, the second send returns the first result instead of running again.
Keys expire after 24 hours. Use your own order or payment ID as the key, not a random value made at send time.
Dead-letter queue
A job that fails every retry moves to the queue's dead-letter list with its body, headers and each attempt. Requeue one job or all of them from the CLI.
Terminal
ferrule dlq list orders
ferrule dlq requeue orders --all
Reference
SDK
Every SDK passes your handler a request and a context. The context is the same in TypeScript, Python and Go.
The context
Member
What it is
ctx.log(msg, fields?)
Writes a log line into the current span.
ctx.db
Database client. Each query becomes a child span.
ctx.queue.send(name, body, opts?)
Sends a job. Options: idempotencyKey, retries, backoff, delay.
ctx.env
Secrets for the current branch.
ctx.trace.id
The ID of the current trace, for your own logs or support tickets.
Install
Terminal
npm i @ferrule/sdk # TypeScript
pip install ferrule # Python
go get github.com/example/ferrule-go
Reference
CLI
The CLI covers the whole loop: create, run, deploy, read traces and replay requests.
Commands
Command
What it does
ferrule init
Creates a project with one example function.
ferrule dev
Runs functions locally with traces.
ferrule deploy [dir]
Deploys a folder. Without git, makes a preview.
ferrule trace --last
Prints the trace of the latest request.
ferrule replay <trace>
Sends a past request to a preview and compares both responses.
ferrule dlq list <queue>
Lists dead-lettered jobs.
Global flags
Flag
Default
Meaning
--project
current folder
Which project to act on.
--branch
current git branch
Which preview or secrets to use.
--json
off
Machine-readable output.
Project
Changelog
What changed, newest first. Example entries for the template.
October 2026
Replays from the CLI.ferrule replay sends a past request to any preview and prints both responses side by side.
September 2026
Query plans in traces. Slow database spans carry their plan, folded until you open it.
Go SDK, first stable release. Same context as the TypeScript and Python SDKs.
August 2026
Readable dead-letter queues. Failed jobs keep their body, headers and every attempt.
Per-branch secrets. Previews read their own secrets, so a test key never reaches production.
Ferrule is a fictional product made for an Inazda UI template.