Docs / CLI / Interactive Console

Interactive Console

Bare arcis in a TTY drops into a full-screen REPL. Persistent welcome banner, scrollback, slash commands, command history, jump-to-finding navigation. Built on ratatui + crossterm. New in v1.6.

One-shot still works. Piping, scripting, CI runners, and explicit subcommands all bypass the REPL automatically. The console is a TTY-only addition, never a regression.

Auto-launch rules

The REPL only starts when all four of these are true:

Anything else (pipes, redirects, CI runners, scripts, explicit subcommand) falls through to the static welcome screen.

The console opens with a persistent banner pinned to the top of the scrollback. It carries:

The banner is part of scrollback (not a fixed header), so it slides off-screen as work accumulates. Same shape as Claude Code's session welcome.

Commands

Anything that does not start with / runs as arcis <cmd>:

audit .                # static analysis of the current directory
sca .                  # supply-chain scan
scan http://localhost  # probe a live endpoint
audit --json            # flags pass through normally

Slash commands:

CommandWhat it does
/helpRe-render the welcome banner inline
/clearWipe scrollback (banner re-appears at top)
/cwdPrint current working directory
/cwd <path>Change working directory without leaving the console
/exportSave the current session to arcis-session-<epoch>.md in the cwd
/export session.mdSave to an explicit filename
/exit · /quitLeave the console (Ctrl-D on empty input also works)

Keymap

KeyEffect
EnterSubmit the current line
/ Walk through command history (newest first)
/ Move cursor within the input
Home / EndCursor to start / end of input
Backspace / DeleteEdit current input
PgUp / PgDnScroll the scrollback by a page (a "page" is the visible area)
F2Jump to the next finding strictly below the current view top, wraps to first
Shift-F2Jump to the previous finding above the current view top, wraps to last
EscClear current input and snap back to the tail of scrollback
Ctrl-CCancel the running command if one is in flight; otherwise clear the current input
Ctrl-DExit when the input is empty

A "finding" is any scrollback line whose trimmed start matches one of CRITICAL , HIGH , MEDIUM , LOW , CRIT , WARN , INFO . The detector is intentionally simple so it works against every Arcis CLI output format (plain text, verbose, etc.) without parsing JSON.

Command history

History is persisted across sessions at ~/.arcis/history (Linux/macOS) or %USERPROFILE%\.arcis\history (Windows). Bounded at 200 entries; auto-compacted when the file grows past 2× the cap. Duplicate adjacent entries collapse to one. Slash commands are persisted too.

Override the file location with the ARCIS_HISTORY_PATH environment variable. Read-only home directories fall back silently to in-memory history.

ANSI color preservation

Subprocess output is piped through an SGR parser that converts inline ANSI escape sequences into ratatui spans. Supports:

Background colors and cursor-movement sequences are silently dropped (the scrollback owns its own background; cursor positioning inside a TUI pane would corrupt the layout).

The console sets CLICOLOR_FORCE=1 on child processes so well-behaved tools keep their color when piped. ARCIS_NO_REPL=1 is also set on children to prevent recursive REPL boot.

Scrollback

Bounded at 5,000 lines. Older lines drop off the top in 256-line chunks. New output streams in real time; the prompt stays pinned at the bottom. When you scroll up (PgUp, F2, Shift-F2), the view freezes there until you press Esc, End, or submit another command. A small dim status in the prompt row shows the scroll offset.

Session export

/export writes the current scrollback to a markdown file. Default name is arcis-session-<unix-epoch>.md in the cwd; pass an explicit filename to override. The file opens with a header (version, cwd, ISO timestamp) and then the full scrollback wrapped in a single fenced code block so it renders monospaced in any markdown viewer.

Disabling the REPL

Set ARCIS_NO_REPL=1 in your shell, or invoke a subcommand directly. Both routes hit the static welcome screen instead. Examples:

# Skip the REPL for this invocation
ARCIS_NO_REPL=1 arcis

# Pipe-friendly invocation: REPL is auto-skipped because stdout is not a TTY
arcis audit . | tee audit.log

# CI: ARCIS_NO_REPL is implied by the CI env var
CI=1 arcis audit .

Recovery from a stuck terminal

The console uses raw mode + the alternate screen buffer. A panic mid-render would normally leave the terminal in raw mode. The console wraps every exit path in a TerminalGuard that restores cooked mode, leaves the alt-screen, and shows the cursor in its drop impl. If you still end up in a stuck terminal (e.g., the binary was hard-killed), run reset or stty sane to restore.