apic v0.2.0
apic v0.2.0
An interactive terminal UI is now the default way to author contracts. Run apic create or apic open and edit your contract in place, with the same rendering you get from apic read.
New
- Interactive authoring TUI — the default surface for
apic createandapic open. A borderless, table-based view with two-level navigation: move between rows, focus a cell, then edit. The external editor remains available behind--editor. - Inline editing for every field — type into text cells, cycle enums, and toggle booleans without leaving the table. Name and Description drop straight into insert mode on Enter.
- JSON example editor — open a request/response example in an inline modal, or auto-generate one from the schema with
g. - Schema editing — add nested schema fields with a context-aware
akey, toggleobject/object[]types, and add or delete list rows in place. - Response editing — add responses, edit their status code and description, and switch body type through expandable titles. A new response drops straight into its code cell.
- Selectable section titles — VARIABLE / QUERY / HEADERS titles are selectable so empty sections still accept new entries.
- Tab / Shift-Tab move to the next/previous cell while typing, staying in insert mode.
- Accurate unsaved-changes detection — the status line compares against a saved baseline instead of guessing, so the dirty marker reflects real edits.
Behavior
apic createseeds builtin scalar defaults and empty arrays, so a fresh contract is valid and ready to edit.
Quality of life
- The selected row is centered in the viewport with bottom padding, and scrolling follows the cursor so the active field stays in view.
- Cursor styling makes focus obvious: red row cursor, yellow on the focused cell, white-bold method and expand markers.
- Bordered confirm / help popups, with explicit quit and delete confirmations.
- Queued input is coalesced into a single redraw per burst for snappier navigation and typing.
Under the hood
- Upgraded to ratatui 0.30 via ratatui-textarea, consolidating on a single crossterm 0.29.
Install
cargo install apic-cliOr download a prebuilt binary for your platform from the assets below (macOS arm64/x64, Linux x64) and verify with the matching .sha256.
Full changelog: v0.1.1...v0.2.0