diff --git a/npm/platforms/darwin-arm64/package.json b/npm/platforms/darwin-arm64/package.json index 34d9eef..612ba00 100644 --- a/npm/platforms/darwin-arm64/package.json +++ b/npm/platforms/darwin-arm64/package.json @@ -1,6 +1,6 @@ { "name": "@canghe_ai/wechat-cli-darwin-arm64", - "version": "0.2.1", + "version": "0.2.2", "description": "wechat-cli binary for macOS arm64", "os": ["darwin"], "cpu": ["arm64"], diff --git a/npm/wechat-cli/package.json b/npm/wechat-cli/package.json index d6c03e3..aa63c39 100644 --- a/npm/wechat-cli/package.json +++ b/npm/wechat-cli/package.json @@ -1,6 +1,6 @@ { "name": "@canghe_ai/wechat-cli", - "version": "0.2.1", + "version": "0.2.2", "description": "WeChat data query CLI — chat history, contacts, sessions, favorites, and more. Designed for LLM integration.", "bin": { "wechat-cli": "bin/wechat-cli.js" @@ -13,7 +13,7 @@ "install.js" ], "optionalDependencies": { - "@canghe_ai/wechat-cli-darwin-arm64": "0.2.1" + "@canghe_ai/wechat-cli-darwin-arm64": "0.2.2" }, "engines": { "node": ">=14" diff --git a/pyproject.toml b/pyproject.toml index ef0dc21..659ad46 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "wechat-cli" -version = "0.2.1" +version = "0.2.2" description = "WeChat data query CLI for LLMs" requires-python = ">=3.10" dependencies = [ diff --git a/wechat_cli/main.py b/wechat_cli/main.py index 45a2226..fb40e1f 100644 --- a/wechat_cli/main.py +++ b/wechat_cli/main.py @@ -6,8 +6,11 @@ import click from .core.context import AppContext +_VERSION = "0.2.2" + @click.group() +@click.version_option(version=_VERSION, prog_name="wechat-cli") @click.option("--config", "config_path", default=None, envvar="WECHAT_CLI_CONFIG", help="config.json 路径(默认自动查找)") @click.pass_context @@ -26,8 +29,8 @@ def cli(ctx, config_path): wechat-cli contacts --query "李" # 搜索联系人 wechat-cli new-messages # 获取增量新消息 """ - # init 命令不需要 AppContext - if ctx.invoked_subcommand == "init": + # init/version 命令不需要 AppContext + if ctx.invoked_subcommand in ("init", "version"): return try: