{"id":13474270,"url":"https://github.com/JosephLai241/nomad","last_synced_at":"2025-03-26T21:31:07.894Z","repository":{"id":182945567,"uuid":"442304978","full_name":"JosephLai241/nomad","owner":"JosephLai241","description":"🌳 The customizable next gen tree command with Git integration and TUI.","archived":false,"fork":false,"pushed_at":"2023-05-10T17:47:44.000Z","size":9507,"stargazers_count":41,"open_issues_count":8,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-08-01T16:35:29.844Z","etag":null,"topics":["command-line","command-line-tool","customizable","developer-tools","directory-traversal","directory-tree","filesystem-utils","git","git-integrated","gitignore","ignore","interactive","rust","self-updater","toml","tree","tree-structure","treeview","tui"],"latest_commit_sha":null,"homepage":"https://josephlai241.github.io/nomad/","language":"Rust","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/JosephLai241.png","metadata":{"files":{"readme":"README.md","changelog":null,"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}},"created_at":"2021-12-28T00:18:53.000Z","updated_at":"2024-07-30T13:31:20.000Z","dependencies_parsed_at":"2023-07-22T07:46:29.676Z","dependency_job_id":null,"html_url":"https://github.com/JosephLai241/nomad","commit_stats":null,"previous_names":["josephlai241/nomad"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JosephLai241%2Fnomad","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JosephLai241%2Fnomad/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JosephLai241%2Fnomad/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JosephLai241%2Fnomad/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JosephLai241","download_url":"https://codeload.github.com/JosephLai241/nomad/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":222169239,"owners_count":16942668,"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":["command-line","command-line-tool","customizable","developer-tools","directory-traversal","directory-tree","filesystem-utils","git","git-integrated","gitignore","ignore","interactive","rust","self-updater","toml","tree","tree-structure","treeview","tui"],"created_at":"2024-07-31T16:01:10.896Z","updated_at":"2024-10-30T05:31:05.192Z","avatar_url":"https://github.com/JosephLai241.png","language":"Rust","funding_links":[],"categories":["Rust","💻 Apps"],"sub_categories":["⌨️ Development Tools"],"readme":"       ________  ________  ________  ________   _______ \n      ╱    ╱   ╲╱        ╲╱        ╲╱        ╲_╱       ╲\n     ╱         ╱         ╱         ╱         ╱         ╱\n    ╱         ╱         ╱         ╱         ╱         ╱ \n    ╲__╱_____╱╲________╱╲__╱__╱__╱╲___╱____╱╲________╱  \n\n\u003e The customizable next gen `tree` command with Git integration and TUI.\n\n![Rust](https://img.shields.io/badge/Rust-black?style=flat-square\u0026logo=rust)\n![GitHub Workflow Status](https://img.shields.io/github/workflow/status/JosephLai241/nomad/Rust?style=flat-square\u0026logo=github)\n![GitHub release (latest by date)](https://img.shields.io/github/v/release/JosephLai241/nomad?style=flat-square)\n![Lines of code](https://img.shields.io/tokei/lines/github/JosephLai241/nomad?style=flat-square)\n![License](https://img.shields.io/github/license/JosephLai241/nomad?style=flat-square)\n\n# Table of Contents\n\n* [Introduction](#introduction)\n    + [\"This `README` barely explains what `nomad` does. Where the hell is the manual?\"](#this-readme-barely-explains-what-nomad-does-where-the-hell-is-the-manual)\n* [Prerequisites](#prerequisites)\n* [Standard Usage](#standard-usage)\n    + [Unlocked Functionality via Item Labels](#unlocked-functionality-via-item-labels)\n* [`bat` - `bat` Files in the Tree](#bat---bat-files-in-the-tree)\n* [`edit` - Edit Files in the Tree](#edit---edit-files-in-the-tree)\n* [`tokei`](#tokei)\n    + [`tokei` - Subcommand (Overview)](#tokei---subcommand-overview)\n    + [`nd --tokei` - Flag (Tree View)](#nd---tokei---flag-tree-view)\n* [Filtering (Including or Excluding) Items by Filetype](#filtering-including-or-excluding-items-by-filetype)\n    + [`ft match` - Including Filetypes and/or Globs](#ft-match---including-filetypes-andor-globs)\n\t+ [`ft negate` - Excluding Filetypes and/or Globs](#ft-negate---excluding-filetypes-andor-globs)\n    + [`ft options` - Viewing Filetype Globs](#ft-options---viewing-filetype-globs)\n* [Git Integration](#git-integration)\n\t+ [Git Status Markers](#git-status-markers)\n    + [`git add`](#git-add)\n    + [`git blame`](#git-blame)\n    + [`git branch`](#git-branch)\n    + [`git commit`](#git-commit)\n    + [`git diff`](#git-diff)\n    + [`git status`](#git-status)\n* [Rootless Mode](#rootless-mode)\n* [Configuration/Customization](#configurationcustomization)\n    + [\"What Can I Customize?\"](#what-can-i-customize)\n    + [`config edit` - Editing the Configuration File](#config-edit---editing-the-configuration-file)\n\t+ [`config preview` - Previewing Your Configurations](#config-preview---previewing-your-configurations)\n* [Inspirations](#inspirations)\n\n# Introduction\n\n`nomad` is a rewrite of the [`tree`][tree] command with a ***ton*** of additional features such as Git integration, built-in [`bat`][bat] and [`tokei`][tokei], the ability to customize its appearance, and even a TUI (terminal UI) mode.\n\nI think the `tree` command is a useful CLI tool, but is unfortunately lacking some features that I think would make it even better. I decided to build my own next gen `tree` command that implements the features I would have wanted in the original `tree` command.\n\n## \"This `README` barely explains what `nomad` does. Where the hell is the manual?\"\n\nThe manual for `nomad` was originally this `README`, but it became too long to comfortably navigate. This `README` merely serves as a preview of sorts with some information for each feature whereas the manual provides a more in-depth look at `nomad`.\n\n**[The manual is available here][nomad manual]** and is also linked in the About section of this repository.\n\n# Prerequisites\n\n`nomad`'s icons require a [NerdFont][NerdFont] to render correctly. Refer to the [NerdFont installation instructions][NerdFont Installation] to install a NerdFont for your system. It is quite simple to do and will not take too long.\n\n# Standard Usage\n\n![standard-demo][standard-demo]\n\nBy default, `nomad` will display a tree visual representing the directory structure of the target directory and respect rules specified in ignore-type files such as `.gitignore`s. This behavior may be disabled.\n\nEach item will also be labeled with a NerdFont-supported icon corresponding to its filetype as well as Git status markers indicating the Git status of the file. See the [Git Status Markers](#git-status-markers) section to learn more about what each default marker/color represents.\n\n## Unlocked Functionality via Item Labels\n\n**`nomad`'s capabilities are drastically enhanced through the use of item labels.**\n\nThese are the flags that will apply labels to items within the tree:\n\n| Flag | Function                                                      |\n|------|---------------------------------------------------------------|\n| `-l` | Applies labels to directories only                            |\n| `-n` | Applies labels to items only                                  |\n| `-L` | Applies labels to directories and items. An alias for `-l -n` |\n\n# `bat` - `bat` Files in the Tree\n\n![bat demo][bat demo]\n\n\u003e **NOTE:** Requires a preceeding run in a [labeled mode](#unlocked-functionality-via-item-labels).\n\nQuickly `bat` files by passing item labels into the `bat` subcommand.\n\n\u003e **NOTE:** This command works with item and/or directory labels. If directory labels are provided, all items within that directory will be `bat`ed in the order they appear.\n\n# `edit` - Edit Files in the Tree\n\n![edit demo][edit demo]\n\n\u003e Opened with [`Neovim`][Neovim], the best text editor.\n\n\u003e **NOTE:** Requires a preceeding run in a [labeled mode](#unlocked-functionality-via-item-labels).\n\nQuickly edit files by passing item labels into the edit subcommand.\n\n`nomad` will attempt to open files with your `$EDITOR` if it is set. If not, it will try the following text editors in this order:\n\n1. [Neovim][Neovim]\n2. [Vim][Vim]\n3. [Vi][Vi]\n4. [Nano][Nano]\n\n\u003e **NOTE:** This command works with item and/or directory labels. If directory labels are provided, all items within that directory will be opened in a text editor.\n\n# `tokei`\n\n`Tokei` may be accessed through the subcommand or in tree view to display LoC data for individual files.\n\n## `tokei` - Subcommand (Overview)\n\n![tokei subcommand demo][tokei subcommand demo]\n\nYou can quickly see a `tokei` summary/overview for a project by using the `tokei` subcommand.\n\n## `nd --tokei` - Flag (Tree View)\n\n![tokei tree demo][tokei tree demo]\n\nYou can view `tokei` statistics for individual files by using the `--tokei` flag. This will display the lines of blanks, code, comments, and total number of lines for each file.\n\n# Filtering (Including or Excluding) Items by Filetype\n\nYou can filter out items in a directory by `match`ing or `negate`ing filetypes or globs.\n\n## `ft match` - Including Filetypes and/or Globs\n\n![filetype match demo][filetype match demo]\n\n## `ft negate` - Excluding Filetypes and/or Globs\n\n![filetype negate demo][filetype negate demo]\n\n## `ft options` - Viewing Filetype Globs\n\n![filetype options demo][filetype options demo]\n\nYou can view all the preset globs for each filetype by using the `ft options` subcommand. Optionally specify a filetype after the subcommand to search/view the globs for that specific filetype.\n\n# Git Integration\n\n`nomad` has Git integration to allow for easy access to commonly used Git subcommands!\n\n## Git Status Markers\n\nHere is a table that contains the default Git status markers, the marker's color, and what it represents:\n\n| Marker | Color    | Status              |\n|--------|----------|---------------------|\n| `!`    | Red      | Conflicting         |\n| `D`    | Red      | Deleted             |\n| `M`    | Orange   | Modified            |\n| `R`    | Orange   | Renamed             |\n| `TC`   | Purple   | Type change         |\n| `SA`   | \\*Green  | Staged, Added       |\n| `SD`   | \\*Red    | Staged, Deleted     |\n| `SM`   | \\*Orange | Staged, Modified    |\n| `SR`   | \\*Orange | Staged, Renamed     |\n| `STC`  | \\*Purple | Staged, type change |\n| `U`    | Gray     | Untracked           |\n\n\u003e \\* The filename will also be painted the same color.\n\n\u003e **NOTE:** Staged deleted filenames will also be painted with a strikethrough.\n\nIf you do not like the default marker or color configuration, you can [customize it to your liking](#configurationcustomization).\n\n## `git add`\n\n### **🚧 This feature is currently in beta 🚧**\n\n![git add demo][git add demo]\n\n\u003e **NOTE:** Requires a preceeding run in a [labeled mode](#unlocked-functionality-via-item-labels).\n\nQuickly `git add` files by passing items labels into the subcommand.\n\n\u003e **NOTE:** This command works with item and/or directory labels. If directory labels are provided, all items within that directory that are tracked by Git and contain a Git status will be added.\n\n## `git blame`\n\n![git blame demo][git blame demo]\n\n\u003e **NOTE:** Requires a preceeding run in a [labeled mode](#unlocked-functionality-via-item-labels).\n\nQuickly run `git blame` on a file by passing an item label into the subcommand.\n\n\u003e **NOTE:** This command only accepts one item label.\n\nCommits made by you remain plain while commits made by other authors are painted with a color. Each author is assigned a random color, so these colors will be different each time you run `git blame`.\n\n\u003e Be sure to check out [Mojibar][Mojibar], a cross-platform, quick-access tab and search bar for emojis written by my friend Luke Schenk.\n\n## `git branch`\n\n![git branch demo][git branch demo]\n\nYou can view `git branch` in tree form. This works especially well if your branch names look like filepaths. Some examples are:\n\n* `feature/git/something-new`\n* `bugfix/some-bug`\n\n## `git commit`\n\n### **🚧 This feature is currently in beta 🚧**\n\n![git commit demo][git commit demo]\n\n`git commit` has been integrated for convenience and offers some visual improvements over the original command.\n\n## `git diff`\n\n![git diff demo][git diff demo]\n\n\u003e **NOTE:** Requires a preceeding run in a [labeled mode](#unlocked-functionality-via-item-labels).\n\nQuickly `git diff` files by passing item labels into the subcommand. This command offers visual improvements and additional data over the original command.\n\n\u003e **NOTE:** This command works with item and/or directory labels. If directory labels are provided, all items within that directory that are tracked by Git and contain a Git status will be `diff`ed in the order they appear.\n\n## `git status`\n\n![git status demo][git status demo]\n\nYou can view `git status` in tree form. This command will only display items that are tracked by Git and contain changes or are untracked.\n\n# Rootless Mode\n\n![rootless mode demo][rootless mode demo]\n\nRootless mode is the TUI (terminal UI) mode that allows you to dynamically interact with directory trees.\n\nThere are three primary widgets that you can interact with. Here is a quick description of each widget:\n\n| Widget      | Description                                               | Location |\n|-------------|-----------------------------------------------------------|----------|\n| Breadcrumbs | Contains path breadcrumbs for parent directory navigation | Top      |\n| Inspect     | Contains the contents of the selected item                | Right    |\n| Normal      | Contains the directory tree                               | Left     |\n\n# Configuration/Customization\n\nYou can configure/customize `nomad` *without* the hassles of creating your own configuration file in the correct directory with the correct syntax.\n\n## \"What Can I Customize?\"\n\nHere is a list of what you can customize for **standard mode**:\n\n* The tree's indentation and padding\n* The directory's color\n* The tree's indent characters (`|`, `├`, `─`, `└`)\n* The directory and item label's color\n* Git status markers and colors\n* The color of the pattern/regex match (when using the `-p`/`--pattern` flag)\n\nHere is a list of what you can customize for **Rootless mode**:\n\n* The color of the widget borders\n* The color of a standard item in the tree (one that does not contain any Git changes)\n* The color of items that contain a Git status\n* The color of the pattern/regex match when searching for patterns within the tree or file\n\n\u003e The following standard mode settings will also be applied to the Normal widget within Rootless mode:\n\u003e\n\u003e * Indentation/padding\n\u003e * Intent characters\n\u003e * Git markers \n\n## `config edit` - Editing the Configuration File\n\n![config edit demo][config edit demo]\n\nYou can easily access the configuration file by using the `config edit` subcommand.\n\n## `config preview` - Previewing Your Configurations\n\n![config preview demo][config preview demo]\n\nYou can preview all your configuration options in a dummy tree by using the `config preview` subcommand.\n\n# Inspirations\n\nBe sure to check out the tools that inspired me to create this project!\n\n* [`tree`][tree] - the OG command\n* [`lsd`][lsd] - a modern `ls` alternative/rewrite\n\n\n\u003c!-- DEMO GIFS --\u003e\n[bat demo]: https://github.com/JosephLai241/nomad/blob/demo-gifs/gifs/bat.gif\n[config edit demo]: https://github.com/JosephLai241/nomad/blob/demo-gifs/gifs/config-edit.gif\n[config preview demo]: https://github.com/JosephLai241/nomad/blob/demo-gifs/gifs/config-preview.gif\n[edit demo]: https://github.com/JosephLai241/nomad/blob/demo-gifs/gifs/edit.gif\n[filetype match demo]: https://github.com/JosephLai241/nomad/blob/demo-gifs/gifs/ft-match.gif\n[filetype negate demo]: https://github.com/JosephLai241/nomad/blob/demo-gifs/gifs/ft-negate.gif\n[filetype options demo]: https://github.com/JosephLai241/nomad/blob/demo-gifs/gifs/ft-options.gif\n[git add demo]: https://github.com/JosephLai241/nomad/blob/demo-gifs/gifs/git-add.gif\n[git blame demo]: https://github.com/JosephLai241/nomad/blob/demo-gifs/gifs/git-blame.gif\n[git branch demo]: https://github.com/JosephLai241/nomad/blob/demo-gifs/gifs/git-branch.gif\n[git commit demo]: https://github.com/JosephLai241/nomad/blob/demo-gifs/gifs/git-commit.gif\n[git diff demo]: https://github.com/JosephLai241/nomad/blob/demo-gifs/gifs/git-diff.gif\n[git status demo]: https://github.com/JosephLai241/nomad/blob/demo-gifs/gifs/git-status.gif\n[rootless mode demo]: https://github.com/JosephLai241/nomad/blob/demo-gifs/gifs/rootless-mode.gif\n[standard-demo]: https://github.com/JosephLai241/nomad/blob/demo-gifs/gifs/standard.gif\n[tokei subcommand demo]: https://github.com/JosephLai241/nomad/blob/demo-gifs/gifs/tokei-subcommand.gif\n[tokei tree demo]: https://github.com/JosephLai241/nomad/blob/demo-gifs/gifs/tokei-tree.gif\n\n\n\u003c!-- LINKS --\u003e\n[nomad manual]: https://josephlai241.github.io/nomad/\n\n[bat]: https://github.com/sharkdp/bat\n[lsd]: https://github.com/Peltoche/lsd\n[tokei]: https://github.com/XAMPPRocky/tokei\n[tree]: https://linux.die.net/man/1/tree\n\n[Mojibar]: https://github.com/LukeDSchenk/mojibar\n[Nano]: https://www.nano-editor.org/\n[Neovim]: https://github.com/neovim/neovim\n[NerdFont]: https://www.nerdfonts.com/\n[NerdFont Installation]: https://github.com/ryanoasis/nerd-fonts#font-installation\n[Vi]: https://en.wikipedia.org/wiki/Vi\n[Vim]: https://www.vim.org/\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FJosephLai241%2Fnomad","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FJosephLai241%2Fnomad","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FJosephLai241%2Fnomad/lists"}