{"id":20692625,"url":"https://github.com/kevingimbel/passt","last_synced_at":"2025-04-22T17:41:26.850Z","repository":{"id":57653371,"uuid":"290490209","full_name":"KevinGimbel/passt","owner":"KevinGimbel","description":"Rust CLI and library to generate good-enough random strings and passwords.","archived":false,"fork":false,"pushed_at":"2023-05-09T07:24:43.000Z","size":1259,"stargazers_count":5,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-11-09T03:19:39.091Z","etag":null,"topics":["command-line-tool","password-generator","rust","rust-library","zero-dependencies"],"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/KevinGimbel.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-APACHE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-08-26T12:28:30.000Z","updated_at":"2023-11-21T15:13:52.000Z","dependencies_parsed_at":"2022-08-26T06:40:55.264Z","dependency_job_id":null,"html_url":"https://github.com/KevinGimbel/passt","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KevinGimbel%2Fpasst","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KevinGimbel%2Fpasst/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KevinGimbel%2Fpasst/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KevinGimbel%2Fpasst/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/KevinGimbel","download_url":"https://codeload.github.com/KevinGimbel/passt/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224980935,"owners_count":17402100,"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":["command-line-tool","password-generator","rust","rust-library","zero-dependencies"],"created_at":"2024-11-16T23:23:12.373Z","updated_at":"2024-11-16T23:23:12.821Z","avatar_url":"https://github.com/KevinGimbel.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# passt\n\u003e The \"good-enough\" password generator ¯\\\\_(ツ)_/¯\n\n![\"Passt logo\"](assets/github-header.png)\n\n`passt` is a \"zero-dependency\" random string generator that can be used to generate passwords in terminals or in your application.\n\n\u003c!-- BEGIN mktoc --\u003e\n\n- [Zero Dependencies?](#zero-dependencies)\n- [Supported operating systems](#supported-operating-systems)\n  - [*nix](#nix)\n  - [Windows Support](#windows-support)\n- [Usage: library](#usage-library)\n- [Usage: cli](#usage-cli)\n  - [Install](#install)\n- [Limitations](#limitations)\n- [Why the name \"passt\"](#why-the-name-passt)\n- [License](#license)\n\u003c!-- END mktoc --\u003e\n\n---\n\n## Zero Dependencies?\n\n`passt` only depends on Rust standard library, namely:\n- `std::fs::File`\n- `std::io::Read`\n\nand additionally for the CLI part:\n- `std::env`\n- `std::process::exit`\n\nand no other crates.\n\nThe only other \"dependency\" is `/dev/urandom` from which random ints are read to generate random values. So \"zero-dependency\" may be a bit of a stretch. 😬\n\n## Supported operating systems\n\n### *nix\n\nAll GNU/Linux / *nix systems should be supported as long as they have `/dev/urandom`. Only tested on MacOS and Ubuntu.\n\n### Windows Support\n\nFor Windows `file:/dev/urandom` is read but this is **not yet tested**. It may or may not work. 🤷‍♀️ Help with Windows support is appreciated!\n\n\n## Usage: library\n\n**Using the standard character set**\n\nThis means possible characters are:\n-  `a-zA-Z0-9` if no special chars are included\n-  `a-zA-Z0-9` and `!§$%\u0026/()=?´-_.,:;#'+*\u003c\u003e°^` if special chars are included\n\n```rust\nuse passt::Passt;\n\nfn my_random_password() -\u003e String {\n    // Passt::random_password(length: i32, with_special_chars: Option\u003cbool\u003e) -\u003e String {\n    Passt::random_password(16, Some(false));\n}\n\nfn my_random_password_with_none() -\u003e String {\n    // Passt::random_password(length: i32, with_special_chars: Option\u003cbool\u003e) -\u003e String {\n    Passt::random_password(16, None);\n}\n\nfn my_random_password_with_special_chars() -\u003e String {\n    Passt::random_password(16, Some(true));\n}\n```\n\n**Specify custom character set**\n\nThis allows you to use a different set of possible characters.\n\n```rust\nfn my_custom_set() {\n    // Create password only from random chars \"acefhjlnprtvxz13579\"\n    Pass::random_password_with_custom_set(16, \"acefhjlnprtvxz13579\")\n}\n```\n\n## Usage: cli\n\n### Install\n\nInstall with `cargo`:\n\n```bash\ncargo install passt\n```\n\nThen use as described below\n\n```bash\nUSAGE: passt -l \u003cint\u003e [-s] [-chars \"\u003cstr\u003e\"] [-n \u003cint\u003e]\n\n-l      length of the generated password\n-n      number of passwords to create (default: 1)\n-s      use special characters\n-chars  possible characters as a string, e.g. \"abc012\"\n```\n\n**No special characters**\n```bash\n$ passt -l 32\nOgHFnTrSH5liCPhkrfbHdfhSWFwGGAPA\n```\n\n**Include special characters**\n```bash\n$ passt -l 16 -s\nD#§2§RgI0Ou°F#\n```\n\n**Custom character set**\nEven with emojis!\n```bash\n$ passt -l 16 -chars \"🛹🥗🌈🦔🕶🤳🎮\"\n🌈🎮🎮🎮🤳🥗🎮🌈🎮🎮🎮🎮🤳🎮🕶🕶\n\n$ passt -l 4 -chars \"1234\"\n1341\n```\n\n**Create multiple passwords**\n\n```bash\n$ passt -l 4 -n 12\nBw9a\nI0CP\nobhV\nwpmT\n0tMu\nh2NG\nAzGd\nD3jb\nFmrT\nmlsX\nUdiJ\nNbAr\n```\n\n## Limitations\n\nBecause the random extraction of characters is weak it is better to have duplicates in the character set. See the following example:\n\n```bash\npasst -l 4 -chars \"10\"\n0000\n```\n\nWith two characters, the last char is always taken. For randomness, add more chars to the set.\n\n```bash\npasst -l 4 -chars \"1010\"\n0100\n```\n\n## Why the name \"passt\"\n\n\"passt\" is a German word you can say if something is \"okay\". Since this tool is \"okay\" in generating random strings that can be used for passwords I found the name fitting.\n\n## License\n\n`passt` is primarily distributed under the terms of both the MIT license and the Apache License (Version 2.0).\n\nSee [LICENSE-APACHE](LICENSE-APACHE) and [LICENSE-MIT](LICENSE-MIT) for details.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkevingimbel%2Fpasst","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkevingimbel%2Fpasst","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkevingimbel%2Fpasst/lists"}