{"id":23399931,"url":"https://github.com/caleb9/yapp","last_synced_at":"2025-07-29T02:07:30.576Z","repository":{"id":229526616,"uuid":"776964444","full_name":"Caleb9/yapp","owner":"Caleb9","description":"Yet Another Password Prompt","archived":false,"fork":false,"pushed_at":"2025-07-05T12:40:41.000Z","size":29,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-19T06:48:42.679Z","etag":null,"topics":["cli","console","password","prompt","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/Caleb9.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,"zenodo":null}},"created_at":"2024-03-24T23:02:45.000Z","updated_at":"2025-07-13T11:17:04.000Z","dependencies_parsed_at":"2025-04-11T18:03:54.946Z","dependency_job_id":"105dcc03-96e6-4ce3-b1f8-4bffe4fc25b2","html_url":"https://github.com/Caleb9/yapp","commit_stats":null,"previous_names":["caleb9/yapp","caleb9/yacc"],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/Caleb9/yapp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Caleb9%2Fyapp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Caleb9%2Fyapp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Caleb9%2Fyapp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Caleb9%2Fyapp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Caleb9","download_url":"https://codeload.github.com/Caleb9/yapp/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Caleb9%2Fyapp/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267617643,"owners_count":24116208,"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","status":"online","status_checked_at":"2025-07-29T02:00:12.549Z","response_time":2574,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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","console","password","prompt","terminal"],"created_at":"2024-12-22T10:17:55.765Z","updated_at":"2025-07-29T02:07:30.556Z","avatar_url":"https://github.com/Caleb9.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# YAPP\n\n[![Crates.io Version](https://img.shields.io/crates/v/yapp)](https://crates.io/crates/yapp)\n\nYet Another Password Prompt\n\n`yapp` is a small library create for Rust based on the\n[console](https://github.com/console-rs/console) to provide simple,\ntestable password prompt for CLI apps.\n\n## Features\n\n* Reads user passwords from the input, optionally with a prompt and\n  echoing replacement symbols (`*`, or another of your choice).\n* Reads passwords interactively:\n  ```bash\n  cargo run --example simple\n  ```\n* Reads passwords non-interactively:\n  ```bash\n  echo \"P@55w0rd\\n\" | cargo run --example simple\n  ```\n* Using the `PasswordReader` (optionally `PasswordReader +\n  IsInteractive`) trait in your code allows for mocking the entire\n  library in tests (see an [example1](examples/mock_yapp.rs) and\n  [example2](examples/mock_yapp_with_is_interactive.rs))\n* Thanks to using the `console` library underneath, it handles unicode\n  correctly (tested on Windows and Linux).\n\n## Usage Example\n\n```rust\nuse yapp::{PasswordReader, Yapp};\n\nfn my_func\u003cP: PasswordReader\u003e(yapp: \u0026mut P) {\n    let password = yapp.read_password_with_prompt(\"Type your password: \").unwrap();\n    println!(\"You typed: {password}\");\n}\n\nfn main() {\n    let mut yapp = Yapp::new().with_echo_symbol('*');\n    my_func(\u0026mut yapp);\n}\n```\n\n```rust\nuse yapp::{PasswordReader, Yapp};\n\nfn my_func(yapp: \u0026mut dyn PasswordReader) {\n    let password = yapp.read_password_with_prompt(\"Type your password: \").unwrap();\n    println!(\"You typed: {password}\");\n}\n\nfn main() {\n    let mut yapp = Yapp::new().with_echo_symbol('*');\n    my_func(\u0026mut yapp);\n}\n```\n\nSee [examples](examples/) for more.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcaleb9%2Fyapp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcaleb9%2Fyapp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcaleb9%2Fyapp/lists"}