{"id":13805024,"url":"https://github.com/fbeline/luneta","last_synced_at":"2025-05-12T23:42:16.744Z","repository":{"id":49099847,"uuid":"255488651","full_name":"fbeline/luneta","owner":"fbeline","description":"command-line fuzzy finder","archived":false,"fork":false,"pushed_at":"2023-08-14T17:27:35.000Z","size":1497,"stargazers_count":62,"open_issues_count":0,"forks_count":4,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-05-12T23:42:06.983Z","etag":null,"topics":["bash","cli","d","fuzzyfinder","unix","zsh"],"latest_commit_sha":null,"homepage":"","language":"D","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fbeline.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"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}},"created_at":"2020-04-14T02:16:25.000Z","updated_at":"2024-08-31T19:16:18.000Z","dependencies_parsed_at":"2024-01-03T01:20:15.276Z","dependency_job_id":"a299abff-7143-46ed-91f3-021e38e4e84c","html_url":"https://github.com/fbeline/luneta","commit_stats":null,"previous_names":[],"tags_count":20,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fbeline%2Fluneta","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fbeline%2Fluneta/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fbeline%2Fluneta/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fbeline%2Fluneta/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fbeline","download_url":"https://codeload.github.com/fbeline/luneta/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253843169,"owners_count":21972867,"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":["bash","cli","d","fuzzyfinder","unix","zsh"],"created_at":"2024-08-04T01:00:56.450Z","updated_at":"2025-05-12T23:42:16.706Z","avatar_url":"https://github.com/fbeline.png","language":"D","readme":"# luneta [![Build Status](https://travis-ci.org/fbeline/luneta.svg?branch=master)](https://travis-ci.org/fbeline/luneta) [![luneta](https://snapcraft.io//luneta/badge.svg)](https://snapcraft.io/luneta)\n\nLuneta is an interactive command-line filter that can be applied to any list, e.g.,\n`cat $(ls | luneta)`\n\n![render1588879971924](https://user-images.githubusercontent.com/5730881/81336973-9cda7e80-9080-11ea-91e9-0ad212ca2591.gif)\n\nIn this example, a list of files and folders are passed to luneta, which opens an interactive screen that allows users to fuzzy search through it. After an item gets selected luneta writes it to the stdout.\n\nIn short, it provides a convenient way to filter the data before passing it downstream.\n\n\u003e (list) stdin  -\u003e luneta (interactive filter) -\u003e stdout (selected value)\n\nAlthough luneta was originally created to be used as a command-line tool, it can be integrated in other applications, e.g., [Vim](#Use-with-Vim).\n\n## Characteristics\n\n- Fast\n- Small (~1mb binary)\n- Support for multiple line selection\n\nRun `luneta -h` for help:\n\n```\nusage: luneta [options]\n-v --version version\n-q   --query default query to be used upon startup\n-f  --filter do not start interactive finder, e.g -f=\"pattern\"\n    --height set the maximum window height (number of lines), e.g --height 25\n     --color color support, e.g --color=FALSE\n-h    --help This help information.\n```\n\n## Installation\n\n### Brew\n\n`brew install fbeline/luneta/luneta`\n\n### Snap\n\n`snap install luneta`\n\n### AUR\n\nhttps://aur.archlinux.org/packages/luneta\n\nThanks to [@al1-ce](https://github.com/al1-ce)\n\n### Precompiled binaries\n\n[Releases](https://github.com/fbeline/luneta/releases) - \nnote: `libncurses` is required.\n\n### Manual Installation\n\nPrerequisites:\n\n- [ldc](https://dlang.org/download.html)\n- [dub](https://code.dlang.org/download)\n- ncurses\n\n```bash\ngit clone https://github.com/fbeline/luneta\ncd luneta\ndub build -b release --compiler ldc2\n```\n\n## Usage\n\nSearch a command in your shell history:\n\n```bash\nfc -ln 1 | luneta\n```\n\nCheckout a git branch:\n\n```bash\ngit branch 2\u003e/dev/null | luneta | sed \"s/.* //\" | awk '{print $1}' | xargs git checkout\n```\n\nKill an active process:\n\n```bash\nps -e -o comm | luneta | xargs pkill\n```\n\nRefer to the [examples](/examples.md) for more.\n\n## Use with Vim\n\nJust paste the code bellow in your `.vimrc` to use luneta as your file seaching tool.\n\n```\n\" Run a given vim command on the results of fuzzy selecting from a given shell\n\" command. See usage below.\nfunction! LunetaCommand(choice_command, vim_command)\n  try\n    let output = system(a:choice_command . \" | luneta \")\n  catch /Vim:Interrupt/\n    \" Swallow the ^C so that the redraw below happens; otherwise there will be\n    \" leftovers from luneta on the screen\n    endtry\n    redraw!\n  if v:shell_error == 0 \u0026\u0026 !empty(output)\n    exec a:vim_command . ' ' . output\n  endif\nendfunction\n\n\" Find all files in all non-dot directories starting in the working directory.\n\" Fuzzy select one of those and open the selected file.\nnnoremap \u003cleader\u003ee :call LunetaCommand(\"find . -type f\", \":e\")\u003ccr\u003e\nnnoremap \u003cleader\u003ev :call LunetaCommand(\"find . -type f\", \":vs\")\u003ccr\u003e\nnnoremap \u003cleader\u003es :call LunetaCommand(\"find . -type f\", \":sp\")\u003ccr\u003e\n```\n\nFor better results is recommended to use tools like\n[ag](https://github.com/ggreer/the_silver_searcher),\n[rg](https://github.com/BurntSushi/ripgrep),\n[ack](https://beyondgrep.com/), etc.\n\n```\nnnoremap \u003cleader\u003ee :call LunetaCommand(\"ag . --silent -l\", \":e\")\u003ccr\u003e\nnnoremap \u003cleader\u003ev :call LunetaCommand(\"ag . --silent -l\", \":vs\")\u003ccr\u003e\nnnoremap \u003cleader\u003es :call LunetaCommand(\"ag . --silent -l\", \":sp\")\u003ccr\u003e\n```\n\n*This vimscript is a modified version of the [selecta](https://github.com/garybernhardt/selecta#use-with-vim).\n\n## Keyboard shorcuts\n\n| Key | Action |\n|-----|--------|\n| CTRL + Space | Select line and move to the next item |\n| CTRL + n | next selection  |\n| CTRL + p | previous selection  |\n| CTRL + a | beggining of the line  |\n| CTRL + e | end of the line  |\n| CTRL + u | erase all the character before and after the cursor |\n| CTRL + d | exit |\n\n## License\n\nGPL-2.0\n","funding_links":[],"categories":["Command Line","Other","\u003ca name=\"option-picker\"\u003e\u003c/a\u003eFuzzy finders and option pickers"],"sub_categories":["XML"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffbeline%2Fluneta","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffbeline%2Fluneta","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffbeline%2Fluneta/lists"}