v0.2.0-beta01
Pre-releaseFirst beta of the interactive authoring TUI — a new in-terminal editor for creating and editing contracts, now the default for apic create and apic open. The external-editor workflow is unchanged and still available via --editor.
⚠️ Beta — please try it out and report any issues.
Interactive authoring TUI
apic create <file> and apic open <file> open an editor that renders the contract exactly like apic read — same header, VARIABLE/QUERY/HEADERS/REQUEST/RESPONSE sections, nested ├─/└─ fields, and inline JSON examples — and lets you edit it in place.
Navigation
↑/↓(orj/k) select a row ·Entersteps into its cells ·←/→(orh/l) move between cells ·Escsteps back.
Editing
Enter/iedit a text cell;Entercycles the HTTP method, toggles arequiredflag, or toggles a bodytypebetweenobjectandobject[].Enteron theMETHOD urlline edits protocol / host / path;Enteron aREQUEST/RESPONSEtitle edits its code / description / type;Esccollapses.
Structure
aadds a row to the current section — a nested field when you're on anobjectfield, or a new response on the+ add responseline.ddeletes the selected row, with a confirmation popup.
Examples
Enteron an example opens a multiline JSON editor.ggenerates a sample example from the schema (a one-element array forobject[]bodies).
Saving
Ctrl-Svalidates the contract and writes it. An accurate unsaved-changes indicator and a quit-confirmation guard against accidental loss.?shows the full key map.
Keep your own editor? apic create/open --editor "<cmd>" (e.g. --editor "code --wait") preserves the $VISUAL/$EDITOR flow.
Under the hood
- Renders identically to
apic readby reusing its formatting; no changes to the on-disk contract format or toread/validate/list. - Adds
ratatuiandtui-textareafor the TUI.
Install
Prebuilt binaries for Linux (x86_64, aarch64), macOS (Intel, Apple Silicon), and Windows (x86_64) are attached below — each with a .sha256 checksum.
From source:
cargo install --git https://github.com/rizukirr/apic --tag v0.2.0-beta01