TUI
Using the codeflow terminal user interface.
codeflow provides an interactive terminal interface or TUI for working on your projects with an LLM.
Running codeflow starts the TUI for the current directory.
codeflowOr you can start it for a specific working directory.
codeflow /path/to/projectOnce you’re in the TUI, you can prompt it with a message.
Give me a quick summary of the codebase.File references
You can reference files in your messages using @. This does a fuzzy file search in the current working directory.
How is auth handled in @packages/functions/src/api/index.ts?The content of the file is added to the conversation automatically.
Bash commands
Start a message with ! to run a shell command.
!ls -laThe output of the command is added to the conversation as a tool result.
Commands
When using the codeflow TUI, you can type / followed by a command name to quickly execute actions. For example:
/helpMost commands also have keybind using ctrl+x as the leader key, where ctrl+x is the default leader key. Learn more.
Here are all available slash commands:
compact
Compact the current session. Alias: /summarize
/compactKeybind: ctrl+x c
details
Toggle tool execution details.
/detailsKeybind: ctrl+x d
editor
Open external editor for composing messages. Uses the editor set in your EDITOR environment variable. Learn more.
/editorKeybind: ctrl+x e
exit
Exit codeflow. Aliases: /quit, /q
/exitKeybind: ctrl+x q
export
Export current conversation to Markdown and open in your default editor. Uses the editor set in your EDITOR environment variable. Learn more.
/exportKeybind: ctrl+x x
help
Show the help dialog.
/helpKeybind: ctrl+x h
init
Create or update AGENTS.md file. Learn more.
/initKeybind: ctrl+x i
models
List available models.
/modelsKeybind: ctrl+x m
new
Start a new session. Alias: /clear
/newKeybind: ctrl+x n
redo
Redo a previously undone message. Only available after using /undo.
/redoKeybind: ctrl+x r
sessions
List and switch between sessions. Aliases: /resume, /continue
/sessionsKeybind: ctrl+x l
share
Share current session. Learn more.
/shareKeybind: ctrl+x s
themes
List available themes.
/themesKeybind: ctrl+x t
undo
Undo last message in the conversation. Removes the most recent user message, all subsequent responses, and any file changes.
/undoKeybind: ctrl+x u
unshare
Unshare current session. Learn more.
/unshareEditor setup
Both the /editor and /export commands use the editor specified in your EDITOR environment variable.
# Example for nano or vimexport EDITOR=nanoexport EDITOR=vim
# For GUI editors (VS Code, Cursor, VSCodium, Windsurf, Zed, etc.) include --waitexport EDITOR="code --wait"To make it permanent, add this to your shell profile;
~/.bashrc, ~/.zshrc, etc.
set EDITOR=notepad
# For GUI editors (VS Code, Cursor, VSCodium, Windsurf, Zed, etc.) include --waitset EDITOR=code --waitTo make it permanent, use System Properties > Environment Variables.
$env:EDITOR = "notepad"
# For GUI editors (VS Code, Cursor, VSCodium, Windsurf, Zed, etc.) include --wait$env:EDITOR = "code --wait"To make it permanent, add this to your PowerShell profile.
Popular editor options include:
code- Visual Studio Codecursor- Cursorwindsurf- Windsurfvim- Vim editornano- Nano editornotepad- Windows Notepadsubl- Sublime Text
Some editors need command-line arguments to run in blocking mode. The --wait flag makes the editor process block until closed.