{"id":15375084,"url":"https://github.com/ozansz/gls","last_synced_at":"2025-04-15T06:14:06.287Z","repository":{"id":43598961,"uuid":"511246553","full_name":"ozansz/gls","owner":"ozansz","description":"Minimal file manager with terminal UI #Go","archived":false,"fork":false,"pushed_at":"2024-03-08T09:24:14.000Z","size":7108,"stargazers_count":68,"open_issues_count":4,"forks_count":5,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-15T06:13:59.525Z","etag":null,"topics":["cli","command-line","command-line-tool","contributions-welcome","file-manager","filesystem","go","golang","gui","hacktoberfest","hacktoberfest2022","open-source","terminal","tooling","tools","tui"],"latest_commit_sha":null,"homepage":"https://sazak.io/gls-file-manager-on-terminal-with-go/","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/ozansz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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},"funding":{"github":"ozansz"}},"created_at":"2022-07-06T18:15:18.000Z","updated_at":"2024-11-02T06:52:25.000Z","dependencies_parsed_at":"2024-03-07T19:30:12.773Z","dependency_job_id":"9b5040a2-2b52-4449-83b3-c7dde67e205b","html_url":"https://github.com/ozansz/gls","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ozansz%2Fgls","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ozansz%2Fgls/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ozansz%2Fgls/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ozansz%2Fgls/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ozansz","download_url":"https://codeload.github.com/ozansz/gls/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249016639,"owners_count":21198833,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["cli","command-line","command-line-tool","contributions-welcome","file-manager","filesystem","go","golang","gui","hacktoberfest","hacktoberfest2022","open-source","terminal","tooling","tools","tui"],"created_at":"2024-10-01T14:01:09.131Z","updated_at":"2025-04-15T06:14:06.261Z","avatar_url":"https://github.com/ozansz.png","language":"Go","funding_links":["https://github.com/sponsors/ozansz"],"categories":[],"sub_categories":[],"readme":"# gls\n\n[![made-with-Go](https://img.shields.io/badge/Made%20with-Go-1f425f.svg)](https://go.dev/)\n[![GitHub go.mod Go version of a Go module](https://img.shields.io/github/go-mod/go-version/gomods/athens.svg)](https://github.com/ozansz/gls)\n[![Linux](https://svgshare.com/i/Zhy.svg)](https://svgshare.com/i/Zhy.svg)\n[![macOS](https://svgshare.com/i/ZjP.svg)](https://svgshare.com/i/ZjP.svg)\n[![Windows](https://svgshare.com/i/nM0.svg)](https://svgshare.com/i/nM0.svg)\n\nIt’s `ls` + `du` + `tree` with interactive TUI on your terminal! `gls` is created to easily view, filter and search your files, folders and directories with their size whenever you need to open up some storage space. It wouldn’t be wrong to say that `gls` is a minimal yet powerful file manager CLI tool.\n\n## Table of Contents\n\n* [Installation](#installation)\n* [Usage](#usage)\n\t+ [Default usage (TUI)](#default-usage-tui)\n\t+ [Text mode](#text-mode)\n* [Features](#features)\n\t+ [TUI shortcuts](#tui-shortcuts)\n\t+ [Configuration](#configuration)\n\t+ [Command line arguments](#command-line-arguments)\n* [How to Contribute](#how-to-contribute)\n\n##  Installation\n\n### From Go package\n\nSimply run:\n\n```bash\ngo install go.sazak.io/gls/cmd/gls@latest\n```\n\n### From Source Code\n\nInstalling `gls` on your machine with the source code is pretty simple: just clone the repo and install `cmd/gls/main.go`:\n\n```bash\n$ git clone https://github.com/ozansz/gls\n$ cd gls\n$ go install ./cmd/gls/main.go\n```\n\nAfter you run `go install` command, an executable file name `gls` is created in `$GOPATH/bin`. Now, you can simply run `gls` in terminal:\n\n```bash\n$ gls\n```\n\n### For Ubuntu/Debian and derivatives\n\nIf you use a Debian-based distro on Linux, you can download the package which seems like `gls_\u003cVERSION_NUMBER\u003e_amd64.deb` from [Releases](https://github.com/ozansz/gls/releases) page. Then, you can install it\n* via a package management software with GUI by clicking on the package if you use desktop environment\n* or from the terminal, type `sudo dpkg -i gls_\u003cVERSION_NUMBER\u003e_amd64.deb` in the directory where you downloaded the package. \n\n### For Windows\n\nYou can apply the similar procedure in PowerShell shown in the [From Source Code](#from-source-code) section:\n\n```powershell\n\u003e git clone https://github.com/ozansz/gls\n\u003e cd .\\gls\\\n\u003e go install -v .\\cmd\\gls\\main.go\n```\nNow, you can use `gls` in all directories.\n\n## Usage\nThere are two running modes of `gls`: TUI and text-based.\n\nThe TUI mode is interactive and you will be able to use all of the [features](#features) of `gls`, such as searching by text/regular expression, traversing on the file tree, creating/opening/deleting files and many other things,  until you close the program.\n\nThe text mode however, is fairly simple and is a literal combination of running `tree` and `du` altogether, with some additional features.\n\n### Default usage (TUI)\nThe command below runs `gls` with TUI, which is the default mode. It parses the file tree under the specified path along with the file and folder sizes on disk, then shows the tree view of the parsed tree.\n\n```bash\ngls -path ~/Downloads\n```\n\n![Screenshot of the TUI mode of gls](./img/gui-screenshot.png)\n\n### Text mode\nThe command below does the same parsing process as the command above does. Except, this one just dumps the parsed tree as a the `tree` command does with the file/folder sizes and permissions, to the terminal.\n\n```bash\ngls -nogui -path ~/Documents\n```\n\n## Features\n`gls` includes (and still continues to include more) several features that mimic a normal file manager:\n* List the files and folders under the specified path, in tree view\n* Show current file info: size on disk, permissions, path, MIME type and last modification\n* Sort the tree by the size on disk\n* Search files/folders by name, using both plaintext and regular expressions\n* Ignore specific files/folders by using regular expressions, similar to `.gitignore` style\n\t* Default ignore file is `.glsignore`, but infinitely many other ignore files can be specified through the CLI [arguments](#command-line-arguments)\n* Open files and folders by default programs or executables that you specify\n* Copy/paste and move files and folders\n* Remove files\n* Create (similar to `touch`) and open files to edit\n* Walk on the file tree, collapse and expand nodes easily\n\n### TUI shortcuts\n\n| Shortcut           | Command            | Description                                                                                                                                                                    |\n| ------------------ |--------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `q`, `ESC`, `ˆC`        | quit               | Exits the program                                                                                                                                                              |\n| `c`                  | collapse           | Collapses all nodes in the file tree view                                                                                                                                      |\n| `e`                  | expand             | Expands all nodes in the file tree view                                                                                                                                        |\n| `s`                  | search             | Opens modal to search nodes (files and folders) by name                                                                                                                        |\n| `r`                  | regex search       | Same as search, but you can search using regular expressions                                                                                                                   |\n| `x`                  | restore            | Loads the original file tree view, mostly used after `search` and `regex search`                                                                                               |\n| `o`                  | open               | Opens the selected (on hover) file/folder with the default program                                                                                                             |\n| `p`                  | open               | Opens modal to specify the executable path which will be used to open the selected (on hover) file/folder                                                                      |\n| `BACKSPACE` , `DEL`    | remove             | Removes the selected (on hover) file. Folder removal is currently not supported                                                                                                |\n| `m`                  | mark               | Marks/unmarks the selected (on hover) file or folder. Marked nodes can be used later for `duplicate` and `move`                                                                |\n| `u`                  | unmark             | Unmarks all the marked files and folders                                                                                                                                       |\n| `n`                  | new                | Create a new file                                                                                                                                                              |\n| `d`                  | duplicate          | Copy/pastes the marked files and folders to a specified destination. The destination is specified by the text input of the opened form. |\n| `v`                  | open file in vim   | Opens file in VIM editor.                                                                                                                                                      |\n| `TAB`, `SPACE`, `ENTER`  | toggle expand node | Expands the node if currently collapsed, and vice versa, the selected (on hover) file or folder                                                                                |\n| `ARROW KEYS`, `SCROLL` | navigate           | Navigates between nodes in the file tree view                                                                                                                                  |\n\n### Configuration\n\nYou can freely change the key bindings and shortcuts or configure the program for your needs from `gui/core.go` .\n\nAfter your changes, run\n\n```bash\ngo build cmd/gls/main.go\n```\nin the project directory.\n\nIn addition, if you think that your configurations or other changes seem necessary to improve the project, your contributions will be welcomed :)\n\n### Customize color palette\n\nYou can customize the color palette with `.glsrc` file.  The only thing you need to do is create a `.glsrc` file in `$HOME`\ndirectory and set the colors as key-value pairs. An example is below:\n\n```text\nGridTitleColor=blue\nTreeViewTitleColor=yellow\nFileInfoTitleColor=lightgreen\nDirectoryColor=red\nBorderColor=white\nFileInfoAttrColor=orange\nFileInfoValueColor=pink\nSearchFormTitleColor=brown\nUnmarkedFileColor=deeppink\nMarkedFileColor=gray\nFileInfoTabAttrWidth=30\n```\n\nWhen you run the program, the color palette values are overridden with values in `.glsrc` file. The file must be stored in \n`$HOME` directory and the file name must be `.glsrc`. Otherwise, the program uses the default color palette values.  \n\n### Command line arguments\n\n```bash\n-debug\n    \tIncrease log verbosity\n-fmt string\n   \t\tsize formatter, one of bytes, pow10 or none (default \"bytes\")\n-ignore string\n    \tComma-separated ignore files that specify which files folders to exclude\n-nogui\n    \ttext-only mode\n-path string\n    \tpath to run on (required)\n-sort\n    \tsort nodes by size (default true)\n-thresh string\n    \tsize filter threshold, e.g. 10M, 100K, etc.\n```\n\u003e You can also read this section from terminal by using `gls` without parameters.\n\n## How to Contribute\n\nYou are very welcome to contribute to `gls`! Here are a few steps to guide you how to start contributing:\n\n1. Check [the open issues tab](https://github.com/ozansz/gls/issues) to see if there are any issue you may be interested in fixing. You can also list the [issues with only the good-first-issue tag](https://github.com/ozansz/gls/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22)\n\n2. Check the [contributing guide](CONTRIBUTING.md) for more explanation on setting up the development environment, opening the PR, etc.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fozansz%2Fgls","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fozansz%2Fgls","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fozansz%2Fgls/lists"}