{"id":13410613,"url":"https://github.com/reeflective/readline","last_synced_at":"2026-01-17T22:58:07.000Z","repository":{"id":57536666,"uuid":"283854852","full_name":"reeflective/readline","owner":"reeflective","description":"Shell library with powerful and modern UI, large feature set, and `.inputrc` support","archived":false,"fork":false,"pushed_at":"2025-02-11T20:34:08.000Z","size":17694,"stargazers_count":107,"open_issues_count":3,"forks_count":12,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-03-05T22:59:16.852Z","etag":null,"topics":["console","go","golang","inputrc","readline","shell","terminal","vim","vim-mode"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/reeflective.png","metadata":{"files":{"readme":"README.md","changelog":"history.go","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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-07-30T18:59:07.000Z","updated_at":"2025-03-03T18:56:22.000Z","dependencies_parsed_at":"2023-11-23T15:30:59.585Z","dependency_job_id":"cf7dd5c1-40b2-4bf5-8d7d-90604063b039","html_url":"https://github.com/reeflective/readline","commit_stats":null,"previous_names":["maxlandon/readline"],"tags_count":28,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reeflective%2Freadline","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reeflective%2Freadline/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reeflective%2Freadline/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reeflective%2Freadline/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/reeflective","download_url":"https://codeload.github.com/reeflective/readline/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243610298,"owners_count":20318937,"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":["console","go","golang","inputrc","readline","shell","terminal","vim","vim-mode"],"created_at":"2024-07-30T20:01:07.951Z","updated_at":"2026-01-17T22:58:06.988Z","avatar_url":"https://github.com/reeflective.png","language":"Go","readme":"\u003cdiv align=\"center\"\u003e\n  \u003cbr\u003e \u003ch1\u003e Readline \u003c/h1\u003e\n\u003c/div\u003e\n\n\u003c!-- Badges --\u003e\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/reeflective/readline/actions/workflows/go.yml\"\u003e\n    \u003cimg src=\"https://github.com/reeflective/readline/actions/workflows/go.yml/badge.svg?branch=master\"\n      alt=\"Github Actions (workflows)\" /\u003e\n  \u003c/a\u003e\n\n  \u003ca href=\"https://github.com/reeflective/readline\"\u003e\n    \u003cimg src=\"https://img.shields.io/github/go-mod/go-version/reeflective/readline.svg\"\n      alt=\"Go module version\" /\u003e\n  \u003c/a\u003e\n\n  \u003ca href=\"https://pkg.go.dev/github.com/reeflective/readline\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/godoc-reference-blue.svg\"\n      alt=\"GoDoc reference\" /\u003e\n  \u003c/a\u003e\n\n  \u003ca href=\"https://goreportcard.com/report/github.com/reeflective/readline\"\u003e\n    \u003cimg src=\"https://goreportcard.com/badge/github.com/reeflective/readline\"\n      alt=\"Go Report Card\" /\u003e\n  \u003c/a\u003e\n\n  \u003ca href=\"https://codecov.io/gh/reeflective/readline\"\u003e\n    \u003cimg src=\"https://codecov.io/gh/reeflective/readline/branch/master/graph/badge.svg\"\n      alt=\"codecov\" /\u003e\n  \u003c/a\u003e\n\n  \u003ca href=\"https://opensource.org/licenses/BSD-3-Clause\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/License-BSD_3--Clause-blue.svg\"\n      alt=\"License: BSD-3\" /\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\nThis library is a modern, pure Go `readline` shell implementation, with full `.inputrc` and legacy\nreadline command/option support, and extended with various commands, options and tools commonly\nfound in modern shells. Its architecture and completion system is heavily inspired from Z-Shell.\nIt is used, between others, to power the [console](https://github.com/reeflective/console) library.\n\n## Features\n\n### Core\n\n- Pure Go, almost-only standard library\n- Cross-platform (Linux / MacOS / Windows)\n- Full `.inputrc` support (all commands/options)\n- Extensive test suite and almost full coverage of core code\n- [Extended list](https://github.com/reeflective/readline/wiki/Keymaps-\u0026-Commands) of additional commands/options (edition/completion/history)\n- Complete [multiline edition/movement support](https://github.com/reeflective/readline/wiki/Multiline)\n- Command-line edition in `$EDITOR`/`$VISUAL` support\n- [Programmable API](https://github.com/reeflective/readline/wiki/Programmable-Commands), with failure-safe access to core components\n- Support for an [arbitrary number of history sources](https://github.com/reeflective/readline/wiki/History-Sources)\n\n### Emacs / Standard\n\n- Native Emacs commands\n- Emacs-style [macro engine](https://github.com/reeflective/readline/wiki/Macros#emacs) (not working across multiple calls)\n- Keywords [switching](https://github.com/reeflective/readline/wiki/Keymaps-\u0026-Commands#modifying-text) (operators, booleans, hex/binary/digit) with iterations\n- Command/mode cursor status indicator\n- Complete undo/redo history\n- Command status/arg/iterations hint display\n\n### Vim\n\n- Near-native Vim mode\n- Vim [text objects](https://github.com/reeflective/readline/wiki/Keymaps-\u0026-Commands#text-objects) (code blocks, words/blank/shellwords)\n- Extended surround select/change/add functionality, with highlighting\n- Vim Visual/Operator pending mode \u0026 cursor styles indications\n- Vim Insert and Replace (once/many)\n- All Vim registers, with completion support\n- [Vim-style](https://github.com/reeflective/readline/wiki/Macros#vim) macro recording (`q\u003ca\u003e`) and invocation (`@\u003ca\u003e`)\n\n### Interface\n\n- Support for PS1/PS2/RPROMPT/transient/tooltip [prompts](https://github.com/reeflective/readline/wiki/Prompts) (compatible with [oh-my-posh](https://github.com/JanDeDobbeleer/oh-my-posh))\n- Extended completion system, [keymap-based and configurable](https://github.com/reeflective/readline/wiki/Keymaps-\u0026-Commands#completion), easy to populate \u0026 use\n- Multiple completion display styles, with color support.\n- Completion \u0026 History incremental search system \u0026 highlighting (fuzzy-search).\n- Automatic \u0026 context-aware suffix removal for efficient flags/path/list completion.\n- Optional asynchronous autocomplete\n- Builtin \u0026 programmable [syntax highlighting](https://github.com/reeflective/readline/wiki/Syntax-Highlighting)\n\n## Documentation\n\nReadline is used by the [console library](https://github.com/reeflective/console) and its [example binary](https://github.com/reeflective/console/tree/main/example). To get a grasp of the\nfunctionality provided by readline and its default configuration, install and start the binary.\n\nThe documentation is available on the [repository wiki](https://github.com/reeflective/readline/wiki), for both users and developers.\n\n## Showcases\n\n\u003cdetails\u003e\n  \u003csummary\u003e- Emacs edition\u003c/summary\u003e\n \u003cdd\u003e\u003cem\u003e(This extract is quite a pity, because its author is not using Emacs and does not know many of its shortcuts)\u003c/em\u003e\u003c/dd\u003e\n\u003cimg src=\"https://github.com/reeflective/readline/blob/assets/emacs.gif\"/\u003e\n\u003c/details\u003e\n\u003cdetails\u003e\n  \u003csummary\u003e- Vim edition\u003c/summary\u003e\n\u003cimg src=\"https://github.com/reeflective/readline/blob/assets/vim.gif\"/\u003e\n\u003c/details\u003e\n\u003cdetails\u003e\n  \u003csummary\u003e- Undo/redo line history \u003c/summary\u003e\n\u003cimg src=\"https://github.com/reeflective/readline/blob/assets/undo.gif\"/\u003e\n\u003c/details\u003e\n\u003cdetails\u003e\n  \u003csummary\u003e- Keyword switching \u0026 selection \u003c/summary\u003e\n \u003cdd\u003e\u003cem\u003eSwitching various keywords\u003c/em\u003e\u003c/dd\u003e\n\u003cimg src=\"https://github.com/reeflective/readline/blob/assets/switch-keywords.gif\"/\u003e\n \u003cdd\u003e\u003cem\u003eUsing regexp-based selection to grab parts of words (here, URL components)\u003c/em\u003e\u003c/dd\u003e\n\u003cimg src=\"https://github.com/reeflective/readline/blob/assets/select-keywords.gif\"/\u003e\n\u003c/details\u003e\n\u003cdetails\u003e\n  \u003csummary\u003e- Vim selection \u0026 movements (basic) \u003c/summary\u003e\n\u003cimg src=\"https://github.com/reeflective/readline/blob/assets/vim-selection.gif\"/\u003e\n\u003c/details\u003e\n\u003cdetails\u003e\n  \u003csummary\u003e- Vim surround (selection and change) \u003c/summary\u003e\n \u003cdd\u003e\u003cem\u003eSelecting/adding/changing surround regions\u003c/em\u003e\u003c/dd\u003e\n\u003cimg src=\"https://github.com/reeflective/readline/blob/assets/vim-surround.gif\"/\u003e\n \u003cdd\u003e\u003cem\u003eSurround and change in shellwords, matching brackets, etc.\u003c/em\u003e\u003c/dd\u003e\n\u003cimg src=\"https://github.com/reeflective/readline/blob/assets/vim-surround-2.gif\"/\u003e\n\u003c/details\u003e\n\u003cdetails\u003e\n  \u003csummary\u003e- Vim registers (with completion) \u003c/summary\u003e\n\u003cimg src=\"https://github.com/reeflective/readline/blob/assets/registers.gif\"/\u003e\n\u003c/details\u003e\n\u003cdetails\u003e\n  \u003csummary\u003e- History movements/completion/use/search \u003c/summary\u003e\n \u003cdd\u003e\u003cem\u003eHistory movement, completion and some other other widgets\u003c/em\u003e\u003c/dd\u003e\n\u003cimg src=\"https://github.com/reeflective/readline/blob/assets/history.gif\"/\u003e\n\u003c/details\u003e\n\u003cdetails\u003e\n  \u003csummary\u003e- Completion \u003c/summary\u003e\n \u003cdd\u003e\u003cem\u003eClassic mode \u0026 incremental search mode\u003c/em\u003e\u003c/dd\u003e\n\u003cimg src=\"https://github.com/reeflective/readline/blob/assets/completion.gif\"/\u003e\n \u003cdd\u003e\u003cem\u003eSuffix-autoremoval \u003c/em\u003e\u003c/dd\u003e\n\u003cimg src=\"https://github.com/reeflective/readline/blob/assets/suffix-autoremoval.gif\"/\u003e\n\u003c/details\u003e\n\u003cdetails\u003e\n  \u003csummary\u003e- Prompts \u003c/summary\u003e\n\u003cimg src=\"https://github.com/reeflective/readline/blob/assets/prompts.gif\"/\u003e\n\u003c/details\u003e\n\u003cdetails\u003e\n  \u003csummary\u003e- Logging \u003c/summary\u003e\n\u003cimg src=\"https://github.com/reeflective/readline/blob/assets/logging.gif\"/\u003e\n\u003c/details\u003e\n\u003cdetails\u003e\n  \u003csummary\u003e- Inputrc init file reload \u003c/summary\u003e\n\u003cimg src=\"https://github.com/reeflective/readline/blob/assets/config-reload.gif\"/\u003e\n\u003c/details\u003e\n\u003cdetails\u003e\n  \u003csummary\u003e- Multiline edition \u003c/summary\u003e\n\u003cimg src=\"https://github.com/reeflective/readline/blob/assets/multiline.gif\"/\u003e\n\u003c/details\u003e\n\u003cdetails\u003e\n  \u003csummary\u003e- Macros \u003c/summary\u003e\n \u003cdd\u003e\u003cem\u003eEmacs\u003c/em\u003e\u003c/dd\u003e\n\u003cimg src=\"https://github.com/reeflective/readline/blob/assets/emacs-macros.gif\"/\u003e\n \u003cdd\u003e\u003cem\u003eVim\u003c/em\u003e\u003c/dd\u003e\n\u003cimg src=\"https://github.com/reeflective/readline/blob/assets/vim-macros.gif\"/\u003e\n\u003c/details\u003e\n\n## Status\n\nThis library is now in a release status, as it has underwent several major rewrites and is now considered mostly\nfeature-complete, with a solid testing suite to ensure safe and smooth operation to the best extent possible.\nNew releases will be regularly pushed when bugs are found and corrected.\n\nAdditionally:\n\n- Key dispatch/flushing, meta-key enable, etc might still contain some bugs/wrong behavior:\n  30 years of legacy support for 3000 different terminal emulators cannot be done right by me alone.\n- Please open a PR or an issue if you face any bug, and it will be promptly resolved.\n- Don't hesitate proposing a new feature or a PR if you deem it to be useful to most users.\n\n## Credits\n\n- @kenshaw for his `.inputrc` parsing package, which brings much wider compatibility to this library.\n- `chzyer/readline` for the Windows I/O code and everything related.\n- Some of the Vim code is inspired or translated from [zsh-vi-mode](https://github.com/jeffreytse/zsh-vi-mode).\n- [lmorg/readline](https://github.com/lmorg/readline), for the line tokenizers.\n","funding_links":[],"categories":["Command Line","Build Automation","命令行"],"sub_categories":["Standard CLI","标准CLI"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freeflective%2Freadline","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Freeflective%2Freadline","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freeflective%2Freadline/lists"}