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:
- stdout is a TTY
- stdin is a TTY
- the
CIenvironment variable is unset - the
ARCIS_NO_REPLenvironment variable is unset
Anything else (pipes, redirects, CI runners, scripts, explicit subcommand) falls through to the static welcome screen.
Welcome banner
The console opens with a persistent banner pinned to the top of the scrollback. It carries:
- Mascot + wordmark
- Current CLI version + working directory
- Quick-start commands (
audit ./sca ./scan <url>) - More commands (
arcis --help/arcis --version/arcis --list/arcis update) - Available adapters per language:
node:,python:,go: - Console commands list (
/help,/clear,/cwd,/export,/exit) - Keymap hint (Ctrl-C cancels; PgUp/PgDn scrolls; F2 jumps to next finding)
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:
| Command | What it does |
|---|---|
/help | Re-render the welcome banner inline |
/clear | Wipe scrollback (banner re-appears at top) |
/cwd | Print current working directory |
/cwd <path> | Change working directory without leaving the console |
/export | Save the current session to arcis-session-<epoch>.md in the cwd |
/export session.md | Save to an explicit filename |
/exit · /quit | Leave the console (Ctrl-D on empty input also works) |
Keymap
| Key | Effect |
|---|---|
Enter | Submit the current line |
↑ / ↓ | Walk through command history (newest first) |
← / → | Move cursor within the input |
Home / End | Cursor to start / end of input |
Backspace / Delete | Edit current input |
PgUp / PgDn | Scroll the scrollback by a page (a "page" is the visible area) |
F2 | Jump to the next finding strictly below the current view top, wraps to first |
Shift-F2 | Jump to the previous finding above the current view top, wraps to last |
Esc | Clear current input and snap back to the tail of scrollback |
Ctrl-C | Cancel the running command if one is in flight; otherwise clear the current input |
Ctrl-D | Exit 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:
- Reset (
0), bold (1), dim (2), underline (4) and unset counterparts - 8-color foreground (
30-37) + bright foreground (90-97) - 256-color foreground (
38;5;N) - 24-bit truecolor foreground (
38;2;R;G;B) - what Arcis itself uses for emerald
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.