Skip to main content
Fresh is a terminal text editor with multi-cursor support. This page documents all CLI commands, flags, and file location syntax.

Basic Usage

Opening Files

string[]
Files to open. Supports advanced file location syntax (see below).

File Location Syntax

Fresh supports rich file location syntax for opening files at specific positions:
Use single quotes to avoid shell expansion when using the @"message" syntax.

Global Options

string[]
Run a command instead of opening files. See Commands below.
string
Attach to a session. Use -a alone for current directory, or -a NAME for a named session.
boolean
Read content from stdin (alternative to using - as filename).
boolean
Disable plugin loading.
path
Path to configuration file (overrides default config locations).
path
Path to log file for editor diagnostics.
path
Enable event logging to the specified file.
boolean
Don’t restore previous workspace session.Alias: --no-session
boolean
Disable upgrade checking and anonymous telemetry.
string
Override the locale (e.g., en, ja, zh-CN).See Internationalization for supported locales.
boolean
Launch in GUI mode with native window and GPU rendering.
Requires Fresh to be built with the gui feature enabled.

Commands

Commands are invoked using the --cmd flag:

Configuration Commands

config show

Print the effective configuration (merged from all config layers).

config paths

Show directories used by Fresh (config, data, cache, etc.).

Session Commands

Fresh supports persistent sessions that can be attached/detached.

session list

List all active sessions.

session attach [NAME]

Attach to a session. Without NAME, attaches to the session for the current directory.

session new NAME

Start a new named session.

session kill [NAME]

Terminate a session. Without NAME, kills the current directory’s session. Use --all to kill all sessions.

session open-file NAME FILES [--wait]

Open files in a session without attaching. Use . for NAME to target the current directory’s session.
boolean
Block the CLI process until the user dismisses the popup (if @"message" was given) or closes the buffer.This enables guided walkthroughs and sequential file review workflows.

Initialization Command

init [TYPE]

Initialize a new plugin, theme, or language configuration. Interactive prompt if TYPE is omitted.

Advanced Workflows

Guided Walkthrough with —wait

The --wait flag enables sequential file review workflows:
When --wait is used:
  1. Fresh opens the file at the specified location
  2. If a @"message" is provided, displays it in a popup
  3. The CLI process blocks until:
    • User presses Escape (if popup was shown)
    • User closes the buffer (if no popup)
  4. Process exits, allowing the next command to run
This is useful for:
  • Code review workflows
  • Tutorial/walkthrough scripts
  • Sequential debugging sessions

Using Fresh as Git Editor

Configure Fresh as your Git editor for commits, rebases, etc.:
This opens files in the current directory’s session and waits for you to save and close.

Reading from Stdin

Remote Editing (SSH)

Fresh supports editing files on remote hosts via SSH:
All files in a single Fresh invocation must be from the same remote host. You cannot mix local and remote files.

Examples

Version Information

Getting Help

For more information, visit https://getfresh.dev/docs