Skip to content

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.

Terminal window
codeflow

Or you can start it for a specific working directory.

Terminal window
codeflow /path/to/project

Once 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 -la

The 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:

/help

Most 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

/compact

Keybind: ctrl+x c


details

Toggle tool execution details.

/details

Keybind: ctrl+x d


editor

Open external editor for composing messages. Uses the editor set in your EDITOR environment variable. Learn more.

/editor

Keybind: ctrl+x e


exit

Exit codeflow. Aliases: /quit, /q

/exit

Keybind: 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.

/export

Keybind: ctrl+x x


help

Show the help dialog.

/help

Keybind: ctrl+x h


init

Create or update AGENTS.md file. Learn more.

/init

Keybind: ctrl+x i


models

List available models.

/models

Keybind: ctrl+x m


new

Start a new session. Alias: /clear

/new

Keybind: ctrl+x n


redo

Redo a previously undone message. Only available after using /undo.

/redo

Keybind: ctrl+x r


sessions

List and switch between sessions. Aliases: /resume, /continue

/sessions

Keybind: ctrl+x l


share

Share current session. Learn more.

/share

Keybind: ctrl+x s


themes

List available themes.

/themes

Keybind: ctrl+x t


undo

Undo last message in the conversation. Removes the most recent user message, all subsequent responses, and any file changes.

/undo

Keybind: ctrl+x u


unshare

Unshare current session. Learn more.

/unshare

Editor setup

Both the /editor and /export commands use the editor specified in your EDITOR environment variable.

Terminal window
# Example for nano or vim
export EDITOR=nano
export EDITOR=vim
# For GUI editors (VS Code, Cursor, VSCodium, Windsurf, Zed, etc.) include --wait
export EDITOR="code --wait"

To make it permanent, add this to your shell profile; ~/.bashrc, ~/.zshrc, etc.

Popular editor options include:

  • code - Visual Studio Code
  • cursor - Cursor
  • windsurf - Windsurf
  • vim - Vim editor
  • nano - Nano editor
  • notepad - Windows Notepad
  • subl - Sublime Text

Some editors need command-line arguments to run in blocking mode. The --wait flag makes the editor process block until closed.