Skip to content
yingtzePublic

About

A fast, keyboard-driven two-panel terminal file manager for macOS and Linux. Zero dependencies — pure Python stdlib.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

fm — Terminal File Manager

A fast, keyboard-driven two-panel file manager for macOS and Linux, inspired by Midnight Commander. Built entirely with Python's standard library — zero dependencies required.

Python Platform License Dependencies


Screenshot

 /Users/you                                │  /Users/you/Downloads
 NAME                    SIZE    MODIFIED  │  NAME                    SIZE    MODIFIED
 Documents/              <DIR>   Mar 10    │  ubuntu-24.04.iso        4.7 GB  Mar 13
*Projects/               <DIR>   Mar 15    │* setup_vscode.exe       92.0 MB  Mar 11
 readme.txt              2.1 KB  Mar 01    │  archive.tar.gz          230 MB  Mar 12
 notes.md                5.8 KB  Mar 09    │  photo_vacation.zip        1.4G  Mar 08
──────────────────────────────────────────────────────────────────────────────────────
 4 items  free: 128 GB  2 selected  [COPY: 2]
SPC Sel  a SelAll  F5/c Copy→  F6/m Move→  y Yank  x Cut  p Paste  P Paste+Rename
Ent Open  Bksp Parent  Tab Switch  F2/r Rename  F8/n MkDir  D Delete  . Hidden  q Quit

Features

  • Two-panel layout — navigate source and destination simultaneously
  • Multi-select — mark any number of files with Space, operate on all at once
  • Clipboard workflow — yank/cut files and paste them anywhere, across any directory
  • Copy & Move — direct copy/move to the opposite panel with one key
  • Rename — inline editor with pre-filled current name
  • New directory — create nested directories instantly
  • Delete — with confirmation dialog, no accidental deletes
  • Symlink aware — follows symlinks on Enter, marks them with @
  • Executable detection — marks runnable files with *
  • Hidden files toggle — show/hide dotfiles with .
  • macOS Terminal integration — open a new Terminal window at the current directory with s
  • Auto-rename on conflict — paste with P renames duplicates as file_1.txt, file_2.txt, etc.
  • Full keyboard navigation — arrow keys, Page Up/Down, Home/End
  • Works on /Applications — handles macOS .app bundles and system permission boundaries gracefully

Requirements

Requirement Version
Python 3.10 or later
OS macOS (Darwin) or any POSIX/Linux system
Dependencies None — uses only the Python standard library (curses, shutil, pathlib)

Installation

# Clone the repo
git clone https://github.com/yingtze/fm.git
cd fm

# Make executable
chmod +x fm.py

# Run
python3 fm.py

Or drop fm.py anywhere on your $PATH:

cp fm.py /usr/local/bin/fm
chmod +x /usr/local/bin/fm
fm

Keyboard Reference

Navigation

Key Action
↑ ↓ / k j Move cursor up / down
Page Up / Page Down Scroll one page
Home / End Jump to first / last item
Enter Open directory / follow symlink
Backspace Go to parent directory
Tab Switch active panel

Selection

Key Action
Space Toggle select on cursor (cursor stays)
a / F7 Select all — press again to deselect all
Escape Clear all selections

Note: Space intentionally does not move the cursor. This lets you visually confirm each selection. Press ↓ manually to advance to the next file.

Clipboard (Yank/Paste Workflow)

Key Action
y Yank — copy selected file paths to clipboard
x Cut — mark selected files for move on paste
p Paste here — skip files that already exist
P Paste here — auto-rename conflicts (file_1.txt)

The status bar shows a [COPY: N] or [CUT: N] badge while the clipboard is active. Files in the clipboard are marked with # (yank) or % (cut) in the file list.

Direct Operations

Key Action
F5 / c Copy selected items to the other panel
F6 / m Move selected items to the other panel
F2 / r Rename item under cursor
F8 / n Create a new directory
D / Delete Delete selected items (with confirmation)

Other

Key Action
. Toggle hidden files (dotfiles)
R Reload / refresh both panels
s Open macOS Terminal at current directory
q / F10 Quit

Selection Indicators

Mark Meaning
* File is selected
# File is in clipboard (yank / copy)
% File is in clipboard (cut / move)
/ Directory
@ Symbolic link
* Executable file

Tips

Select a range of files: Navigate with ↓, press Space on each file you want — the cursor stays in place so you can see what's selected before moving on.

Copy files between two different directories:

  1. Navigate the left panel to your source directory
  2. Navigate the right panel to your destination
  3. Select files in the active panel
  4. Press F5 or c to copy

Yank and paste to multiple destinations:

  1. Select files and press y to yank
  2. Navigate to the first destination, press p to paste
  3. Navigate to the second destination, press p again — clipboard stays active until you cut/yank something new or the files are moved

Open /Applications: Navigate to /Applications — .app bundles are shown as directories (they are directories on macOS). Press Enter to browse inside.


Configuration

There is no configuration file by default. Behaviour can be changed by editing constants at the top of fm.py:

HIDDEN_SHOW = False   # Set to True to show hidden files on startup

License

MIT License — see LICENSE for details.


Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/my-feature)
  3. Commit your changes (git commit -m 'Add some feature')
  4. Push to the branch (git push origin feature/my-feature)
  5. Open a Pull Request

About

A fast, keyboard-driven two-panel terminal file manager for macOS and Linux. Zero dependencies — pure Python stdlib.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages