{"id":25908115,"url":"https://github.com/bonnyad9/termal","last_synced_at":"2025-08-20T16:09:41.931Z","repository":{"id":191230115,"uuid":"684212029","full_name":"BonnyAD9/termal","owner":"BonnyAD9","description":"Rust library for fancy colored cli using ansi codes","archived":false,"fork":false,"pushed_at":"2025-02-28T09:31:26.000Z","size":1129,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-28T20:58:20.852Z","etag":null,"topics":["ansi-codes","cli","rust","rust-library","terminal"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/BonnyAD9.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2023-08-28T17:19:18.000Z","updated_at":"2025-02-28T09:31:30.000Z","dependencies_parsed_at":"2024-05-08T20:41:39.631Z","dependency_job_id":"15e2630a-dd05-4ca6-b00f-fc66df0a8211","html_url":"https://github.com/BonnyAD9/termal","commit_stats":null,"previous_names":["bonnyad9/termal"],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BonnyAD9%2Ftermal","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BonnyAD9%2Ftermal/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BonnyAD9%2Ftermal/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BonnyAD9%2Ftermal/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BonnyAD9","download_url":"https://codeload.github.com/BonnyAD9/termal/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241622597,"owners_count":19992505,"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":["ansi-codes","cli","rust","rust-library","terminal"],"created_at":"2025-03-03T07:17:04.013Z","updated_at":"2025-07-27T07:39:08.637Z","avatar_url":"https://github.com/BonnyAD9.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Termal\n[![crates.io][version-badge]][crate]\n[![donwloads][downloads-badge]][releases]\n\nRust library for terminal features.\n\n## RAW terminal support\n- Unix (linux)\n- Windows (not tested)\n\n## Example\n### With macro\n```rust\nuse termal::*;\n\n// you can use a special macro to inline the color codes, this will write\n// italic text with yellow foreground and reset at the end.\nprintcln!(\"{'yellow italic}hello{'reset}\");\n\n// the macro also supports standard formatting\nprintcln!(\"{'yellow italic}{}{'reset}\", \"hello\");\n\n// you can also use short versions of the codes\nprintcln!(\"{'y i}{}{'_}\", \"hello\");\n\n// you can also use true colors with their hex codes\nprintcln!(\"{'#dd0 i}{}{'_}\", \"hello\");\n```\n\n### Without macro\n```rust\n// Move cursor to position column 5 on line 7 and write 'hello' in italic\n// yellow\n\nuse termal::codes::*;\n\nprintln!(\"{}{YELLOW_FG}{ITALIC}hello{RESET}\", move_to!(5, 7));\n```\n\nThe macros such as `move_to!` can accept either literals or dynamic values.\nIts main feature is that if you supply literals, it expands to a string\nliteral with the ansi code.\nIf you however supply dynamic values it expands to a `format!` macro:\n```rust\nuse termal::codes::*;\n\nlet a = move_to!(5, 7);\n// expands to:\nlet a = \"\\x1b[5;7H\";\n\nlet b = move_to!(2 + 3, 7);\n// expands to:\nlet b = format!(\"\\x1b[{};{}H\", 2 + 3, 7);\n```\n\nIf you know the values for the arguments you can also use the `*c` macros:\n```rust\nuse termal::formatc;\n\n// the spaces, or the lack of them is important\nlet a = formatc!(\"{'move_to5,7}\");\n```\n\n### Gradients\nYoun can create gradients with the function `termal::gradient`:\n```rust\nuse termal::*;\n\n// This will create foreground gradient from the rgb color `(250, 50, 170)`\n// to the rgb color `(180, 50, 240)`\nprintcln!(\"{}{'_}\", gradient(\"BonnyAD9\", (250, 50, 170), (180, 50, 240)));\n```\n\n## How to use it\nTo see all the possible commands and uses see [docs][docs].\n\n## How to get it\nIt is available on [crates.io][crate]:\n\n### With cargo\n```shell\ncargo add termal\n```\n\n### In Cargo.toml\n```toml\n[dependencies]\ntermal = \"2.1.1\"\n```\n\n### Features\n+ `raw`: enable features for raw terminal.\n- `term_image`: enables functionality for drawing images to terminal.\n- `image`: enables `term_image` and dependency for `image` with impl for\n  `Image` trait.\n- `term_text`: enable features for basic parsing of ansi escape codes.\n- `all`: enable all features.\n\n## Links\n- **Author:** [BonnyAD9][author]\n- **GitHub repository:** [BonnyAD/raplay][repo]\n- **Package:** [crates.io][crate]\n- **Documentation:** [docs.rs][docs]\n- **My Website:** [bonnyad9.github.io][my-web]\n\n[version-badge]: https://img.shields.io/crates/v/termal\n[downloads-badge]: https://img.shields.io/crates/d/termal\n[crate]: https://crates.io/crates/termal\n[author]: https://github.com/BonnyAD9\n[repo]: https://github.com/BonnyAD9/termal\n[docs]: https://docs.rs/termal/latest/termal/\n[my-web]: https://bonnyad9.github.io/\n[releases]: https://github.com/BonnyAD9/termal/releases\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbonnyad9%2Ftermal","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbonnyad9%2Ftermal","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbonnyad9%2Ftermal/lists"}