MCPcopy Index your code
hub / github.com/antonmedv/walk

github.com/antonmedv/walk @v1.13.0 sqlite

repository ↗ · DeepWiki ↗ · release v1.13.0 ↗
67 symbols 180 edges 12 files 2 documented · 3%
README

🥾 walk

walk demo

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

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.

Walk Preview Mode

Delete file or directory

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

Walk Deletes a File

Display icons

Install Nerd Fonts and add --icons flag.

Walk Icons Support

Image preview

No additional setup is required.

Walk Image Preview

Usage

Key binding Description
arrows, hjkl Move cursor
shift+arrows Jump to start/end
enter Enter directory
backspace Exit directory
space Toggle preview
esc, q Exit with cd
ctrl+c Exit without cd
/ Fuzzy search
d, delete Delete file or dir
y yank 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.

Flag Description
--icons Show icons
--dir-only Show dirs only
--hide-hidden Hide hidden files
--preview Start with preview mode on
--with-border Show border in preview mode
--fuzzy Start with fuzzy search on

Related

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

License

MIT

Core symbols most depended-on inside this repo

Mode
called by 12
status_bar.go
Sprintf
called by 10
status_bar.go
permBit
called by 9
utils.go
list
called by 6
main.go
filePath
called by 5
main.go
updateOffset
called by 4
main.go
currentFileName
called by 4
main.go
saveCursorPosition
called by 3
main.go

Shape

Method 39
Function 19
Struct 6
TypeAlias 3

Languages

Go100%

Modules by API surface

main.go33 symbols
status_bar.go8 symbols
status_bar_test.go7 symbols
utils.go6 symbols
icons.go6 symbols
image.go2 symbols
usage.go1 symbols
styles.go1 symbols
status_bar_windows.go1 symbols
status_bar_unix.go1 symbols
open_with.go1 symbols

Dependencies from manifests, versioned

github.com/antonmedv/clipboardv1.0.1 · 1×
github.com/aymanbagabas/go-osc52/v2v2.0.1 · 1×
github.com/charmbracelet/bubblesv0.18.0 · 1×
github.com/charmbracelet/x/ansiv0.8.0 · 1×
github.com/charmbracelet/x/termv0.2.1 · 1×
github.com/dlclark/regexp2v1.11.4 · 1×
github.com/erikgeiser/coninputv0.0.0-2021100415322 · 1×
github.com/lucasb-eyer/go-colorfulv1.2.0 · 1×

For agents

$ claude mcp add walk \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact