@w3suga/w3s-cli
v2.1.0
Published
Command line tool for changelog generation, release management, and development tags.
Readme
Teanis CLI
Command line tool for changelog generation, release management, and development tags.
A CLI tool that helps developers quickly generate changelogs, manage releases, and create development tags. It provides simple commands to automate common development workflows.
Table of Contents
Install
This project uses node and npm. Go check them out if you don't have them locally installed.
npm install -g @w3suga/w3s-cli
# OR
npx @w3suga/w3s-cliDependencies
- Node.js >= 20
Usage
tnx <command>
# OR
w3s <command>Note: The
w3scommand may be removed in future versions. Please usetnxas the primary command.
CLI
help
View all command usage.
tnx help
# OR
tnx -hchangelogs
Generate changelog based on two git tags.
tnx changelogs
tnx changelogs [version]Supported tag formats:
v1.0.0,v1.0.0-beta.1,v1.0.0-alpha.1(version tags)tst-1.0.0,stg-1.0.0(test/staging tags)dev1.0.0(development tags)
Default values:
from: Last tag in repositoryto:v{version}from package.json (or current branch if version not specified)output:CHANGELOG.md
Options:
--totalor-t- Generate changelog by total tags with progress bar. This will generate changelog for all tags in the repository, sorted by version.
tnx changelogs --total
tnx changelogs [version] --totalrelease
Release: update version number, generate changelog, commit code. Automatically updates version in multiple file types.
tnx release
tnx release [version]Files updated:
**/package.json- Updates theversionfield in all package.json files (excluding node_modules)**/package-lock.json- Updates version references in all package-lock.json files (excluding node_modules)**/docker-compose.yml- Updates image tags containing "teanis" or "suga" to the new version (e.g.,image: registry.suga.vn/app:1.0.0→image: teanis.app:1.0.0)**/composer.json- Updates theversionfield in all composer.json files (excluding vendor)
Default values:
version:prompt(interactive version selection)--execute:tnx changelogs(if not specified)
Changelog tags:
When --execute is not specified, the default tnx changelogs command will generate changelog based on Git tags. Supported tag formats:
v1.0.0,v1.0.0-beta.1,v1.0.0-alpha.1(version tags)tst-1.0.0,stg-1.0.0(test/staging tags)dev1.0.0(development tags)
The changelog will include commits between the last tag and the new version tag (v{version} from package.json).
Options:
--execute [command]or-e [command]- Execute additional command after bumping and before git commit. Default istnx changelogs
tnx release --execute "npm run build"
tnx release [version] --execute "npm run build"dev-tag
Create and push a development tag with format dev-YYMMDDHHmm (e.g., dev-2512091430).
tnx dev-tagFeatures
- Changelog Generation: Automatically generate changelogs based on Git tags. Support generating changelog between two tags or total changelog across all tags with progress tracking
- Release Management: Automate the release workflow including version bumping in multiple file types (package.json, package-lock.json, docker-compose.yml, composer.json), changelog generation, file updates, and custom command execution
- Development Tags: Create and push development tags with timestamp-based naming format (dev-YYMMDDHHmm) for easy tracking of development milestones
Maintainers
Teanis Web App Team
License
© 2024 Teanis
