npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@diy-accounting-uk/diya-gl

v1.2.36

Published

Recalculate, read and write DIYA-GL books from the command line

Downloads

8,305

Readme

@diy-accounting-uk/diya-gl

Run a UK sole trader's or company's accounts from the command line. A DIYA-GL™ book is a book.toml and a lines.jsonl file, usually a few kilobytes, that hold a year of transactions and the chart of accounts they post to. This package recalculates one, reads one out of an Excel workbook, writes one back into a workbook, and serves one over MCP, all through the same engine the DIY Accounting Spreadsheets™ site reconciles in CI.

Four products: Basic Sole Trader, Taxi Driver, Self Employed, Limited Company.

Install

npm install -g @diy-accounting-uk/diya-gl

With Homebrew:

brew tap diy-accounting-uk/diya-gl
brew install diy-accounting-uk/diya-gl/diya-gl

Or run the image straight from GHCR, no install:

docker run --rm -v "$PWD":/data ghcr.io/diy-accounting-uk/diya-gl:latest \
  recalc --package bst --data /data/my-book --years se-2025-2026 --output-dir /data/out

Use

diya-gl recalc --package bst --data my-book --years se-2025-2026 --output-dir out
diya-gl read-workbook --file my-workbook.xlsx --output-dir out
diya-gl write-workbook --data my-book --output-dir out
diya-gl mcp

Each subcommand is also its own command, if you only want one on your PATH: diya-gl-recalc, diya-gl-read-workbook, diya-gl-write-workbook, diya-gl-mcp.

  • recalc takes a diya-gl book (--data) or a populated workbook (--source-dir, --mode saved|recalculate) and writes report.json: every figure, report section and compliance check the engine computes.
  • read-workbook takes an .xlsx, a package zip, or a diya-gl zip or JSON file (--file), and writes book.toml, lines.jsonl, report.json and bookchecks.json.
  • write-workbook takes a diya-gl book (--data or --file) and writes the Excel package its product composes onto its template — the same client-side path the DIYA-GL pages use, so it never needs LibreOffice. Add --zip for the package as one zip.
  • mcp runs a stdio MCP server with four tools: extract_book, report, edit_lines, save_workbook. Point an MCP client at diya-gl-mcp (or diya-gl mcp) with no arguments.

The format

A diya-gl book's fields are drawn from the XBRL Global Ledger Taxonomy Framework 2015 and map onto HMRC's SA103S boxes. The two schemas that validate a book are published at /schema/diya-gl-book-v2.schema.json and /schema/diya-gl-lines-v2.schema.json. The full field mapping, the check catalogue and the reconciliation evidence behind them are on the format spec page.

Provenance

Every book this package writes carries five stamps: the format version, this package's own version and commit, a hash over the tax-year data applied, and each product's template hash and reconciliation scorecard. Recalculating an old book either reproduces its report.json byte for byte or names the stamp that differs. Every published release is cut from a commit whose reconciliation checks passed; the scorecards are on the reconciled releases page.

Licence

This package is licensed under the Apache License 2.0. Embed it, ship it, change it. See LICENSE and NOTICE.

The diya-gl format itself is an open specification. The two JSON Schemas are Apache-2.0 and the format text is CC BY 4.0, so you can implement the format in anything with attribution.

The workbook templates are not part of this package. write-workbook and the MCP save_workbook tool fetch the template they need from spreadsheets.diyaccounting.co.uk the first time they run, print the terms, and cache it for later runs. The templates are the company's own work, under the PolyForm Internal Use License 1.0.0 with an additional grant: use them for your own accounts, or for your clients' accounts if you are an accountant or a bookkeeper, and do not redistribute them.

This repository does not accept contributions.

Copyright (C) 2006-2026 DIY Accounting Limited.