{"id":32621995,"url":"https://github.com/kindredgroup/revolver","last_synced_at":"2026-03-17T23:08:55.519Z","repository":{"id":63738241,"uuid":"570316740","full_name":"kindredgroup/revolver","owner":"kindredgroup","description":"A library for building REPL applications.","archived":false,"fork":false,"pushed_at":"2025-06-18T23:54:14.000Z","size":42,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":8,"default_branch":"master","last_synced_at":"2026-02-24T20:50:29.805Z","etag":null,"topics":["cli","repl","shell","terminal"],"latest_commit_sha":null,"homepage":"","language":"Rust","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/kindredgroup.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":"2022-11-24T22:03:16.000Z","updated_at":"2025-06-18T23:54:17.000Z","dependencies_parsed_at":"2023-01-30T05:45:27.152Z","dependency_job_id":null,"html_url":"https://github.com/kindredgroup/revolver","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/kindredgroup/revolver","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kindredgroup%2Frevolver","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kindredgroup%2Frevolver/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kindredgroup%2Frevolver/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kindredgroup%2Frevolver/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kindredgroup","download_url":"https://codeload.github.com/kindredgroup/revolver/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kindredgroup%2Frevolver/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30635156,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-17T22:38:22.569Z","status":"ssl_error","status_checked_at":"2026-03-17T22:38:11.804Z","response_time":56,"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":["cli","repl","shell","terminal"],"created_at":"2025-10-30T19:02:03.028Z","updated_at":"2026-03-17T23:08:55.471Z","avatar_url":"https://github.com/kindredgroup.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"Revolver\n===\nA library for building REPL applications.\n\n[![Crates.io](https://img.shields.io/crates/v/revolver?style=flat-square\u0026logo=rust)](https://crates.io/crates/revolver)\n[![docs.rs](https://img.shields.io/badge/docs.rs-revolver-blue?style=flat-square\u0026logo=docs.rs)](https://docs.rs/revolver)\n[![Build Status](https://img.shields.io/github/actions/workflow/status/kindredgroup/revolver/master.yml?branch=master\u0026style=flat-square\u0026logo=github)](https://github.com/kindredgroup/revolver/actions/workflows/master.yml)\n[![codecov](https://img.shields.io/codecov/c/github/kindredgroup/revolver/master?style=flat-square\u0026logo=codecov)](https://codecov.io/gh/kindredgroup/revolver)\n\n# Concepts\n## Command\nThe `Command` trait is a specification of an executable command — the 'execute' part of a REPL application. A command will typically be accompanied by a `NamedCommandParser` implementation for converting command strings into `Command` objects.\n\n`Command`s and `NamedCommandParser`s are the only two traits that you must implement. Everything else is just configuration.\n\n### Commander\nA `Commander` decodes user input (typically a line read from a terminal interface) into a dynamic `Command` object, using a preconfigured map of `NamedCommandParser`s.\n\n### Built-in commands\nRevolver comes with two useful built-in commands that can be used out-of-the-box.\n\n* `help` — A self-help guide, outlining the available commands and how to use them.\n* `quit` — Terminates the REPL. (It only exits the loop; it does not terminate the application.)\n\nThese commands are opt-in, meaning that you must explicitly include their parsers in your `Commander` to enable them.\n\n## Terminal\nThe `Terminal` trait represents a text-based interface with the user. It fulfils the 'read' and 'print' parts of a REPL application.\n\nRevolver is currently bundled with two `Terminal` implementations:\n\n* `Streaming` — A terminal device that composes over I/O streams using `Input` and `Output` traits. Out-of-the-box adapters exist for `stdin` and `stdout` streams. Adapters may be written to interface with nonstandard streams by supplying a custom closure.\n* `Mock` — A way of mocking a terminal device for feeding input, capturing output, and performing various assertions.\n\n## Looper\n`Looper` is a mechanism for iteratively running commands based on successive user input. It fulfils the 'loop' part of a REPL application.\n\n# Getting started\n## Add dependency\n```sh\ncargo add revolver\n```\n\n## An example\nSee [`examples/calculator.rs`](examples/calculator.rs) for a simple calculator REPL. ","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkindredgroup%2Frevolver","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkindredgroup%2Frevolver","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkindredgroup%2Frevolver/lists"}