{"id":26234947,"url":"https://github.com/mutokrm/cli_animate","last_synced_at":"2025-12-24T17:50:28.949Z","repository":{"id":203118009,"uuid":"708335497","full_name":"mutokrm/cli_animate","owner":"mutokrm","description":"Enrich your Rust CLIs with stunning, easy-to-implement animations. Thanks for over 1,000 downloads!","archived":false,"fork":false,"pushed_at":"2023-10-24T14:03:22.000Z","size":77,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-02T06:28:04.202Z","etag":null,"topics":["animation","cli","cli-interface","progress-bar","rust"],"latest_commit_sha":null,"homepage":"https://crates.io/crates/cli-animate","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/mutokrm.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-10-22T08:52:19.000Z","updated_at":"2025-02-07T04:09:56.000Z","dependencies_parsed_at":null,"dependency_job_id":"c15fc44c-8781-4445-b364-45d9927aa73d","html_url":"https://github.com/mutokrm/cli_animate","commit_stats":null,"previous_names":["walnut07/cli_animate","mutokrm/cli_animate"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mutokrm%2Fcli_animate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mutokrm%2Fcli_animate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mutokrm%2Fcli_animate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mutokrm%2Fcli_animate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mutokrm","download_url":"https://codeload.github.com/mutokrm/cli_animate/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243327697,"owners_count":20273727,"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":["animation","cli","cli-interface","progress-bar","rust"],"created_at":"2025-03-13T02:30:31.292Z","updated_at":"2025-12-24T17:50:28.904Z","avatar_url":"https://github.com/mutokrm.png","language":"Rust","readme":"# cli-animate\n\n`cli-animate` is a Rust crate designed to **enrich command-line applications with a variety of beautiful, easy-to-use animations**.\nIt offers a straightforward way to integrate visual elements such as progress bars, interactive menus, and more, enhancing the interactivity of your CLIs.\n\n## Features\n\n**Progress Bars**: Show task progress with customizable, animated progress bars. \\\n**Interactive Menus**: Navigate through options with intuitive, keyboard-navigable menus. \\\n**Loading Indicators**: Display a loading indicator to show that your application is working. \\\n**Styles Customizable**: Customize the look of your animations with colors and characters. \\\n**And More**: The library is designed for extensibility and includes a variety of other tools to enrich your CLI applications.\n\n## Installation\n\nAdd `cli-animate` to your `Cargo.toml` file's dependencies section:\n\n```\n[dependencies]\ncli-animate = \"0.1.0\"\n```\n\n## Example\n\n**Interactive Menu**:\n\n![interactive_menu.gif](example/interactive_menu.gif)\n\n```rust\nuse cli_animate::InteractiveMenu;\n\nfn main() {\n    let options = vec![\n        \"Tokyo\".to_string(),\n        \"Saitama\".to_string(),\n        \"Kanagawa\".to_string(),\n    ];\n\n    let mut menu = InteractiveMenu::new(options.clone());\n\n    // Run it!\n    let selected_index = menu.run().unwrap(); // Returns the index of the user's selected option.\n\n    println!(\"You selected: {}\", options[selected_index]); // \"You selected: Tokyo\"\n}\n```\n\n**Progress Bar**:\n\n![progress_bar.gif](example/progress_bar.gif)\n\n```rust\nuse cli_animate::{ProgressBar, StyleBuilder, Color};\n\nfn main() {\n    let progress_value = Arc::new(Mutex::new(0));\n\n    // Create a clone of the progress_value for the other thread.\n    let thread_progress_value = progress_value.clone();\n\n    // Some work done in another thread.\n    let do_some_work = thread::spawn(move || {\n        let mut num = 0;\n        while num \u003c= 100 {\n            thread::sleep(time::Duration::from_millis(20));\n\n            let mut val = thread_progress_value.lock().unwrap(); // Update the progress value.\n            *val = num;\n\n            num += 1;\n        }\n    });\n\n    // Initialize a progress bar.\n    let style = StyleBuilder::new() // Customize the progress bar's style!\n        .color(Color::Green)\n        .bar_length(20)\n        .build();\n    let progress_bar = ProgressBar::new(0, 100, move || *progress_value.lock().unwrap(), style);\n\n    let mut writer = std::io::stdout();\n\n    // Start it!\n    progress_bar.start(\u0026mut writer);\n    \n    // Wait for the worker thread to finish.\n    do_some_work.join().unwrap();\n}\n\n```\n\nCheck out the `examples/` directory in the repository for more usage examples of cli-animate.\n\n## License\nThis project is licensed under the MIT License - see the LICENSE file for details.\n\nThank you for using `cli-animate` to make your command-line applications more attractive and engaging!\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmutokrm%2Fcli_animate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmutokrm%2Fcli_animate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmutokrm%2Fcli_animate/lists"}