Skip to content

v0.2.0-beta01

Pre-release
Pre-release

Choose a tag to compare

@github-actions github-actions released this 11 Jun 20:03
· 79 commits to main since this release

First 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

  • ↑/↓ (or j/k) select a row · Enter steps into its cells · ←/→ (or h/l) move between cells · Esc steps back.

Editing

  • Enter/i edit a text cell; Enter cycles the HTTP method, toggles a required flag, or toggles a body type between object and object[].
  • Enter on the METHOD url line edits protocol / host / path; Enter on a REQUEST/RESPONSE title edits its code / description / type; Esc collapses.

Structure

  • a adds a row to the current section — a nested field when you're on an object field, or a new response on the + add response line.
  • d deletes the selected row, with a confirmation popup.

Examples

  • Enter on an example opens a multiline JSON editor.
  • g generates a sample example from the schema (a one-element array for object[] bodies).

Saving

  • Ctrl-S validates 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 read by reusing its formatting; no changes to the on-disk contract format or to read / validate / list.
  • Adds ratatui and tui-textarea for 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