{"id":18351385,"url":"https://github.com/saehun/node-peco","last_synced_at":"2025-08-21T07:45:50.345Z","repository":{"id":39703152,"uuid":"302995640","full_name":"saehun/node-peco","owner":"saehun","description":"peco(https://github.com/peco/peco) nodejs binding library","archived":false,"fork":false,"pushed_at":"2023-01-06T15:12:59.000Z","size":506,"stargazers_count":5,"open_issues_count":8,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-20T19:10:12.583Z","etag":null,"topics":["cli","command-line","fuzzy-search","nodejs","peco","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/saehun.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":"2020-10-10T21:50:11.000Z","updated_at":"2023-03-07T14:51:31.000Z","dependencies_parsed_at":"2023-02-06T05:45:55.473Z","dependency_job_id":null,"html_url":"https://github.com/saehun/node-peco","commit_stats":{"total_commits":62,"total_committers":3,"mean_commits":"20.666666666666668","dds":"0.11290322580645162","last_synced_commit":"7d02a7ca25ba9a81b79185c8a75c6dab99d5f326"},"previous_names":["saehun/node-peco","minidonut/node-peco"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/saehun/node-peco","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saehun%2Fnode-peco","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saehun%2Fnode-peco/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saehun%2Fnode-peco/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saehun%2Fnode-peco/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/saehun","download_url":"https://codeload.github.com/saehun/node-peco/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saehun%2Fnode-peco/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262619867,"owners_count":23338350,"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","fuzzy-search","nodejs","peco","typescript"],"created_at":"2024-11-05T21:30:42.750Z","updated_at":"2025-06-29T15:35:27.113Z","avatar_url":"https://github.com/saehun.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Node Peco\n[peco](https://github.com/peco/peco) nodejs binding library\n\n\u003e NOTE: external command `peco` is required. see [peco installation](https://github.com/peco/peco#installation)\n\n![NPM](https://img.shields.io/npm/l/node-peco)\n![github ci](https://github.com/minidonut/node-peco/workflows/CI/badge.svg)\n[![npm](https://img.shields.io/npm/v/node-peco)](https://www.npmjs.com/package/node-peco)\n![npm bundle size](https://img.shields.io/bundlephobia/minzip/node-peco?label=size)\n\n\u003cimg alt=\"example\" src=\"https://user-images.githubusercontent.com/16033316/113511665-eb97dd80-959b-11eb-8929-38088da5af17.gif\" width=\"640\" /\u003e\n\n## Installation\n```\nyarn add node-peco\n```\n\n## Usage\nThis package exports only one function named `peco`.\n```ts\nimport { peco } from 'node-peco'; // or require('node-peco');\n\npeco(['foo', 'bar', 'baz']).then(selected =\u003e console.log(selected));\n```\n\nYou can pass option as a second argument\n```ts\nimport { peco, PecoOption } from 'node-peco';\n\nconst pecoOption: PecoOption = {\n  onCancel: 'reject',\n  layout: 'bottom-up',\n  selectionPrefix: '*',\n  prompt: \"Choose -\u003e\",\n};\n\npeco(['foo', 'bar', 'baz'], pecoOption).then(selected =\u003e console.log(selected));\n```\n\nfor more examples, see [examples](https://github.com/minidonut/node-peco/tree/master/examples)\n\n## Option\n\nThere are two categories of option. One is **js** dependent:\n\nkey | type | description | default\n--- | ---- | ----------- | -------\n`bin` | string | peco binary command(or location path) | `\"peco\"`\n`onCancel` | `\"reject\" \\| \"skip\"` | specify behavior when received `SIGINT` | `\"skip\"`\n`onError` | `\"reject\" \\| \"exit\"` | specify behavior when `peco` exited with non-zero code | `\"exit\"`\n\nThe other is `peco` command line option. See [peco#command-line-options](https://github.com/peco/peco#command-line-options)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsaehun%2Fnode-peco","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsaehun%2Fnode-peco","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsaehun%2Fnode-peco/lists"}