Spooled files into documents, for IBM i. Open output management.
Website, docs and blog: spooldoc.com.
Spooldoc watches the output queues of your IBM i, splits each spooled file into page groups and reads each into JSON with a definition you write in YAML. Lookups add what the page does not print, such as the customer's email address, from Db2 for i. Templates in HTML, Word or Excel make PDF, HTML, DOCX or XLSX files, sent by email, webhook or SFTP, saved to the IFS or kept for download. The JSON keeps reading the page and laying out the document apart, so a template never deals with lines and columns and a new look is a new template. The agent proposes the definition and the template from a sample spooled file; you check the extracted fields next to the page and refine with the agent or by hand. Every run is logged.
Watch the 90-second overview or the five-minute walkthrough on YouTube.
Programs on the IBM i print to output queues as they always have. Spooldoc connects through jt400, lists the queues, and runs a job for every new spooled file: in real time through a data queue on the output queue, or by polling. A run reads the spooled file, parses the *SCS data, extracts the page groups, makes a document of each with every template and delivers the files, then holds, moves, deletes or leaves the spooled file. Everything Spooldoc keeps is in Postgres.
- Servers and queues: add IBM i systems, pick the output queues that matter, hide the rest, and look at a spooled file page by page.
- Jobs as pipelines: source, trigger, extract, lookups, render, destination, finish. Saved as versions, run on demand or by watching the queue.
- Definitions in YAML: fields by label, pattern or position, tables, multi-line records, split keys for page groups printed back to back, and XML-in-spool.
- Lookups: a SELECT against Db2 for i adds what the spooled file does not print, such as the customer's email address, to each document. It runs read only, with the values bound as parameters.
- HTML, Word and Excel templates: Carbone tags with your logos, images and fonts, rendered to PDF, HTML, DOCX or XLSX by a Carbone server of your own or Carbone Cloud. A Word template is made in Word and uploaded, or designed by the agent. An Excel template is made in Excel and uploaded, or designed by the agent, and by default makes one sheet of the whole spooled file, a row per line, to sort, filter and sum. Spooldoc checks every tag against the definition first.
- Agent: Anthropic, Google, OpenAI, OpenRouter, Vercel AI Gateway or a local model writes the first definition and template, reads the extraction report and fixes what is missing. It designs and edits Word and Excel templates too, looking at every page it renders. Use a local model, or turn on masking, to keep values on your network.
- Destinations: a download in Spooldoc, a folder in the IFS, email, a webhook or an SFTP server. Email sends one email per document, to the address printed in it, through your SMTP server or Microsoft 365. A webhook posts each document's data and files as signed JSON to your URL. SFTP uploads each file to a folder on a server, with a key Spooldoc makes and a host key you trust. A test address, URL or folder takes everything first.
- Job log: every run with its steps, errors, files, emails, webhook calls and uploads; retention you set. An email alert when a run fails or watching stops, and one when it is fixed.
- One Compose file: the web app with its Java runtime, Postgres and Carbone, amd64 and arm64.
Every release publishes the image to
ghcr.io/strom-capital/spooldoc for amd64 and arm64, tagged X.Y.Z,
X.Y and latest. Compose pulls it and starts Postgres next to it:
git clone https://github.com/Strom-Capital/spooldoc.git && cd spooldoc
printf 'BETTER_AUTH_SECRET=%s\nSPOOLDOC_SECRET_KEY=%s\n' "$(openssl rand -base64 32)" "$(openssl rand -base64 32)" > .env
docker compose up -dWith a Postgres of your own, run the image alone, with a version from the releases:
docker run -d -p 3000:3000 --env-file .env -e DATABASE_URL=postgres://... ghcr.io/strom-capital/spooldoc:<version>To build the image from source instead, run docker compose up --build -d
in the clone.
Open http://localhost:3000 and create the first account. Add a server, open its queues, start a job from one, and let the agent propose a definition from a sample spooled file. See Getting started for the whole first run, and Deployment for secrets, networking and backups.
To run from source instead, see Contributing.
The guides are also on the website, with search, at spooldoc.com/docs.
| Guide | What it covers |
|---|---|
| Getting started | Install, first account, first job |
| Architecture | What happens in a run, the packages, the data |
| Servers | IBM i systems, credentials, libraries, allowed hosts |
| Queues | Output queues and spooled files |
| Jobs | The job builder, versions, triggers, finish actions |
| Definitions | The YAML that turns pages into JSON |
| Lookups | Values from Db2 for i, such as a customer's email address |
| Templates | HTML, Word and Excel templates, filters, assets, PDF layout |
| Carbone | The Carbone server, Settings, Community and Enterprise |
| Agent | Models, tools, masking |
| Destinations | Where documents go |
| Job log | Runs, statuses, retry, retention |
| Configuration | Environment variables and settings |
| Deployment | Docker, Compose, ports, backups, upgrades |
| Security | What the model sees, what is stored, how |
| FAQ | Short answers to common questions |
| Principles | What every change is checked against |
| Contributing | Development setup, tests, conventions |
Spooldoc is young. The web app, the *SCS parser, text and XML extraction, HTML, PDF, DOCX and XLSX output and the Spooldoc download destination work and are tested against demo spooled files captured from PUB400. Jobs can also write their files to a folder in the IFS, email each document through an SMTP server or Microsoft 365, post it to a webhook, or upload it to an SFTP server. Alerts by email say when a run fails or watching stops, and when it works again. Lookups read values the spooled file does not print, such as a customer's email address, from Db2 for i, read only. Next: lookup tables kept in Spooldoc, the agent writing lookups, S3 destinations, and more users and roles.
Until 1.0, a minor release (0.1 to 0.2) can include breaking changes. Read the release notes before you upgrade.
- Questions about setup and use: Discussions Q&A.
- Ideas to talk through: Discussions Ideas.
- Bugs and feature requests: issues.
- Security problems: report them privately, see SECURITY.md.
The repository is public: replace customer, host, library and user names with invented ones before you paste a spooled file, a log or a screenshot.
MIT. Carbone runs as its own service under its own license;
Spooldoc only calls it. The agent's Carbone syntax reference is the
Carbone Skill by Carbone,
under the Apache License 2.0 (apps/web/lib/server/carbone-skill.LICENSE).