paras-commander

module
v0.8.91 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 9, 2026 License: MIT

README

Paras Commander

A Linux terminal twin-panel file manager inspired by Midnight Commander and fzf, written in Go using a TUI.

⚠️ Not yet stable Use at your own risk.

Features

  • Practically everything is based on fzf style searching. Filelist navigation, keybind help, etc.
  • All jobs are queued into background by default.
  • Jobs view with queue management and transfer graphs.
  • Gitignore and git statuses using eza notation.
  • Copied / moved files are indicated with an icon for visibility.
  • Integrated disk usage scanning and reporting.
  • Integrated directory comparison.
  • Integrated find duplicates utility.
  • Supports selections across multiple paths.
  • Selections can be stashed and restored (1 slot).
  • Integrated mass rename.
  • Rename supports slugify and clean.
  • Read bookmarks from ~/.fzf-marks and gnome gtk files. Writes bookmarks to ~/.fzf-marks.
  • Find files / paths recursively. Can handle at least 2 million files.
  • Meta column(s) can be used to provide data from external commands.
  • Execute command for selected files.
  • User menu for commands. Supports interactive, background and worker pools.
  • SFTP remote panel browsing. Parses ~/.ssh/config for quick access.
  • File chooser mode (--chooser-file) for editor integration (e.g. Helix).
  • Subshell, ability to send selected filenames into the subshell.
Outscoped compared to MC
  • No EXT2 recovery.
  • No shell link.

Requirements

  • Go 1.26+
  • Linux
  • NerdFont or something similar, no fallback implemented yet.

Install

Install the pc binary into $GOBIN if that environment variable is set; otherwise into $(go env GOPATH)/bin (often ~/go/bin). Put that directory on your PATH.

go install github.com/paranoidi/paras-commander/cmd/pc@latest

To install from a specific version tag or commit, replace @latest with that ref (for example @v0.1.0 or @main).

Build

go build ./cmd/pc

This produces a pc binary in the repo root.

Run

After a local go build (binary in the current directory):

./pc

Open a directory in the primary (left) panel:

./pc /path/to/dir

Open a file in fullscreen preview (Esc returns to its parent directory with the file selected):

./pc README.md

Open two directories (primary, then secondary). If exactly one argument is a file, that panel opens the file's parent with the file selected and Quick View is enabled on that panel; both arguments being files is an error.

./pc ~/projects ~/Downloads
./pc README.md ~/Downloads

Missing paths exit with an error. Path arguments cannot be combined with --chooser-file (use --select there instead).

With test helpers (Dev pulldown menu for status toasts):

./pc -dev

After go install, with your Go bin directory on PATH:

pc

File chooser (Helix)

Inspiration taken from yazi, the filemanager you should check out.

pc --chooser-file=/path/to/output-file [--select=PATH] [--no-carousel]
  • --chooser-file — when you press Enter on a regular file, pc writes its absolute path (with a trailing newline) to this file and exits. Directories are opened as usual; only files complete the pick.
  • --select — open at a file or directory and highlight it (e.g. Helix %{buffer_name} for the active buffer). For a file, pc opens its parent directory with that file selected. If the path does not exist yet, the parent directory is opened and the basename is selected when present in the listing.
  • Carousel view on the left panel (parent | current | child columns) is on by default in chooser mode. Pass --no-carousel to use a plain single-column list instead.
  • Quick view (Shift+F3) is on by default in chooser mode so the inactive panel previews the highlighted file.
  • Quit without selecting leaves the output file unchanged — clear it before each invocation.

Example Helix keybinding (requires a Helix build with command extensions):

[keys.normal]
C-p = [
  ':sh rm -f /tmp/pc-chooser',
  ':insert-output pc -select "%{buffer_name}" -chooser-file=/tmp/pc-chooser',
  ':sh printf "\x1b[?1049h\x1b[?2004h" > /dev/tty',
  ':open %sh{cat /tmp/pc-chooser}',
  ':redraw',
]

Test

go test ./...

Lint

