{"id":13533089,"url":"https://github.com/rajasegar/cybertron","last_synced_at":"2025-05-12T15:19:55.543Z","repository":{"id":62556651,"uuid":"208790004","full_name":"rajasegar/cybertron","owner":"rajasegar","description":"Cybertron is where Ruby Transformers are born!","archived":false,"fork":false,"pushed_at":"2023-02-28T07:03:16.000Z","size":33,"stargazers_count":6,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-12T15:19:52.521Z","etag":null,"topics":["cli","codemod","codemods","converters","cybertron","ruby"],"latest_commit_sha":null,"homepage":"","language":"Ruby","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/rajasegar.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2019-09-16T12:07:00.000Z","updated_at":"2024-08-24T16:30:07.000Z","dependencies_parsed_at":"2024-01-14T01:07:45.113Z","dependency_job_id":"a35e63f4-bcf0-4aca-aa57-38e64302535e","html_url":"https://github.com/rajasegar/cybertron","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rajasegar%2Fcybertron","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rajasegar%2Fcybertron/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rajasegar%2Fcybertron/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rajasegar%2Fcybertron/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rajasegar","download_url":"https://codeload.github.com/rajasegar/cybertron/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253763962,"owners_count":21960484,"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","codemod","codemods","converters","cybertron","ruby"],"created_at":"2024-08-01T07:01:16.507Z","updated_at":"2025-05-12T15:19:55.487Z","avatar_url":"https://github.com/rajasegar.png","language":"Ruby","funding_links":[],"categories":["Tools","Ruby"],"sub_categories":[],"readme":"# cybertron\n\n[![Gem Version](https://badge.fury.io/rb/cybertron.svg)](https://badge.fury.io/rb/cybertron)\n[![Build Status](https://travis-ci.org/rajasegar/cybertron.svg?branch=master)](https://travis-ci.org/rajasegar/cybertron) \n![](https://ruby-gem-downloads-badge.herokuapp.com/cybertron?type=total\u0026style=plastic\u0026color=brightgreen\u0026total_label=)\n[![Coverage Status](https://coveralls.io/repos/github/rajasegar/cybertron/badge.svg?branch=master)](https://coveralls.io/github/rajasegar/cybertron?branch=master)\n\n\ncybertron is a command line tool for generating, testing and publishing \n[converters](https://github.com/rajasegar/awesome-ruby-ast#converters) aka \n[Codemods](https://github.com/facebook/codemod) for Ruby inspired by [codemod-cli](https://github.com/rwjblue/codemod-cli) for Javascript by [Robert Jackson](https://github.com/rwjblue)\n\n**INFO**:\nYou can use a tool like [codeshift](https://github.com/rajasegar/codeshift) to run your codemods/transforms against your Ruby codebase.\nFor writing transforms you can also make use of the [Ruby AST Explorer](https://ruby-ast-explorer.herokuapp.com/)\n\n## Installation\n\n```sh\n$ gem install cybertron\n```\n\n## Usage\n\n### Create a new codemod project\n```\n$ cybertron new \u003cproject-name\u003e\n```\nExample:\n\n```\n$ cybertron new my_ruby_codemod\n```\nThis will create a project structure like this:\n```\nmy_ruby_codemod\n| transforms\n| spec\n| | spec_helper.rb\n.rspec\nRakefile\n```\n\n### Generate a new transform\n```\n$ cd \u003cproject-name\u003e\n$ cybertron generate transform \u003ctransform-name\u003e\n```\n\nExample:\n```\n$ cd my_ruby_codemod\n$ cybertron generate transform my_transform\n```\n\nNow the project structure will be like this:\n```\nmy_ruby_codemod\n| transforms\n| | my_transform\n| | | fixtures\n| | | | basic_input.rb\n| | | | basic_output.rb\n| | | transform.rb\n| spec\n| | my_transform_spec.rb\n| | spec_helper.rb\n.rspec\nRakefile\n```\n### Generate a new fixture for transform\n```\n$ cybertron generate fixture \u003ctransform-name\u003e \u003cfixture-name\u003e\n```\nExample:\n\n```\n$ cybertron generate fixture my_transform advanced_usage\n```\n\nNow the project structure will be like this:\n```\nmy_ruby_codemod\n| transforms\n| | my_transform\n| | | fixtures\n| | | | basic_input.rb\n| | | | basic_output.rb\n| | | | advanced_usage_input.rb\n| | | | advanced_usage_output.rb\n| | | transform.rb\n| spec\n| | my_transform_spec.rb\n| | spec_helper.rb\n.rspec\nRakefile\n```\n### Run tests for your codemod transforms\n```\n$ cybertron spec\n```\nThis will run all the specs in the spec folder, by comparing the input and output\nfixtures against themselves for each and every transform.\n\n### Finding help or usage instructions\nTo display the help message and usage instructions, just invoke `cybertron` \nwithout any arguments\n\n```sh\n$ cybertron\n```\n\nTo display help about any particular command,\n```sh\n$ cybertron help \u003ccommand-name\u003e\n```\n\nFor example, to know more about the `generate` command:\n```sh\n$ cybertron help generate\n```\n\n## Other related tools\n- [ruby-ast-explorer](https://github.com/rajasegar/ruby-ast-explorer)\n- [codeshift](https://github.com/rajasegar/codeshift)\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 tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/rajasegar/cybertron. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.\n\n## License\n\nThe gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).\n\n## Code of Conduct\n\nEveryone interacting in the Cybertron project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/cybertron/blob/master/CODE_OF_CONDUCT.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frajasegar%2Fcybertron","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frajasegar%2Fcybertron","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frajasegar%2Fcybertron/lists"}