The terminal UI
apic ui is the interactive face of the same project the CLI runs: requests
on the left, and a preview, the response, the checks, the session and the
history on the right. It sends requests with the same runner as apic run, so what you see
is what CI will see.
apic ui # the project in the current directoryapic ui -C api --env staging # a project elsewhere, in another environmentapic ui --demo # a fake API served in-process, nothing to set upTry it with no project
Section titled “Try it with no project”apic ui --demo writes the bundled example project to a temporary
directory, serves the fake API it targets on a free localhost port inside
the same process, and opens the UI on it. Quitting shuts the server down and
removes the directory. It is the fastest way to see what apic does, and it
needs no network access.
apic demo is the two-terminal version: it writes the same project to
./apic-demo (in the current directory) and serves the API. Because apic ui resolves .http files relative to -C (default: the current
directory), running plain apic ui in a second terminal won’t see that
project — pass -C apic-demo (or cd into it first).
Projects are directory-scoped
Section titled “Projects are directory-scoped”Every apic command, ui included, only ever looks at .http/.rest files
under -C (default .). There is no global registry of projects and no
upward search past that directory. If a request doesn’t show up, or the UI
opens empty, check you’re pointed at the right directory before anything
else.
The screen
Section titled “The screen”Requests (left) lists every request grouped by file, each row showing its state, method, id and description:
| Mark | Meaning |
|---|---|
● | Ready to run: every variable it needs resolves. |
○ | Not ready: something is missing, usually a token another request captures. |
✓ | Ran and passed every assertion and capture. |
✗ | Ran and failed, or could not be sent at all. |
- | # @disabled: dimmed, and skipped by f and a; enter still sends it. |
| spinner | In flight. |
Once a request has run, its status code and round trip sit at the right of
the row (200 12ms), and the file heading above it rolls its requests up
as ✓9 ✗1, so a flow over a long file reads at a glance. A narrow pane
sheds the timing first and the description second; the status code and the
mark always stay. The colour of a status code is its class, not its verdict:
a 404 a request asserts is still a ✓. When the list is taller than the
pane, the right of its title counts the rows out of view: ↑3 ↓8.
Preview is apic describe for the selected request: the URL template,
headers, the body, auth, every variable with the source it resolved from,
and the declared captures and asserts. Missing variables are called out with
the request that would provide them.
Response is one scroll in three labelled parts. Under request is
the line that was sent, with every variable resolved. Under response is
the status line, timing and size, a line saying where the time went (DNS,
connect, TLS, first byte, total, and whether the connection was reused)
and the body pretty-printed and syntax-highlighted. Under checks are
the assertions and captures. H adds the headers and the body
sent to the first part and the response headers to the second; c swaps in the equivalent
curl command, and each further press the same request as HTTPie,
PowerShell, Python, JavaScript and Go (see
apic snippet) before the response comes back. When a tab holds more than fits, the right of the tab strip
says where you are in it: top ↓, ↑ 40% ↓, ↑ end.
Checks shows each assertion with its actual and expected value, which
is the fastest way to see why a check failed, plus everything the request
captured, under the same request, response and checks rules as the
response tab.
Session lists the values captured for the current environment, the same
ones apic session prints and the same ones later runs will use, and the
cookies in the jar when cookies: true is set. x clears them
after a confirmation.
History lists the selected request’s earlier responses in the current
environment, newest first, and under them what changed between the last
two: the status, then the body, compared as
apic history diff compares them. It needs
history: N in apic.yaml; until then the tab says so. Every run from the
UI adds an entry, including the requests a # @ref ran first.
The status bar carries the project root, the environment, a spinner with
progress and a running clock while a request is out, and the result of the
last run. demo and redact badges show when --demo or --redact is in
force, so a screenshot never hides that values were masked. On a narrow
terminal the bar gives up the project root first, then the last result,
then the environment, so the key hint and anything in flight stay in view.
| Key | Action |
|---|---|
| ↑/k, ↓/j | Move between requests |
| g, G | First and last request |
| / | Filter by id, URL, method, file or description; ↑/↓ move through the matches while you type, enter keeps the filter |
| enter | Run the selected request |
| f | Run every request in its file, in order, as a flow |
| a | Run every request in the project |
| esc | Cancel a run, clear the filter, or close an overlay |
| tab/l, shift+tab/h | Next and previous tab |
| 1 2 3 4 5 | Jump to preview, response, checks, session, history |
| H | Toggle request and response headers |
| c | Show the selected request as curl; again for HTTPie, PowerShell, Python, JavaScript, Go, then back to the response |
| J, K | Scroll the right pane a line down or up |
| pgup/ctrl+u, pgdn/ctrl+d | Scroll the right pane half a page |
| e, E | Switch to the next and the previous environment |
| r | Reload the project from disk |
| o | Open the request’s file at its line in $EDITOR |
| x | Clear the session for this environment |
| ? | Show every key |
| q, ctrl+c | Quit |
How it behaves
Section titled “How it behaves”- One request at a time. Runs are serialised, because they share the session and the values captured along the way. Starting a run while one is in flight says so rather than queueing; esc cancels.
- Flows update live. Running a file sends its requests one after another, and each row turns green or red as its response arrives, so a long flow shows progress instead of a frozen screen. The cursor moves to each request as its response lands, so the pane shows the latest response while the next request is out, and a filter that would hide any of them is cleared when the flow starts, so the pane and the list always agree.
- Retries happen inside the run. A request with
# @retryis sent until its assertions pass; the status line of its response then says how many attempts it took. The row is “running” until then, so a long poll looks like a slow request. - Captures apply immediately. After
loginpasses, requests that need{{token}}flip from○to●without a reload. A request with# @ref loginis●from the start: running it runsloginfirst when the token is missing, andlogin’s row shows that result too. - Scrolling stays put. Reading down a long response and it finishes changing underneath you (a later step of a flow landing, the terminal being resized) leaves you where you were. Moving to another request, tab or overlay starts at the top again.
- Switching environment rebuilds the project with that environment’s variables and session, and clears the results on screen, since they came from somewhere else.
- Editing is round-tripped. o opens
$VISUAL, then$EDITOR(vi, ornotepadon Windows), at the request’s line; the project is reloaded when the editor exits. VS Code, Cursor and VSCodium are given--waitso that moment is the tab closing, not the window opening. While the editor runs the UI stops reading the keyboard, so everything typed goes to the editor. r reloads without editing, which picks up files written by anything else. - Redaction is honoured. With
--redact, bodies, header values, query values and captured values are masked on screen exactly as they are inapic run --redactoutput.
If it will not start
Section titled “If it will not start”apic ui needs an interactive terminal on both stdin and stdout.
- “needs an interactive terminal” means stdout is a pipe or a file. Drop the
pipe, or use
apic run/apic list --jsonfor scripted work. - “does not support
--json” means exactly that: the UI has no machine output.apic run --jsonandapic list --jsondo. - On Windows, run it in Windows Terminal or PowerShell. Git Bash’s mintty
needs
winpty apic ui. - Below 70x16 the UI says the terminal is too small rather than drawing a scrambled screen.
Hosted on Cloudflare, which keeps aggregate traffic statistics. No cookies, no tracking scripts, no per-request logs. Privacy