Add version command, bump to 0.2.2

This commit is contained in:
canghe 2026-04-04 14:57:41 +08:00
parent ab890dfac0
commit b794ad1370
4 changed files with 9 additions and 6 deletions

View File

@ -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"],

View File

@ -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"

View File

@ -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 = [

View File

@ -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: