walk logo

walk Anton Medvedev

Use this command to install walk:
winget install --id=antonmedv.walk -e

A terminal navigator

Walk is a terminal navigator designed to simplify navigation and file management in the terminal. It serves as an intuitive replacement for traditional cd and ls commands, enabling users to explore directories and manage files efficiently.

Key Features:

  • Intuitive Navigation: Use hjkl keys or arrow keys to move through directories with ease.
  • Preview Mode: Press Space to toggle preview mode for quick file previews without leaving the terminal.
  • File Operations: Delete files or directories with dd, undo deletions, and navigate back using u.
  • Icons Support: Display icons by enabling the --icons flag, enhancing visual clarity (requires Nerd Fonts).
  • Image Preview: View images directly in the terminal without additional setup.
  • Customization: Adjust color schemes, status bars, and file open commands through environment variables for a personalized experience.

Audience & Benefit:

Ideal for Linux, macOS, and Windows users seeking an efficient way to manage files from the terminal. Walk is particularly beneficial for developers and terminal enthusiasts who prefer minimizing external tools while maximizing productivity. Its streamlined interface reduces cognitive load, allowing users to focus on their tasks with enhanced efficiency.

README

🥾 walk

Walk — a terminal navigator; a cd and ls replacement.

Run lk, navigate using arrows or hjkl. Press, esc to jump to a new location; or ctrl+c to stay.

Install

brew install walk
pkg_add walk
go install github.com/antonmedv/walk@latest
curl https://raw.githubusercontent.com/antonmedv/walk/master/install.sh | sh

Or download prebuild binaries.

Setup

Put the next function into the .bashrc or a similar config:

Bash/Zsh Fish PowerShell

function lk {
  cd "$(walk "$@")"
}
function lk
  set loc (walk $argv); and cd $loc;
end
function lk() {
  cd $(walk $args)
}

Now use lk command to start walking.

Features

Preview mode

Press Space to toggle preview mode.

Delete file or directory

Press dd to delete file or directory. Press u to undo.

Display icons

Install Nerd Fonts and add --icons flag.

Image preview

No additional setup is required.

Usage

Key bindingDescription
arrows, hjklMove cursor
shift + arrowsJump to start/end
enterEnter directory
backspaceExit directory
spaceToggle preview
esc, qExit with cd
ctrl + cExit without cd
/Fuzzy search
d, deleteDelete file or dir
yyank current dir
.Hide hidden files

Configuration

The EDITOR or WALK_EDITOR environment variable used for opening files from the walk.

export EDITOR=vim

To specify a command to be used to open files per extension, use the WALK_OPEN_WITH environment variable.

export WALK_OPEN_WITH="txt:less -N;go:vim;md:glow -p"

The WALK_REMOVE_CMD environment variable can be used to specify a command to be used to remove files. This is useful if you want to use a different command to remove files than the default rm.

export WALK_REMOVE_CMD=trash

Change main color with WALK_MAIN_COLOR environment variable. Available colors are here.

export WALK_MAIN_COLOR="#0000FF"

Use WALK_STATUS_BAR environment variable to specify a status bar program.

export WALK_STATUS_BAR="Size() + ' ' + Mode()"

Flags

Flags can be used to change the default behavior of the program.

FlagDescription
--iconsShow icons
--dir-onlyShow dirs only
--hide-hiddenHide hidden files
--previewStart with preview mode on
--with-borderShow border in preview mode
--fuzzyStart with fuzzy search on

Related

  • fx – terminal JSON viewer
  • howto – terminal command LLM helper
  • countdown – terminal countdown timer

License

MIT

Versions
1.13.0
1.12.0
1.7.0
1.6.2
Website
License