Skip to main content

hapax-tui

Tools for Squarp Hapax instrument definition files. Check them before they go on the SD card, repair the obvious mistakes, and edit them through forms instead of a text editor.

Install

Requires Python 3.13+.

uv tool install hapax-tui

This installs the hapax command.

Validate

hapax validate                  # every definition under .
hapax validate Synths/TR-8S.txt
hapax validate --fw 3.10        # check against an older firmware
hapax validate --strict         # warnings fail the exit code too
hapax validate --no-warn        # errors only

Each file gets a line, followed by its findings:

TR-8S.txt           2 warnings
  W line 109: only the first 15 characters are shown: 'AUTO FILL IN MA'
  W line 111: only the first 15 characters are shown: 'EXTERNAL IN LEV'

14 files, 0 errors, 52 warnings — Hapax OS 3.21

Errors (E) are things the Hapax will reject or misread. Warnings (W) load, but probably not the way you meant. Rules follow the firmware you target, from 1.12 through 3.21 (the default). The exit code is 1 when there are errors, 2 when a path can't be read.

Fix

hapax fix --diff                # show what would change
hapax fix                       # rewrite files in place

fix only repairs what has exactly one sensible repair:

  • unclosed or stray section tags
  • a VERSION other than 1
  • non-ASCII characters in names (accents and smart quotes become their plain equivalents)
  • a trailing :value on [AUTOMATION] and [ASSIGN] lines, rewritten as DEFAULT=value
  • a DEFAULT= the firmware ignores, moved to the matching [AUTOMATION] lane

Anything else is left for you, and reported the same way validate would.

Editor

hapax                           # browse definitions in .
hapax Synths/                   # browse a directory
hapax TR-8S.txt                 # edit a file
hapax New-Synth.txt             # create one

Each section is a tab of rows; the + tab adds a section. Findings show inline as you edit, and comments in the file are kept.

Key Action
ctrl+s Save
a / d Add / delete row
k / j Up / down a list, as well as ↑ / ↓
shift+↑ / shift+↓ Move row
ctrl+h / ctrl+l Previous / next tab
ctrl+k / ctrl+j Up / down between the tab bar, the tab, and the findings
w Toggle warnings
esc Back
n New file (browser)
? Show / hide all keys, when not in a field or form
q Quit, when not in a field or form

--fw and --[no-]warn work here too.

Config

~/.config/hapax/config.toml (or $XDG_CONFIG_HOME/hapax/config.toml):

theme = "nord"   # saved when you pick a theme in the editor
warn = false     # default for --warn / --no-warn

Development

uv sync
uv run pytest

License

MIT; see LICENSE.

Metadata

Release files for hapax-tui 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for hapax-tui 0.1.1
File Size Uploaded Provenance
hapax_tui-0.1.1.tar.gz 232.3 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for hapax-tui 0.1.1
File Interpreter ABI Platform
hapax_tui-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 269.5 kB

Release files / hapax_tui-0.1.1.tar.gz

Download URL hapax_tui-0.1.1.tar.gz
Size 232.3 kB
Tags Source
SHA-256 checksum
How to use checksums
edadff8c94e7a9233e66b9d44a418e67605502d5c464e9a1509784b4b1b7bfa4
BLAKE2b-256 checksum
How to use checksums
357f936d790ed178423a670f3898662b0981e0f948e34e906a0327aeec1ccde9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 23, 2026.

Transparency log

Release files / hapax_tui-0.1.1-py3-none-any.whl

Download URL hapax_tui-0.1.1-py3-none-any.whl
Size 37.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
bf803beedf2e1ed8c642046284ef3a21660929f47ba86eae9ec061693f1557c7
BLAKE2b-256 checksum
How to use checksums
0f1ace9d19fbe5ece4328445b57a601d0b6ac45f07e8af51f8af975a2af0fd07
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 23, 2026.

Transparency log

Security for hapax-tui 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for hapax_tui-0.1.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 23, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page