{"id":15592048,"url":"https://github.com/derhuerst/tiny-cli-editor","last_synced_at":"2025-04-15T05:14:54.070Z","repository":{"id":66219607,"uuid":"79596883","full_name":"derhuerst/tiny-cli-editor","owner":"derhuerst","description":"A nano-like command line editor.","archived":false,"fork":false,"pushed_at":"2018-10-22T10:35:18.000Z","size":11,"stargazers_count":14,"open_issues_count":0,"forks_count":6,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-08T22:23:52.568Z","etag":null,"topics":["cli","editor","prompt"],"latest_commit_sha":null,"homepage":"https://github.com/derhuerst/tiny-cli-editor","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/derhuerst.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"license.md","code_of_conduct":null,"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}},"created_at":"2017-01-20T20:47:10.000Z","updated_at":"2024-07-19T13:25:09.000Z","dependencies_parsed_at":"2023-04-08T19:05:55.702Z","dependency_job_id":null,"html_url":"https://github.com/derhuerst/tiny-cli-editor","commit_stats":{"total_commits":8,"total_committers":1,"mean_commits":8.0,"dds":0.0,"last_synced_commit":"57dd6ba26018136cda754123ee44a0fdc22bba43"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/derhuerst%2Ftiny-cli-editor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/derhuerst%2Ftiny-cli-editor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/derhuerst%2Ftiny-cli-editor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/derhuerst%2Ftiny-cli-editor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/derhuerst","download_url":"https://codeload.github.com/derhuerst/tiny-cli-editor/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249010212,"owners_count":21197797,"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","editor","prompt"],"created_at":"2024-10-02T23:53:36.489Z","updated_at":"2025-04-15T05:14:54.054Z","avatar_url":"https://github.com/derhuerst.png","language":"JavaScript","funding_links":["https://patreon.com/derhuerst"],"categories":[],"sub_categories":[],"readme":"# tiny-cli-editor\n\n**A nano-like command line editor.** Really basic, but very lightweight. Can be used as a programmatically from JS.\n\n[![asciicast](https://asciinema.org/a/100110.png)](https://asciinema.org/a/100110)\n\nThe following features are missing, but I'd like to implement them in the future:\n\n- copy to clipboard, paste from it\n- ask for confirmation on `ctrl+c`\n\nI won't implement these features:\n\n- syntax highlighting\n- panels/bars/overlays\n- mouse support\n- plugin system\n\n[![npm version](https://img.shields.io/npm/v/tiny-cli-editor.svg)](https://www.npmjs.com/package/tiny-cli-editor)\n[![dependency status](https://img.shields.io/david/derhuerst/tiny-cli-editor.svg)](https://david-dm.org/derhuerst/tiny-cli-editor)\n![ISC-licensed](https://img.shields.io/github/license/derhuerst/tiny-cli-editor.svg)\n[![chat on gitter](https://badges.gitter.im/derhuerst.svg)](https://gitter.im/derhuerst)\n[![support me on Patreon](https://img.shields.io/badge/support%20me-on%20patreon-fa7664.svg)](https://patreon.com/derhuerst)\n\n*tiny-cli-editor* uses [*prompt-skeleton*](https://github.com/derhuerst/prompt-skeleton) to have a behavior consistent with [other prompts](https://github.com/derhuerst/prompt-skeleton#prompts-using-prompt-skeleton).\n\n\n## Installing\n\n```shell\nnpm install tiny-cli-editor # to use it as a library\nnpm install -g tiny-cli-editor # to use it from the shell\n```\n\n\n## Usage\n\n```shell\neditor index.js\n```\n\n`Ctrl + C` to abort, `Ctrl + D` to save the file.\n\nTo use *tiny-cli-editor* programmatically:\n\n```js\nconst editor = require('tiny-cli-editor')\n\neditor('Hello this is dog.')\n.on('data', (text) =\u003e {\n\t// do something with the text\n})\n.on('abort', (text) =\u003e {\n\t// do something with the text\n})\n.on('submit', (text) =\u003e {\n\t// do something with the text\n})\n```\n\n\n## Related\n\n- [`date-prompt`](https://github.com/derhuerst/date-prompt)\n- [`mail-prompt`](https://github.com/derhuerst/mail-prompt)\n- [`multiselect-prompt`](https://github.com/derhuerst/multiselect-prompt)\n- [`number-prompt`](https://github.com/derhuerst/number-prompt)\n- [`range-prompt`](https://github.com/derhuerst/range-prompt)\n- [`select-prompt`](https://github.com/derhuerst/select-prompt)\n- [`text-prompt`](https://github.com/derhuerst/text-prompt)\n- [`tree-select-prompt`](https://github.com/derhuerst/tree-select-prompt)\n- [`cli-autocomplete`](https://github.com/derhuerst/cli-autocomplete)\n- [`switch-prompt`](https://github.com/derhuerst/switch-prompt)\n\n\n## Contributing\n\nIf you **have a question**, **found a bug** or want to **propose a feature**, have a look at [the issues page](https://github.com/derhuerst/location/issues).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fderhuerst%2Ftiny-cli-editor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fderhuerst%2Ftiny-cli-editor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fderhuerst%2Ftiny-cli-editor/lists"}