{"id":37802020,"url":"https://github.com/kivattt/fen","last_synced_at":"2026-01-16T15:26:57.265Z","repository":{"id":227512015,"uuid":"770820498","full_name":"kivattt/fen","owner":"kivattt","description":"Terminal file manager","archived":false,"fork":false,"pushed_at":"2026-01-06T22:49:35.000Z","size":8592,"stargazers_count":31,"open_issues_count":0,"forks_count":3,"subscribers_count":2,"default_branch":"main","last_synced_at":"2026-01-11T11:32:33.815Z","etag":null,"topics":["file-manager","file-manager-cli","terminal"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kivattt.png","metadata":{"files":{"readme":"README.md","changelog":"history.go","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-03-12T08:14:26.000Z","updated_at":"2025-12-31T06:22:22.000Z","dependencies_parsed_at":"2024-05-31T13:35:14.757Z","dependency_job_id":"c39531fd-2223-4fab-82b4-55df52be3850","html_url":"https://github.com/kivattt/fen","commit_stats":null,"previous_names":["kivattt/kivaranger","kivattt/fen"],"tags_count":65,"template":false,"template_full_name":null,"purl":"pkg:github/kivattt/fen","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kivattt%2Ffen","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kivattt%2Ffen/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kivattt%2Ffen/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kivattt%2Ffen/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kivattt","download_url":"https://codeload.github.com/kivattt/fen/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kivattt%2Ffen/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28479409,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T11:59:17.896Z","status":"ssl_error","status_checked_at":"2026-01-16T11:55:55.838Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["file-manager","file-manager-cli","terminal"],"created_at":"2026-01-16T15:26:57.168Z","updated_at":"2026-01-16T15:26:57.246Z","avatar_url":"https://github.com/kivattt.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# fen\n\n[![Go Report Card](https://goreportcard.com/badge/github.com/kivattt/fen)](https://goreportcard.com/report/github.com/kivattt/fen)\n\nfen is a terminal file manager inspired by [ranger](https://github.com/ranger/ranger)\\\nWorks for Linux, macOS, FreeBSD and Windows\n\nWarning! There are race conditions which make fen unsuitable for copying large amounts of individual files. Use something like [ranger](https://github.com/ranger/ranger) for this purpose instead!\n\n\u003cp float=\"left\"\u003e\n\u003cimg src=\"screenshots/linux.png\" alt=\"fen running on Linux, with the file preview script rainbow.lua\" width=\"48%\"\u003e\n\u003cimg src=\"screenshots/macos.png\" alt=\"fen running on macOS, showing the no-write feature\" width=\"50%\"\u003e\n\u003cimg src=\"screenshots/freebsd.png\" alt=\"fen running on FreeBSD, showing the root file system\" width=\"50%\"\u003e\n\u003cimg src=\"screenshots/windows.png\" alt=\"fen running on Windows, showing the open-with modal\" width=\"48%\"\u003e\n\u003c/p\u003e\n\n## Installing\n### Prebuilt binaries\nDownload and run the latest version in the [Releases](https://github.com/kivattt/fen/releases) page\n\nAdd it to your path environment variable, or (on Linux/FreeBSD) place the executable in `/usr/local/bin`\n\n### Building from source\nThis requires Go 1.21.5 or above ([install Go](https://go.dev/dl/))\n```\ngit clone https://github.com/kivattt/fen\ncd fen\ngo build\n./fen # fen.exe on Windows\n```\n\n## Controls\nArrow keys, hjkl, mouse click or scrollwheel to navigate (Enter goes right), Escape key to cancel an action\n\n\u003ckbd\u003e?\u003c/kbd\u003e or \u003ckbd\u003eF1\u003c/kbd\u003e Toggle help menu\\\n\u003ckbd\u003eF2\u003c/kbd\u003e Show libraries used in fen\\\n\u003ckbd\u003eq\u003c/kbd\u003e Quit fen\\\n\u003ckbd\u003eo\u003c/kbd\u003e Options\\\n\u003ckbd\u003ez\u003c/kbd\u003e or \u003ckbd\u003eBackspace\u003c/kbd\u003e Toggle hidden files\\\n\u003ckbd\u003eCtrl + Space\u003c/kbd\u003e or \u003ckbd\u003eCtrl + b\u003c/kbd\u003e Open file(s) with specific program\\\n\u003ckbd\u003e!\u003c/kbd\u003e Run system shell command (cmd on Windows)\\\n\u003ckbd\u003eHome\u003c/kbd\u003e or \u003ckbd\u003eg\u003c/kbd\u003e Go to the top\\\n\u003ckbd\u003eEnd\u003c/kbd\u003e or \u003ckbd\u003eG\u003c/kbd\u003e Go to the bottom\\\n\u003ckbd\u003eM\u003c/kbd\u003e Go to the middle\\\n\u003ckbd\u003eCtrl + Left arrow\u003c/kbd\u003e Go to the root folder (or current Git repository if `fen.git_status=true`)\\\n\u003ckbd\u003eCtrl + Right arrow\u003c/kbd\u003e Go to the path furthest down in history, follow a symlink or go to the first changed file if `fen.git_status=true`\\\n\u003ckbd\u003ePage Up\u003c/kbd\u003e / \u003ckbd\u003ePage Down\u003c/kbd\u003e Scroll up/down an entire page\\\n\u003ckbd\u003eH\u003c/kbd\u003e Go to the top of the screen\\\n\u003ckbd\u003eL\u003c/kbd\u003e Go to the bottom of the screen\\\n\u003ckbd\u003eDel\u003c/kbd\u003e or \u003ckbd\u003ex\u003c/kbd\u003e Delete file(s)\\\n\u003ckbd\u003ey\u003c/kbd\u003e Copy file(s)\\\n\u003ckbd\u003ed\u003c/kbd\u003e Cut file(s)\\\n\u003ckbd\u003ep\u003c/kbd\u003e Paste file(s)\\\n\u003ckbd\u003e/\u003c/kbd\u003e or \u003ckbd\u003eCtrl + f\u003c/kbd\u003e Search\\\n\u003ckbd\u003ef\u003c/kbd\u003e or \u003ckbd\u003eCtrl + n\u003c/kbd\u003e Search filenames recursively\\\n\u003ckbd\u003ec\u003c/kbd\u003e Goto path\\\n\u003ckbd\u003eSpace\u003c/kbd\u003e Select files\\\n\u003ckbd\u003eA\u003c/kbd\u003e Flip selection in folder (select all files)\\\n\u003ckbd\u003eD\u003c/kbd\u003e Deselect all, press again to un-yank\\\n\u003ckbd\u003ea\u003c/kbd\u003e Rename a file\\\n\u003ckbd\u003eb\u003c/kbd\u003e Bulk-rename (rename in editor)\\\n\u003ckbd\u003eV\u003c/kbd\u003e Start selecting by moving\\\n\u003ckbd\u003en\u003c/kbd\u003e Create a new file\\\n\u003ckbd\u003eN\u003c/kbd\u003e Create a new folder\\\n\u003ckbd\u003eF5\u003c/kbd\u003e Refreshes files, syncs the screen (fixes broken output), refreshes git status when `fen.git_status=true`\\\n\u003ckbd\u003e0-9\u003c/kbd\u003e Go to a configured bookmark\n\n## Configuration\nYou can find a complete default config with extra examples in the [config.lua](config.lua) file\\\nFor a full config folder example, see [my personal config](https://github.com/kivattt/dotfiles/blob/main/.config/fen/config.lua)\n\nLinux/FreeBSD: `~/.config/fen/config.lua` or `$XDG_CONFIG_HOME/fen/config.lua` if `$XDG_CONFIG_HOME` set\\\nmacOS: `$HOME/Library/Application Support/fen/config.lua`\\\nWindows: `%AppData%\\Roaming\\fen\\config.lua`\n\nYou can specify a different config file with the `--config` flag\n\nLeft-clicking to copy the selected path on Linux/FreeBSD requires `xclip` to be installed\n\n## File previews\nfen does not (yet!) have file previews by default\\\nFor file previews with programs like `cat` or `head`, you can add something like this to your config.lua:\n```lua\nfen.preview = {\n    {\n        program = {\"head -n 100\"},\n        match = {\"*\"}\n    }\n}\n```\n\nFor something cross-platform, file previews can also be a [lua script](lua-file-preview-examples/basic.lua).\n```lua\nfen.preview = {\n    {\n        script = fen.config_path..\"basic.lua\",\n        match = {\"*\"}\n    }\n}\n```\nIf \"script\" is set, \"program\" will be ignored in the same preview entry.\\\n\"script\" can not be a list like \"program\" can, because we want to see syntax errors when writing lua code instead of falling back to anything.\\\nThe \"script\" key has to be an absolute file path\n\n## Changing directory\nYou can change the current working directory to the one in fen on exit:\n```bash\ncd $(fen --print-folder-on-exit)\n```\n\nYou can alias fen to do this every time you open it by adding this to your `.bashrc`:\n```bash\ncd_fen() {\n    cd $(fen --print-folder-on-exit)\n}\nalias fen=cd_fen\n```\nNOTE: Using this alias will break command-line arguments, like `fen -v` since the output will be passed to `cd`.\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003ch2\u003eLua scripting (click to expand)\u003c/h2\u003e\u003c/summary\u003e\n\nfen uses [gopher-lua](https://github.com/yuin/gopher-lua) as its Lua runtime.\n\n## Writing file preview scripts with Lua\nDo not use `print()`, it outputs to stdout which doesn't work well within file previews.\\\nYou can find examples in [lua-file-preview-examples](lua-file-preview-examples)\n\nFile preview scripts are separate from config.lua, don't expect any direct overlap in the API\n\n### Available variables:\n`fen.SelectedFile` Currently selected file absolute file path to preview\\\n`fen.Width` Width of the file preview area\\\n`fen.Height` Height of the file preview area\n\n### Available functions:\n`fen:Print(text, x, y, maxWidth, alignment, color) returns amount of characters on screen printed` Print text at the given x/y position. x=0, y=0 is the top left corner of the file preview area and limited to the file preview area only [Go doc](https://pkg.go.dev/github.com/rivo/tview#Print)\\\n`fen:PrintSimple(text, x, y) returns amount of characters on screen printed` Same as above, with default color and alignment and no maxWidth [Go doc](https://pkg.go.dev/github.com/rivo/tview#PrintSimple)\\\n`fen:Escape(text)` Escape style tags [Go doc](https://pkg.go.dev/github.com/rivo/tview#Escape)\\\n`fen:TranslateANSI(text)` Turn ANSI into style tags [Go doc](https://pkg.go.dev/github.com/rivo/tview#TranslateANSI)\\\n`fen:NewRGBColor(r, g, b)` [Go doc](https://pkg.go.dev/github.com/gdamore/tcell/v2#NewRGBColor)\\\n`fen:ColorToString(color)` (Since v1.1.2) [Go doc](https://pkg.go.dev/github.com/gdamore/tcell/v2#Color.String)\\\n`fen:RuntimeOS()` (Since v1.1.3) The OS fen is running in [Go doc](https://pkg.go.dev/runtime#pkg-constants)\\\n`fen:Version()` (Since v1.2.3) fen version string\n\n**Notes about `fen:Print()` and `fen:PrintSimple()`:**\\\nNewlines will not show up, and do nothing. You will have to manually call it multiple times, increasing y.\\\nTabs are replaced with 4 spaces so they are visible\n\n## Writing file open scripts with Lua (Since v1.3.0)\nYou can find examples in [lua-file-open-examples](lua-file-open-examples)\n\n### Available variables:\n`fen.SelectedFiles` List of selected files to open\\\n`fen.ConfigPath` Same as `fen.config_path` from config.lua\\\n`fen.RuntimeOS` The OS fen is running in [Go doc](https://pkg.go.dev/runtime#pkg-constants)\\\n`fen.Version` fen version string\n\u003c/details\u003e\n\n## Known issues\n- fen may crash in the middle of deleting files due to a race condition, most commonly when deleting a lot of files (like 4000)\n- File previews are ran synchronously, which means they slow down fen\n- fen intentionally does not handle Unicode \"grapheme clusters\" (like chinese text) in filenames correctly for performance reasons. You need to manually build fen with the replace directive for my [tcell fork](https://github.com/kivattt/tcell-naively-faster) in the go.mod file removed to show them correctly\n- The color for audio files is invisible in the default Windows Powershell colors, but not cmd or Windows Terminal\n- Bulk-renaming a .git folder on Windows hangs fen forever\n- On Windows, `fen.git_status` may show a file as changed when it was only re-saved in notepad, until you run a Git command in the repo\n\nSee [TODO.md](TODO.md) for other issues and possible future features\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkivattt%2Ffen","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkivattt%2Ffen","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkivattt%2Ffen/lists"}