RTFM(1)

NAME
rtfm - Ruby Terminal File Manager with advanced features

SYNOPSIS
rtfm [directory]

DESCRIPTION
RTFM is a feature-rich terminal file manager written in pure Ruby. It provides syntax-highlighted file previews, inline image display, remote SSH/SFTP browsing, comprehensive undo system, OpenAI integration, and much more. RTFM parses LS_COLORS for consistent terminal color theming and supports multiple image display protocols (Sixel, w3m) via the termpix gem.

KEY FEATURES

File Operations
    Copy, move, rename, symlink, delete with comprehensive undo support. Optional trash bin for safe deletion with restore capability.

Remote Browsing
    SSH/SFTP directory browsing with interactive shell sessions, file download/upload, and seamless navigation.

Image Display
    Inline terminal image display using w3m or Sixel protocols. Supports EXIF orientation for correct display of phone photos.

Advanced Features
    Git status, cryptographic hashing, bulk rename with patterns, file comparison, OpenAI integration for file descriptions and chat.

KEYBOARD REFERENCE

  Basic Keys

?   Show help text

q   Quit and save configuration

Q   Quit without saving

r   Refresh display (useful after terminal resize)

R   Reload configuration from ~/.rtfm/conf

  Motion

j, DOWN
    Move down one item

k, UP
    Move up one item

h, LEFT
    Go to parent directory

l, RIGHT, ENTER
    Enter directory or open file

HOME
    Jump to first item

END Jump to last item

PgDown
    Page down

PgUp
    Page up

  Marks and Jumping

m   Set mark (press letter a-z after)

'   Jump to mark (press letter after)

~   Jump to home directory

>   Follow symlink to target directory

Ctrl-r
    Show recently accessed files and directories

Ctrl-e
    Toggle remote SSH/SFTP mode

  Tagging

t   Tag/untag current item

Ctrl-t
    Tag items matching pattern

T   Show tagged items

u   Untag all items

  File Operations

p   Copy tagged items here

P   Move tagged items here

s   Create symlinks to tagged items

c   Rename selected item

E   Bulk rename tagged files with patterns

d   Delete items (moves to trash if enabled)

D   Empty trash directory

Ctrl-d
    Toggle trash on/off

U   Undo last operation

  Permissions

Ctrl-o
    Change ownership (user:group)

Ctrl-p
    Change permissions (755, rwxr-xr-x, +x, -w, etc.)

  Search and Filter

f   Filter by file extension

F   Filter by regex pattern

/   Search and highlight matches

n   Next search match

N   Previous search match

g   Grep files for content

L   Locate files

Ctrl-l
    Fuzzy file search (requires fzf)

  Display Options

w   Change pane width ratio

B   Cycle border styles

-   Toggle preview on/off

_   Toggle image preview on/off

b   Toggle syntax highlighting

a   Show/hide hidden files

A   Toggle long file info (ls -l)

o   Change sort order

i   Invert sort order

  Clipboard

y   Copy path to primary selection (middle-click paste)

Y   Copy path to clipboard

Ctrl-y
    Copy image to clipboard (when viewing image) or copy right pane text

  Git/Hash/AI

G   Show git status

H   Cryptographic hash of directory tree

I   Get OpenAI description of file

Ctrl-a
    Start OpenAI chat session

  System

S   Show comprehensive system information

X   Compare two tagged files

e   Show detailed file properties

CONFIGURATION
Configuration is stored in ~/.rtfm/conf. Use W to write current settings or C to view configuration.

  Configurable Variables

@marks
    Persistent directory bookmarks

@trash
    Enable/disable trash directory (true/false)

@preview
    Enable/disable file preview (true/false)

@showimage
    Enable/disable image display (true/false)

@lslong
    Show long file info (true/false)

@lsall
    Show hidden files (true/false)

@width
    Pane width ratio (2-7)

@border
    Border style (0-3)

@ai OpenAI API key for AI features

PLUGINS
RTFM supports custom plugins in ~/.rtfm/plugins/:

preview.rb
    Custom preview handlers for file types

keys.rb
    Custom key bindings and commands

REMOTE MODE
Access remote directories via SSH/SFTP with Ctrl-e.

  Remote Operations

d   Download selected file

u   Upload local tagged files

s   Open SSH shell session

LEFT/h
    Navigate to parent directory

RIGHT/ENTER
    Show file info or enter directory

DEPENDENCIES

  Required

Ruby 2.7+

rcurses gem (~> 6.0)

termpix gem (~> 0.2)

  Optional

ImageMagick
    For image preview (identify, convert commands)

w3m-img
    For w3m image protocol support

xdotool
    For image redraw on workspace switching

bat/batcat
    Syntax highlighting in previews

fzf Fuzzy file finding

pandoc
    Document conversion for previews

ffmpegthumbnailer
    Video thumbnail generation

ruby-openai
    OpenAI integration

FILES

~/.rtfm/conf
    Main configuration file

~/.rtfm/trash/
    Trash directory for deleted items

~/.rtfm/plugins/preview.rb
    Custom preview handlers

~/.rtfm/plugins/keys.rb
    Custom key bindings

EXAMPLES

Start RTFM in current directory:
    rtfm

Start in specific directory:
    rtfm ~/Documents

Use 'r' alias to cd into last directory on exit:
    Add to ~/.bashrc:
    alias r='cd $(rtfm --last-dir) '

COMPARISON WITH RANGER
RTFM offers more features than ranger including SSH/SFTP browsing, comprehensive undo, trash system, OpenAI integration, and permission/ownership management with undo. Written in pure Ruby vs ranger's Python. Smaller codebase (6K vs 22K lines) but more feature-dense.

BUGS
Report bugs at: https://github.com/isene/RTFM/issues

AUTHOR
Written by Geir Isene <g@isene.com>

SEE ALSO
ls(1), ranger(1), mc(1)

Project homepage: https://isene.com/
GitHub: https://github.com/isene/RTFM
Termpix gem: https://github.com/isene/termpix