{"id":22773714,"url":"https://github.com/moekiorg/shufu","last_synced_at":"2025-04-05T19:35:33.811Z","repository":{"id":56895465,"uuid":"449617815","full_name":"moekiorg/shufu","owner":"moekiorg","description":"Shufu is a simple Command as Code","archived":false,"fork":false,"pushed_at":"2022-02-02T01:23:03.000Z","size":21,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-02T03:37:36.414Z","etag":null,"topics":["gem","ruby","shell"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/moekiorg.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-01-19T09:00:45.000Z","updated_at":"2023-02-01T08:11:32.000Z","dependencies_parsed_at":"2022-08-21T01:20:43.082Z","dependency_job_id":null,"html_url":"https://github.com/moekiorg/shufu","commit_stats":null,"previous_names":["cc-kawakami/shufu","kawakamimoeki/shufu","moekidev/shufu","moekiorg/shufu"],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moekiorg%2Fshufu","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moekiorg%2Fshufu/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moekiorg%2Fshufu/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moekiorg%2Fshufu/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/moekiorg","download_url":"https://codeload.github.com/moekiorg/shufu/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247393095,"owners_count":20931804,"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":["gem","ruby","shell"],"created_at":"2024-12-11T17:58:46.467Z","updated_at":"2025-04-05T19:35:33.769Z","avatar_url":"https://github.com/moekiorg.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Shufu\n\nShufu is a simple command line generator.\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'shufu'\n```\n\nAnd then execute:\n\n    $ bundle install\n\nOr install it yourself as:\n\n    $ gem install shufu\n\n## Usage\n\n```ruby\nrequire \"shufu\"\n\nschema = {\n  git: {\n    commit: {\n      amend: :flag,\n      author: :equal\n    }\n  }\n}\n\ncommand = Shufu::Command.new(schema)\n\np command.to_s({ amend: true, author: \"cc-kawakami\" })\n\n# =\u003e \"git commit --amend --author=cc-kawakami\"\n```\n\n### Schema\n\n#### Hash\n\nHash value means that the key is a command.\n\n```ruby\n{\n  git: {\n    #...\n  }\n}\n```\n\n#### Parameter\n\n`:param` value means that the key is parameter.\n\n```ruby\n{\n  git: {\n    add: {\n      path: :param\n    }\n  }\n}\n```\n\n#### Flag\n\n`:flag` value means that the key is flag argument like `--key`.\nWhen the input is `true` then the flag argument is output.\n\n```ruby\n{\n  git: {\n    commit: {\n      amend: :flag\n    }\n  }\n}\n```\n\n#### Equal\n\n`:equal` value means that the key's value is expected to set with `=` like `--key=value`.\n\n```ruby\n{\n  git: {\n    commit: {\n      author: :equal\n    }\n  }\n}\n```\n\n#### Space\n\n`:space` value means that the key's value is expected to set with space like `--key value`. \n\n```ruby\n{\n  git: {\n    commit: {\n      author: :space\n    }\n  }\n}\n```\n\n## Development\n\nAfter checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.\n\nTo install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmoekiorg%2Fshufu","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmoekiorg%2Fshufu","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmoekiorg%2Fshufu/lists"}