{"id":16747554,"url":"https://github.com/elycruz/code-tools","last_synced_at":"2026-01-27T21:11:32.859Z","repository":{"id":53420734,"uuid":"197299510","full_name":"elycruz/code-tools","owner":"elycruz","description":"A cli tool for running tasks on code/repos and the like ('release', 'release-candidate', 'bump' commands so far).","archived":false,"fork":false,"pushed_at":"2024-11-20T10:18:46.000Z","size":70,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-15T02:53:09.733Z","etag":null,"topics":["git","javascript","js","npm","semver","tools","versioning"],"latest_commit_sha":null,"homepage":"","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/elycruz.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,"zenodo":null}},"created_at":"2019-07-17T02:23:21.000Z","updated_at":"2022-08-17T12:23:43.000Z","dependencies_parsed_at":"2025-04-15T02:53:10.607Z","dependency_job_id":"8fff72e6-522d-4ead-8b1f-2479ea2a5acb","html_url":"https://github.com/elycruz/code-tools","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/elycruz/code-tools","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elycruz%2Fcode-tools","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elycruz%2Fcode-tools/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elycruz%2Fcode-tools/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elycruz%2Fcode-tools/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/elycruz","download_url":"https://codeload.github.com/elycruz/code-tools/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elycruz%2Fcode-tools/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28823190,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-27T18:44:20.126Z","status":"ssl_error","status_checked_at":"2026-01-27T18:44:09.161Z","response_time":168,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["git","javascript","js","npm","semver","tools","versioning"],"created_at":"2024-10-13T02:10:22.164Z","updated_at":"2026-01-27T21:11:32.841Z","avatar_url":"https://github.com/elycruz.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# code-tools\nA cli tool for running common code tasks on code/repos and the like ('release', 'release-candidate', 'bump' commands etc.).\n\n## Installation:\nTwo ways to install:\n\n### Development way:\n1.  Clone repo: `git clone git@github.com:elycruz/code-tools.git`.\n2.  Run `npm install` or `yarn install` in repo's root. \n3.  Run `npm link` or `yarn link` from repo's root.\n\n### Automatic way:\n`npm i elycruz/code-tools -g` or\n`yarn global elycruz/code-tools`\n\n## Usage\n```\n$ code-tools --help    # For help\n$ code-tools -h        # \"\"\n$ code-tools [command] [...args] # For command see below\n\n# Pertinent examples:\n# Note: for `rc`, and `bump` commands make sure your branch is clean before running (as \n#  you don't want to miss any changes in your created release branch.\n\n# Example 1:\n# - Checkout 'develop' branch.\n# - Bump package.json version up on the 'patch' position.\n# - Use updated semver from package.json for other semver operations.\n# - Create release candidate branch, commit changes, and tag changes.\n$ code-tools rc -b develop --package-json=./some_dir/package.json\n\n# Example 2:\n# - Checkout 'develop' branch,\n# - Bump package.json version up on 'patch' position. \n# - \"\"\n# - Create rc branch, create rc commit, tag commit.\n# - Push changes to 'origin':\n$ code-tools rc -b develop --package-json=./some_dir/package.json --auto-push-remote=origin\n\n# Example 3:  Same as example 2 (except specifying `--semver-part=minor` which is the default).\n$ code-tools rc -b develop \\\n--package-json=./some_dir/package.json \\\n--auto-push-remote=origin \\\n--semver-part=minor\n\n# Example 4:\n# - Bump version in './VERSION' file\n# - \"\"\n# - Create bump commit, tag commit.\n$ code-tools bump -b develop --version-file=./VERSION\n\n# Example 5:\n# - Same as \"Example 4\" except we are also pushing changes to 'origin'\n#   and we are also bumping up the version in 'package.json' file.\n$ code-tools bump \\\n--version-file=./VERSION \\\n--package-json=./some_dir/package.json \\\n--auto-push-remote=origin \n\n# Using `--semver` flag - \n# Bump package.json to version `13.3.3`, create rc commit, tag commit,\n#   push rc branch and tags to 'origin'.\n#   @note `semver` flag also works for `rc` command.\n$ code-tools bump -p=./some_dir/package.json --semver 13.3.3 --auto-push-remote=origin\n\n# Using latest tag from `git tag` -\n# (using shorthand of `--auto-push-remote`\n# ----\n# Via `bump` command:\n$ code-tools bump --from-branch=develop --remote=origin\n\n# Via `rc` command:\n$ code-tools rc --from-branch=develop --remote=origin\n```\n\n### Commands\n\n#### `release|rc [options]` - \nCreates a release candidate branch from given branch `-b`/`--from-branch=[develop]`.\nNewly created branch gets tagged (`git tag`) properly and gets the newly created tag affixed to the front\nof it's suffix (`[--rc-branch-suffix=_Release_Candidate]`).\n\n**Note:** Prerelease part from semver (anything after the patch part) gets dropped in tagging and tag bumping.\n \n##### Args:\n- `-b, --from-branch` - Branch to create release candidate branch and rc tag from.  Default 'develop'.\n- `-p, --package-json` - File path to 'package.json' file whose \"version\" you want to update (if any).\n- `-v, --version-file` - File path to semantic 'VERSION' file to use/update (if any).\n- `-s, --semver-part` - Part of semantic version you want to upgrade (`[major, minor, patch]`); E.g.,\n  part of `MAJOR.MINOR.PATCH` which you would like to bump up.  Default 'patch'.\n- `--rc-branch-suffix=\"_Release_Candidate\"` - Suffix to use for creating release candidate branch.  Default `_Release_Candidate`.\n- `--auto-push-remote, --remote` - Remote to push changes to.  If set commits and tagging are pushed\n  to whatever your default remote is and created 'rc-branch' is pushed to given remote.\n- `--semver` - Semantic version to use. Used when you want to cut a release branch\n  to a specific version explicitly  (overrides `--package-json`, \n  `--version-file` and `git tag ...` semver lookups).\n- `--debug` - For outputting debug information.\n- `--verbose` - For showing log messages for each action taken.\n\n#### `bump [options]`\nBumps the tag version of the latest commit in branch upwards, updates package.json file if specified, updates\nversion file (`--version-file`/`-v`) if specified.\n\n**Note:** Prerelease part from semver (anything after the patch part) gets dropped in tagging and tag bumping.\n\n##### Args:\n- `-b, --from-branch` - Branch to create release candidate branch and rc tag from.\n- `-p, --package-json` - File path to 'package.json' file whose \"version\" you want to use/update (if any).\n- `-v, --version-file` - File path to semantic 'VERSION' file to use/update (if any).\n- `-s, --semver-part` - Part of semantic version you want to upgrade (`[major, minor, patch]`); E.g.,\n  part of `MAJOR.MINOR.PATCH` which you would like to bump up.\n- `--auto-push-remote, --remote` - Remote to push changes to.  If set commits and tagging are pushed\n  to default remote (remote set in your system).\n- `--semver` - Semantic version to use explicitly (overrides `--package-json`, \n  `--version-file` and `git tag ...` semver lookups).\n- `--debug` - For outputting debug information.\n- `--verbose` - For showing log messages for each action taken.\n  \n### Caveats \n\n#### Note about `release` and `bump` commands:\n- When fetching the semver version to utilize in these commands we check four different places (in the following order):\n  - `--semver` value.\n  - `--version-file`/`-v` - We expected a single line with/without a new line character at the end (If file does'nt exist \n    we create if param is specified with a path).\n  - `--package-json`/`-p` - If a malformed file is specified will throw error (we aren't currently checking for correct format).\n    @todo fix this\n  - `git tag` - Git tag list filtered to the designated format (tags get sorted properly using charCode totals to ensure\n    we get the greatest tag to increase from).\n- When running `bump` and/or `release` command with `--auto-push-remote` option and no `--version-file` and/or `--package-json` option\n  No 'change' commit is made however latest commit in branch is tagged with said tag and tag is then pushed via `git push --tag ...`.\n  \n## Mvp Todos:\n- [X] - Ability to change the remote that 'release' command pushes release branch for (currently hard coded to 'origin').\n\n## Wish-list\n- [ ] - Ability to have a dot file ('.code-tools' etc.) somewhere in 'repo-to-manipulate' that could have some meta-data/options \n  that could be used by 'code-tools' tool.\n- [ ] - '--dry-run' option (for quick-testing dry-running operations).\n- [ ] - Cleanup messages to be simpler/shorter - There are some long messages and some un-required (which should\n    probably only be shown in 'verbose' mode) in the log output\n    they should be shorter.\n    \n## License\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felycruz%2Fcode-tools","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Felycruz%2Fcode-tools","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felycruz%2Fcode-tools/lists"}