{"id":37218015,"url":"https://github.com/heavenshell/peco","last_synced_at":"2026-01-15T01:07:40.682Z","repository":{"id":17841761,"uuid":"20754660","full_name":"heavenshell/peco","owner":"heavenshell","description":"Simplistic interactive filtering tool","archived":false,"fork":true,"pushed_at":"2014-06-12T04:41:23.000Z","size":160,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-21T07:25:49.204Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"peco/peco","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/heavenshell.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}},"created_at":"2014-06-12T04:33:14.000Z","updated_at":"2014-06-12T04:41:23.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/heavenshell/peco","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/heavenshell/peco","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heavenshell%2Fpeco","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heavenshell%2Fpeco/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heavenshell%2Fpeco/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heavenshell%2Fpeco/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/heavenshell","download_url":"https://codeload.github.com/heavenshell/peco/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heavenshell%2Fpeco/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28441015,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-15T00:55:22.719Z","status":"ssl_error","status_checked_at":"2026-01-15T00:55:20.945Z","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":[],"created_at":"2026-01-15T01:07:39.967Z","updated_at":"2026-01-15T01:07:40.654Z","avatar_url":"https://github.com/heavenshell.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"peco\n======\n\nSimplistic interfacting filtering tool\n\nDescription\n===========\n\npeco is based on [percol](https://github.com/mooz/percol). The idea is that percol was darn useful, but I wanted a tool that was a single binary. peco is written in Go, and as of this writing only implements the basic filtering feature (mainly because that's the only thing I use -- you're welcome to send me pull requests to make peco more compatible with percol).\n\npeco can be a great tool to filter stuff like logs, process stats, find files, because unlike grep, you can type as you think and look through the current results.\n\n## Demo\n\nDemos speak more than a thousand words! Here's me looking for a process on my mac. As you can see, you can page through your results, and you can keep changing the query:\n\n![optimized](http://lestrrat.github.io/peco/peco-demo-ps.gif)\n\nHere's me trying to figure out which file to open:\n\n![optimized](http://lestrrat.github.io/peco/peco-demo-filename.gif)\n\nWhen you combine tools like zsh, peco, and [ghq](https://github.com/motemen/ghq), you can make managing/moving around your huge dev area a piece of cake! (this example doesn't use zsh functions so you can see what I'm doing)\n\n![optimized](http://lestrrat.github.io/peco/peco-demo-ghq.gif)\n\n\nFeatures\n========\n\n## Incremental search\n\nSearch results are filtered as you type. This is great to drill down to the\nline you are looking for\n\nMultiple terms turn the query into an \"AND\" query:\n\n![optimized](https://cloud.githubusercontent.com/assets/554281/3241419/d5fccc5c-f13c-11e3-898b-280a246b083c.gif)\n\nWhen you find that line that you want, press enter, and the resulting line\nis printed to stdout, which allows you to pipe it to other tools\n\n## Works on Windows!\n\nI have been told that peco even works on windows :)\n\nInstallation\n============\n\nIf you just want the command:\n\n```\ngo install github.com/lestrrat/peco/cmd/peco/\n```\n\nIf you want the source code:\n\n```\ngo get github.com/lestrrat/peco\n```\n\nUsage\n=====\n\nIf you can read Japanese, [here's one cool usage](http://blog.kentarok.org/entry/2014/06/03/135300) using [ghq](https://github.com/motemen/ghq)\n\nBasically, you can define a simple function to easily move around your source code tree:\n\n```zsh\nfunction peco-src () {\n    local selected_dir=$(ghq list --full-path | peco --query \"$LBUFFER\")\n    if [ -n \"$selected_dir\" ]; then\n        BUFFER=\"cd ${selected_dir}\"\n        zle accept-line\n    fi    \n    zle clear-screen\n}         \nzle -N peco-src\n```\n\nOr to easily navigate godoc for your local stuff:\n\n```zsh\nfunction peco-godoc() { \n    local selected_dir=$(ghq list --full-path | peco --query \"$LBUFFER\")\n    if [ -n \"$selected_dir\" ]; then\n        BUFFER=\"godoc ${selected_dir} | less\"\n        zle accept-line \n    fi \n    zle clear-screen \n}\n    \nzle -N peco-godoc \n```\n\nCommand Line Options\n====================\n\n### --help\n\nDisplay a help message\n\n### --query \u003cquery\u003e\n\nSpecifies the default query to be used upon startup. This is useful for scripts and functions where you can figure out before hand what the most likely query string is.\n\n### --rcfile \u003cfilename\u003e\n\nPass peco a configuration file, which currently must be a JSON file. If unspecified, it will read ~/.peco/config.json by default (if available)\n\nConfiguration File\n==================\n\nBy default configuration file in ~/.peco/config.json will be searched. You may\nalso pass an arbitrary filename via the --rcfile option\n\nCurrently only keymaps are supported:\n\n```json\n{\n    \"Keymap\": {\n        \"C-p\": \"peco.SelectPrevious\",\n        \"C-n\": \"peco.SelectNext\"\n    }\n}\n```\n\n## Available keys:\n\n| Name        | Notes |\n|-------------|-------|\n| C-a ... C-z | Control + whatever character |\n| C-1 ... C-8 | Control + 1..8 |\n| C-[         ||\n| C-]         ||\n| C-~         ||\n| C-\\_        ||\n| C-\\\\\\\\      | Note that you need to escape the backslash |\n| C-/         ||\n| Esc         ||\n| Tab         ||\n| Insert      ||\n| Delete      ||\n| Home        ||\n| End         ||\n| Pgup        ||\n| Pgdn        ||\n| ArrowUp     ||\n| ArrowDown   ||\n| ArrowLeft   ||\n| ArrowRight  ||\n\n## Available actions\n\n| Name | Notes |\n|------|-------|\n| peco.ForwardChar        | Move caret forward 1 character |\n| peco.BackwardChar       | Move caret backward 1 character |\n| peco.ForwardWord        | Move caret forward 1 word |\n| peco.BackwardWord       | Move caret backward 1 word|\n| peco.BeginnigOfLine     | Move caret to the beginning of line |\n| peco.EndOfLine          | Move caret to the end of line |\n| peco.DeleteForwardChar  | Delete one character forward |\n| peco.DeleteBackwardChar | Delete one character backward |\n| peco.DeleteForwardWord  | Delete one word forward |\n| peco.DeleteBackwardWord | Delete one word backward |\n| peco.KillEndOfLine      | Delete the characters under the cursor until the end of the line |\n| peco.DeleteAll          | Delete all entered characters |\n| peco.SelectPreviousPage | Jumps to previous page |\n| peco.SelectNextPage     | Jumps to next page|\n| peco.SelectPrevious     | Selects previous line |\n| peco.SelectNext         | Selects next line |\n| peco.Finish             | Exits from peco, with success status |\n| peco.Cancel             | Exits from peco, with failure status |\n\nTODO\n====\n\nTest it. In doing so, we may change the repo structure\n\nImplement all(?) of the original percol options\n\nNotes\n=====\n\nObviously, kudos to the original percol: https://github.com/mooz/percol\nMuch code stolen from https://github.com/mattn/gof\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fheavenshell%2Fpeco","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fheavenshell%2Fpeco","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fheavenshell%2Fpeco/lists"}