{"id":13611749,"url":"https://github.com/facebookincubator/superconsole","last_synced_at":"2025-04-13T05:33:36.106Z","repository":{"id":39631911,"uuid":"440262866","full_name":"facebookincubator/superconsole","owner":"facebookincubator","description":"The superconsole crate provides a handler and building blocks for powerful, yet minimally intrusive TUIs.  It is cross platform, supporting Windows 7+, Linux, and MacOS.  Rustaceans who want to create non-interactive TUIs can use the component composition building block system to quickly deploy their code.","archived":false,"fork":false,"pushed_at":"2025-04-09T21:22:25.000Z","size":6709,"stargazers_count":496,"open_issues_count":1,"forks_count":15,"subscribers_count":28,"default_branch":"main","last_synced_at":"2025-04-09T22:26:01.763Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Rust","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/facebookincubator.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE-APACHE","code_of_conduct":"CODE_OF_CONDUCT.md","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":"2021-12-20T18:03:32.000Z","updated_at":"2025-04-09T21:22:28.000Z","dependencies_parsed_at":"2024-01-10T08:23:32.090Z","dependency_job_id":"c3931bbe-67e2-49fc-ad90-6dd27ba04b35","html_url":"https://github.com/facebookincubator/superconsole","commit_stats":{"total_commits":140,"total_committers":21,"mean_commits":6.666666666666667,"dds":0.5785714285714285,"last_synced_commit":"5a07ddcd98bd14817e09471634362ee1d4c9a278"},"previous_names":[],"tags_count":165,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/facebookincubator%2Fsuperconsole","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/facebookincubator%2Fsuperconsole/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/facebookincubator%2Fsuperconsole/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/facebookincubator%2Fsuperconsole/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/facebookincubator","download_url":"https://codeload.github.com/facebookincubator/superconsole/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248670513,"owners_count":21142896,"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":[],"created_at":"2024-08-01T19:02:04.335Z","updated_at":"2025-04-13T05:33:31.097Z","avatar_url":"https://github.com/facebookincubator.png","language":"Rust","funding_links":[],"categories":["Rust","Projects"],"sub_categories":[],"readme":"# A component-based framework for building Rust Text-based User Interfaces (TUIs)\n\nThere are several copies of this repo on GitHub,\n[facebookincubator/superconsole](https://github.com/facebookincubator/superconsole)\nis the canonical one.\n\nThe superconsole framework provides a powerful line based abstraction over text\nbased rendering to the terminal. It also provides basic building blocks like\nline manipulation, and a higher level of composable components. A base set of\n\"batteries\" components are included to help developers create Text-based User\nInterfaces (TUIs) as quickly as possible.\n\nThe design choices that underly superconsole are selected to prioritize\ntestability, ease of composition, and flexibility.\n\nSuperconsole also offers stylization, including italics, underlining, bolding,\nand coloring text. Furthermore, relying on crossterm ensures that it is\ncompatible with Windows, Unix, and MacOS.\n\nFinally, superconsole delineates between rendering logic and program state -\neach render call accepts an immutable reference to state, which components may\nuse to inject state into their otherwise immutable rendering logic.\n\n## Demo\n\n![Superconsole running some buck2 tests](demo.gif)\n\n## Examples\n\n```rust\nuse superconsole::components::bordering::{Bordered, BorderedSpec};\nuse superconsole::{Component, Dimensions, DrawMode, Lines, SuperConsole};\n\n#[derive(Debug)]\nstruct HelloWorld;\n\nimpl Component for HelloWorld {\n    fn draw_unchecked(\u0026self, _dimensions: Dimensions, _mode: DrawMode) -\u003e anyhow::Result\u003cLines\u003e {\n        Ok(Lines(vec![\n            vec![\"Hello world!\".to_owned()].try_into().unwrap(),\n        ]))\n    }\n}\n\npub fn main() -\u003e anyhow::Result\u003c()\u003e {\n    let bordering = BorderedSpec::default();\n    let mut superconsole = SuperConsole::new().ok_or_else(|| anyhow::anyhow!(\"Not a TTY\"))?;\n    let component = Bordered::new(HelloWorld, bordering);\n    superconsole.render(\u0026component)?;\n    superconsole.finalize(\u0026component)?;\n    Ok(())\n}\n```\n\nSee the [CONTRIBUTING](CONTRIBUTING.md) file for how to help out.\n\n## License\n\nSuperconsole is both MIT and Apache License, Version 2.0 licensed, as found in\nthe [LICENSE-MIT](LICENSE-MIT) and [LICENSE-APACHE](LICENSE-APACHE) files.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffacebookincubator%2Fsuperconsole","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffacebookincubator%2Fsuperconsole","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffacebookincubator%2Fsuperconsole/lists"}