TDesign Publish CLI

0.0.12 · active · verified Wed Apr 22

tdesign-publish-cli is a command-line interface tool designed to streamline the release process for JavaScript projects, particularly those adhering to Conventional Commits. It automates the generation of changelogs based on Git commit history, leveraging `standard-changelog`. Furthermore, it can create formatted messages for enterprise communication platforms like WeChat Work (WeCom) robots, supporting both release log notifications and instant recognition messages. The current stable version is `0.0.12`, indicating it's still in early development, and its release cadence is likely irregular as features are added and refined. Its key differentiator is the integrated robot message generation tailored for Chinese enterprise platforms, which goes beyond standard changelog tools.

Common errors

Warnings

Install

Imports

Quickstart

This quickstart demonstrates installing the CLI, generating a changelog, and then generating a WeChat Work robot message, including an example of how to send it.

npm i -D tdesign-publish-cli

# Ensure your project uses Conventional Commits, e.g., via commitlint and husky
# For initial changelog generation, ensure you have git tags (e.g., v1.0.0)

# Generate CHANGELOG.md
npx tdesign-publish-cli changelog

# Generate a robot message for a release (reads from CHANGELOG.md)
npx tdesign-publish-cli robot

# After running 'robot', a robotMsg.json file will be created.
# Example for sending the message using curl (replace with your webhook URL):
# cat robotMsg.json | curl -X POST -H 'Content-Type: application/json' -d @- "${PROCESS_ENV_WECOM_WEBHOOK_URL ?? ''}"

view raw JSON →