{"id":17001615,"url":"https://github.com/shresht7/random-cli","last_synced_at":"2025-03-22T08:48:21.972Z","repository":{"id":38388878,"uuid":"489910302","full_name":"Shresht7/random-cli","owner":"Shresht7","description":"A command-line interface for when you need randomness","archived":false,"fork":false,"pushed_at":"2025-03-07T19:48:22.000Z","size":104,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-07T20:32:19.862Z","etag":null,"topics":["cli","command-line","random"],"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/Shresht7.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":"2022-05-08T10:22:10.000Z","updated_at":"2025-03-07T19:47:39.000Z","dependencies_parsed_at":"2024-11-28T18:32:11.060Z","dependency_job_id":"49553495-f3ec-4f33-91bd-749c34dfecc1","html_url":"https://github.com/Shresht7/random-cli","commit_stats":null,"previous_names":["shresht7/random"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Shresht7%2Frandom-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Shresht7%2Frandom-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Shresht7%2Frandom-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Shresht7%2Frandom-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Shresht7","download_url":"https://codeload.github.com/Shresht7/random-cli/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244931586,"owners_count":20534010,"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":["cli","command-line","random"],"created_at":"2024-10-14T04:25:33.895Z","updated_at":"2025-03-22T08:48:21.954Z","avatar_url":"https://github.com/Shresht7.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# `random`\n\nA command-line interface for when you need some randomness. Generate random strings and numbers, flip a coin, roll dice, or select one of many.\n\n## 📖 Usage\n\n```sh\nrandom [COMMAND] [FLAGS]\n```\n\nUse the `help` command (or `--help, -h` flag) to see more details. `random help` or `random --help` or `random [COMMAND] --help`.\n\n---\n\n## 🖋 Commands\n\n| Command               | Description                           |\n| --------------------- | ------------------------------------- |\n| [`select`](#select)   | Select one entry from a list randomly |\n| [`number`](#number)   | Generate a random number              |\n| [`string`](#string)   | Generate a random string              |\n| [`uuid`](#uuid)       | Generate a random UUID/GUID           |\n| [`toss`](#toss)       | Toss a coin                           |\n| [`roll`](#roll)       | Roll a die                            |\n| [`shuffle`](#shuffle) | Shuffles the given list               |\n\n### 💻 Select\n\nRandomly select one entry from a list.\n\n```sh\nrandom select [...ENTRIES]\n```\n\n#### Arguments\n\nTakes a variable amount of arguments representing the list of all entries.\n\n```sh\nrandom select one two three four five ...\n```\n\nCan also accept input from a redirected stdin.\n\n```sh\ngh repo list | random select\n```\n\n#### Flags\n\n- `--repeat, -r` or `--count, -c`: Number of times to repeat the execution of this command.\n\n- `--separator, -s` or `--delimiter, -d`: Separator to use to format the results (default: `\\n`)\n\n```sh\ngh repo list | random select --repeat 3\n```\n\n#### Examples\n\n```sh\nrandom select pizza burger pasta        # Selects either pizza, burger or pasta\ngh repo list | random select            # Select one entry piped through stdin\n```\n\n\n### 💻 Number\n\nGenerate random numbers.\n\n```sh\nrandom number [NUM1] [NUM2]\n```\n\n#### Arguments\n\n`[NUM1]` and `[NUM2]` are optional positional parameters that determine the range within which to generate the number.\n\n- If both `[NUM1]` and `[NUM2]` are specified, the command generates a number between `[NUM1]` and `[NUM2]`.\n- If only `[NUM1]` is specified, the command generates a number between `0` and `[NUM1]`.\n- If no parameters are specified, the command generates a number between `0` and `1000`.\n\n#### Flags\n\n- `--repeat, -r` or `--count, -c`: Number of times to repeat the execution of this command.\n\n- `--separator, -s` or `--delimiter, -d`: Separator to use to format the results (default: `\\n`)\n\n#### Examples\n\n```sh\nrandom number                   # Generates a number between 0 and 1000\nrandom number 5                 # Generates a number between 0 and 5\nrandom number 5 15              # Generates a number between 5 and 15\nrandom number 5 10 --repeat 5   # Generate 5 numbers between 5 and 15     \n```\n\n### 💻 String\n\nGenerate random strings using alphanumeric and special characters.\n\n```sh\nrandom string\n```\n\n#### Flags\n\n- `--length, -l`: Specify the length of the generated strings (default: `16`).\n\n- `--charset`: Specify the character-set to use. options: `lowercase`, `uppercase`, `alphabets`, `numbers`, `alphanumeric`, `special` and `all`. If the charset is anything other than the specified options, the literal characters itself are used as the charset.\n\n- `--repeat, -r` or `--count, -c`: Number of times to repeat the execution of this command.\n\n- `--separator, -s` or `--delimiter, -d`: Separator to use to format the results (default: `\\n`)\n\n#### Examples\n\n```sh\nrandom string                           # Generates a random 16-character string\nrandom string --length 8                # Generates a radom 8-character string\nrandom string --length 8 --repeat 3     # Generates three 8-character strings\n```\n\n### 💻 UUID\n\nGenerate a random UUID/GUID\n\n```sh\nrandom uuid\n# or\nrandom guid\n```\n\n#### Examples\n\n```sh\nrandom uuid   # Generates a random uuid\nrandom guid   # Does the same thing. guid is an alias for uuid\n```\n\n### 💻 Toss\n\nGenerates a random boolean (50% chance to return `true` and `false`).\n\n```sh\nrandom toss\n```\n\n#### Flags\n\n- `--weight, -w`: Probabilistic weight of getting `true` (default: `0.5`)\n\n- `--coin`: Reformats the result as `Heads` or `Tails` (instead of `true` or `false`)\n\n- `--repeat, -r` or `--count, -c`: Number of times to repeat the execution of this command.\n\n- `--separator, -s` or `--delimiter, -d`: Separator to use to format the results (default: `\\n`)\n\n#### Examples\n\n```sh\nrandom toss                         # Generates a random boolean\nrandom toss --coin                  # Flip a coin\nrandom toss --coin --repeat 3       # Toss three coins\n```\n\n### 💻 Roll\n\nRoll a die.\n\n```sh\nrandom roll [DIE]\n```\n\n#### Arguments\n\nRoll die `[DIE]` accepts input in the `{n}d{S}+X` format; where `{n}` is the number of dice thrown and `{S}` is the number of sides each die has and `{X}` is the number to add to the result. (example: `3d8` - Three 8-sided die, 2d6+4 - Two 6-sided dice and add 4 to the result)\n\ndefault: `1d20`\n\n#### Flags\n\n- `--with-advantage, -a`: Rolls the die with advantage. Takes the greatest value.\n\n- `--with-disadvantage, -d`: Rolls the die with disadvantage. Takes the smallest value.\n\n- `--difficulty-check`: Difficulty check. The rolls total must be higher than this value to succeed.\n\n#### Examples\n\n```sh\nrandom roll                         # Rolls a 1d20\nrandom roll 3d8 --with-advantage    # Rolls 3d8 with advantage\nrandom roll 1d8+5                   # Rolls a 1d8 and adds 5\nrandom roll 1d8+2d6+3               # Rolls 1d8 and 2d6 and adds 3 to the results\nrandom roll 2d8 --difficulty-check 10 # Roll 2d8 and check against 10 \n```\n\n### 💻 Shuffle\n\nShuffles the given list.\n\n```sh\nrandom shuffle [...ENTRIES]\n```\n\n#### Arguments\n\nTakes a variable amount of arguments representing the list of all entries.\n\n```sh\nrandom shuffle one two three four five ...\n```\n\nCan also accept input from a redirected stdin.\n\n```sh\ngh repo list | random shuffle\n```\n\n#### Flags\n\n- `--separator, -s` or `--delimiter, -d`: Separator to use to format the results (default: `\\n`)\n\n#### Examples\n\n```sh\nrandom shuffle 1 2 3 4 5 6 7 8 9        # Shuffles the numbers 8 5 9 1 7 3 6 4 2\ngh repo list | random shuffle           # Shuffles the repository list\n```\n\n---\n\n## 📑 License\n\nThis project is licensed under the [MIT License](./LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshresht7%2Frandom-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshresht7%2Frandom-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshresht7%2Frandom-cli/lists"}