{"id":16818149,"url":"https://github.com/flesler/lucky","last_synced_at":"2025-07-18T11:36:32.668Z","repository":{"id":66100523,"uuid":"44455108","full_name":"flesler/lucky","owner":"flesler","description":"CLI tool to measure the state of your luck, at the moment","archived":false,"fork":false,"pushed_at":"2015-10-19T00:11:30.000Z","size":133,"stargazers_count":11,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-24T10:18:29.892Z","etag":null,"topics":["cli","decision-making","luck","lucky","random"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/flesler.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}},"created_at":"2015-10-17T21:20:43.000Z","updated_at":"2024-09-21T12:14:04.000Z","dependencies_parsed_at":"2023-02-19T22:45:29.617Z","dependency_job_id":null,"html_url":"https://github.com/flesler/lucky","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/flesler/lucky","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flesler%2Flucky","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flesler%2Flucky/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flesler%2Flucky/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flesler%2Flucky/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/flesler","download_url":"https://codeload.github.com/flesler/lucky/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flesler%2Flucky/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265752181,"owners_count":23822919,"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","decision-making","luck","lucky","random"],"created_at":"2024-10-13T10:49:20.502Z","updated_at":"2025-07-18T11:36:30.607Z","avatar_url":"https://github.com/flesler.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# lucky\n\n[![](http://api.flattr.com/button/flattr-badge-large.png)](http://flattr.com/thing/4787314/fleslerlucky-on-GitHub)\n\n## Description\n\nCLI tool to measure the state of your luck at the moment.\n\n## What's it for?\n\nBefore any important move in your life, you should first consult this tool to see if the timing is right. You can even execute other commands only if your luck is effectively above average.\n\n## Installation\n\n[![NPM](https://nodei.co/npm/lucky.png?compact=true)](https://npmjs.org/package/lucky)\n\n``` bash\n$ npm install lucky -g\n```\n\n## Options\n\n```bash\n$ lucky --help\n\n  Usage: lucky [options]\n\n  CLI tool to measure the state of your luck, at the moment\n\n  Options:\n\n    -h, --help             output usage information\n    -V, --version          output the version number\n    -o, --opponents \u003cn\u003e    Number of opponents competing [default 1]\n    -r, --rounds \u003cn\u003e       Number of rounds simulated [default 100]\n    -C, --no-colors        Do not use fancy colors in output\n    -v, --verbose [level]  Verbosity level (0-4) [default 1]\n    -s, --silent           Alias for --verbose=0\n    -n, --number           Output only the luck number\n    -8, --eightball        Transform into a magic 8-ball\n\n  Exit code:\n\n    Exits successfully only if luck is above average\n```\n\n## Examples\n\nMinimal verbosity, just show me my luck\n```bash\n$ lucky\nYour luck is 8% above average\n```\n\nInclude the data behind that luck\n```bash\n$ lucky -o 2 -r 100 -v 2\nYou won 32 out of 100 rounds against 2 opponent(s)\nYour luck is 4% below average\n```\n\nInclude the winner of each round\n```bash\n$ lucky -r 5 -v 3\nRound 1\n-\u003e The winner is CPU 1\nRound 2\n-\u003e The winner is Human\nRound 3\n-\u003e The winner is CPU 1\nRound 4\n-\u003e The winner is CPU 1\nRound 5\n-\u003e The winner is CPU 1\nYou won 1 out of 5 rounds against 1 opponent(s)\nYour luck is 60% below average\n```\n\nInclude the score of each player on each round\n```bash\n$ lucky -r 3 -v\nRound 1\n-\u003e Human scored: 111\n-\u003e CPU 1 scored: 166\n-\u003e The winner is CPU 1\nRound 2\n-\u003e Human scored: 143\n-\u003e CPU 1 scored: 112\n-\u003e The winner is Human\nRound 3\n-\u003e Human scored: 178\n-\u003e CPU 1 scored: 127\n-\u003e The winner is Human\nYou won 2 out of 3 rounds against 1 opponent(s)\nYour luck is 33% above average\n```\n\nExecute different commands depending on whether luck is above average or not\n```bash\n$ lucky -s \u0026\u0026 echo \"Buy a lottery ticket\" || echo \"Go watch TV\"\nGo watch TV\n```\n\nPretend to be a Magic 8-ball\n```bash\n$ lucky -8\nDefinitely!\n$ lucky -8\nNope\n```\n\nLog you luck, add it to a cron and then you can make charts and whatnot\n```bash\n$ echo `date \"+%Y-%m-%d %H:%M:%S\"` `lucky -n`% \u003e\u003e ~/luck.log\n```\n\n## How does it measure my luck?\n\nIt simulates a match against opponents and compares your win-rate against the expected average.\n\n## LICENSE\n\nThe MIT License (MIT)\n\nCopyright (c) 2015 Ariel Flesler\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflesler%2Flucky","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fflesler%2Flucky","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflesler%2Flucky/lists"}