Requires go-task. Install tools into ./bin, then lint:

task setup   # install golangci-lint, errcheck, ineffassign, gocyclo into ./bin
task lint    # golangci-lint (includes errcheck, ineffassign, gocyclo)
task errcheck
task ineffassign
task gocyclo

Or, if golangci-lint (v2) is already on your PATH:

golangci-lint run ./...

Configuration

Paras Commander reads a TOML config file. On first run a default config is generated. Themes live in the themes/ directory.

See docs/config.md for the full list of config.toml keys, defaults, and descriptions.

Directories

Path Synopsis
cmd
pc command
internal
app
Package app wires together UI, state, and services for the TUI application.
Package app wires together UI, state, and services for the TUI application.
app/helpkeys
Package helpkeys formats keymap bindings for the help dialog.
Package helpkeys formats keymap bindings for the help dialog.
apphandler/commands
Package commands implements the Commands view (run-command list screen), the command output dialog, and the run-for-each dialog/batch backend.
Package commands implements the Commands view (run-command list screen), the command output dialog, and the run-for-each dialog/batch backend.
apphandler/dedup
Package dedup owns the full-screen "find duplicates within a single directory" view.
Package dedup owns the full-screen "find duplicates within a single directory" view.
apphandler/dialog
Package dialog owns the file-operation and navigation-dialog family: the generic FileDialogField-based open/submit/key-handling machinery; the rename, mkdir, delete, duplicate, chmod, chown, symlink, and hardlink dialogs built on it; the mass-rename dialog; the archive-extract dialog; the flatten dialog; the bookmarks path picker and add-bookmark dialog; the copy/move transfer dialog (including the multi-location preview list and self-copy-rename flow); and the path-picker (history/bookmarks fuzzy picker) shared by the transfer, flatten, and file-dialog path fields.
Package dialog owns the file-operation and navigation-dialog family: the generic FileDialogField-based open/submit/key-handling machinery; the rename, mkdir, delete, duplicate, chmod, chown, symlink, and hardlink dialogs built on it; the mass-rename dialog; the archive-extract dialog; the flatten dialog; the bookmarks path picker and add-bookmark dialog; the copy/move transfer dialog (including the multi-location preview list and self-copy-rename flow); and the path-picker (history/bookmarks fuzzy picker) shared by the transfer, flatten, and file-dialog path fields.
apphandler/meta
Package meta owns the async per-entry metadata (meta.toml) feature: the checkbox picker dialog, worker-pool command dispatch per panel, result caching, and the F9 edit-config-from-dialog flow.
Package meta owns the async per-entry metadata (meta.toml) feature: the checkbox picker dialog, worker-pool command dispatch per panel, result caching, and the F9 edit-config-from-dialog flow.
apphandler/preview
Package preview owns the file-preview cluster: inactive-column quick view, the fullscreen (F3) preview, carousel side/child preview, "/" incremental search in the fullscreen preview, and the Chroma style picker.
Package preview owns the file-preview cluster: inactive-column quick view, the fullscreen (F3) preview, carousel side/child preview, "/" incremental search in the fullscreen preview, and the Chroma style picker.
archive
Package archive maps archive filenames to external extract commands.
Package archive maps archive filenames to external extract commands.
clipboard
Package clipboard writes text to the system clipboard when a helper tool is available.
Package clipboard writes text to the system clipboard when a helper tool is available.
compare
Package compare walks two directory trees, hashes file contents, and classifies differences.
Package compare walks two directory trees, hashes file contents, and classifies differences.
configdoc
Package configdoc merges built-in documentation headers into config stub files while preserving user configuration byte-for-byte.
Package configdoc merges built-in documentation headers into config stub files while preserving user configuration byte-for-byte.
dialogform
Package dialogform implements the App-independent core of linear-form dialog key handling: focus navigation, mnemonics, space-toggle, and apply/cancel keys shared by every dialog built on dialog.DialogLinearForm (sort, listing-format, config, debounce-calibrate, group-select, run-for-each, and similar dialogs).
Package dialogform implements the App-independent core of linear-form dialog key handling: focus navigation, mnemonics, space-toggle, and apply/cancel keys shared by every dialog built on dialog.DialogLinearForm (sort, listing-format, config, debounce-calibrate, group-select, run-for-each, and similar dialogs).
diskusage
Package diskusage provides subtree size caching and scanning utilities.
Package diskusage provides subtree size caching and scanning utilities.
fsbackend
Package fsbackend provides a registry of filesystem backends keyed by pathloc scheme.
Package fsbackend provides a registry of filesystem backends keyed by pathloc scheme.
fsbackend/file
Package file implements the host filesystem backend via internal/localfs.
Package file implements the host filesystem backend via internal/localfs.
gitignore
Package gitignore applies Git work-tree ignore rules for panel listings and Find.
Package gitignore applies Git work-tree ignore rules for panel listings and Find.
gitstatus
Package gitstatus provides eza-style two-letter Git status for panel listings via git(1).
Package gitstatus provides eza-style two-letter Git status for panel listings via git(1).
jobbridge
Package jobbridge connects the jobs worker to ops planning and execution.
Package jobbridge connects the jobs worker to ops planning and execution.
jobs
Package jobs implements the background job queue, worker, and state management for filesystem operations (copy, move) in paras-commander.
Package jobs implements the background job queue, worker, and state management for filesystem operations (copy, move) in paras-commander.
ops
Package ops implements filesystem copy and move operations as used by the background job worker.
Package ops implements filesystem copy and move operations as used by the background job worker.
panellist
Package panellist implements shared file-list name-column suffix indicators (job, new, subtree).
Package panellist implements shared file-list name-column suffix indicators (job, new, subtree).
pathloc
Package pathloc identifies filesystem locations across host paths and remote URIs.
Package pathloc identifies filesystem locations across host paths and remote URIs.
pathpick
Package pathpick validates and resolves path-picker query strings.
Package pathpick validates and resolves path-picker query strings.
preview/mdformat
Package mdformat renders markdown source to styled terminal cells for the preview panel, mirroring the shape of chromaformat.Highlight (parse once, walk the AST, emit previewpanel.AnsiCell runs).
Package mdformat renders markdown source to styled terminal cells for the preview panel, mirroring the shape of chromaformat.Highlight (parse once, walk the AST, emit previewpanel.AnsiCell runs).
scrollquery
Package scrollquery implements the App-independent core of scrolling-query text fields: cursor/scroll editing and key handling shared by every dialog that embeds a dialog.ScrollingQuery (find, help, history, SFTP connect, group-select, file-preview theme picker, path picker).
Package scrollquery implements the App-independent core of scrolling-query text fields: cursor/scroll editing and key handling shared by every dialog that embeds a dialog.ScrollingQuery (find, help, history, SFTP connect, group-select, file-preview theme picker, path picker).
sshconfig
Package sshconfig parses OpenSSH client configuration for SFTP host selection.
Package sshconfig parses OpenSSH client configuration for SFTP host selection.
subshell
Package subshell implements a persistent PTY-backed shell for MC-style Ctrl+O toggle.
Package subshell implements a persistent PTY-backed shell for MC-style Ctrl+O toggle.
tcelltest
Package tcelltest holds small helpers for tests that drive tcell.SimulationScreen.
Package tcelltest holds small helpers for tests that drive tcell.SimulationScreen.
textutil
Package textutil holds small pure string/path helpers shared across internal/app and internal/apphandler/* packages (status banners, log lines, absolute-path normalization).
Package textutil holds small pure string/path helpers shared across internal/app and internal/apphandler/* packages (status banners, log lines, absolute-path normalization).
treeflat
Package treeflat is the shared tree→visible-rows model used by tree-style list views (find-duplicates modes today; the planned file-list tree layout later).
Package treeflat is the shared tree→visible-rows model used by tree-style list views (find-duplicates modes today; the planned file-list tree layout later).
ui

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL