@lppx/xtool
v0.0.11
Published
Programmer Development Tools Collection
Readme
@lppx/xtool
a cli tool
Usage
$ npm install -g @lppx/xtool
$ xt COMMAND
running command...
$ xt (--version)
@lppx/xtool/0.0.11 linux-x64 node-v22.16.0
$ xt --help [COMMAND]
USAGE
$ xt COMMAND
...Commands
xt autocomplete [SHELL]xt enc basext fflate xxt hash list [DIRECTORY]xt help [COMMAND]xt mdx listxt npm downloads [PACKAGE]xt npm info PACKAGExt npm search KEYWORDxt npm versions PACKAGExt pdf metadata FILExt pluginsxt plugins add PLUGINxt plugins:inspect PLUGIN...xt plugins install PLUGINxt plugins link PATHxt plugins remove [PLUGIN]xt plugins resetxt plugins uninstall [PLUGIN]xt plugins unlink [PLUGIN]xt plugins updatext tken count FILExt tken list [PATTERN]xt tz listxt tz swxt versionxt wrd metadata FILE
xt autocomplete [SHELL]
Display autocomplete installation instructions.
USAGE
$ xt autocomplete [SHELL] [-r]
ARGUMENTS
[SHELL] (zsh|bash|powershell) Shell type
FLAGS
-r, --refresh-cache Refresh cache (ignores displaying instructions)
DESCRIPTION
Display autocomplete installation instructions.
EXAMPLES
$ xt autocomplete
$ xt autocomplete bash
$ xt autocomplete zsh
$ xt autocomplete powershell
$ xt autocomplete --refresh-cacheSee code: @oclif/plugin-autocomplete
xt enc base
将输入内容编码为 Base64 格式
USAGE
$ xt enc base
DESCRIPTION
将输入内容编码为 Base64 格式
EXAMPLES
$ xt enc baseSee code: src/commands/enc/base.ts
xt fflate x
交互式选择文件或文件夹并快速压缩为ZIP
USAGE
$ xt fflate x [-d <value>]
FLAGS
-d, --dir=<value> [default: .] 要扫描的目录路径
DESCRIPTION
交互式选择文件或文件夹并快速压缩为ZIP
EXAMPLES
$ xt fflate x
$ xt fflate x --dir ./src
$ xt fflate x -d /path/to/folderSee code: src/commands/fflate/x.ts
xt hash list [DIRECTORY]
列出目录下所有文件的 BLAKE3 哈希值
USAGE
$ xt hash list [DIRECTORY] [-c] [-r]
ARGUMENTS
[DIRECTORY] [default: .] 要扫描的目录路径
FLAGS
-c, --checkout 显示结算金额
-r, --recursive 递归扫描子目录
DESCRIPTION
列出目录下所有文件的 BLAKE3 哈希值
EXAMPLES
$ xt hash list
$ xt hash list /path/to/directory
$ xt hash list . --recursiveSee code: src/commands/hash/list.ts
xt help [COMMAND]
Display help for xt.
USAGE
$ xt help [COMMAND...] [-n]
ARGUMENTS
[COMMAND...] Command to show help for.
FLAGS
-n, --nested-commands Include all nested commands in the output.
DESCRIPTION
Display help for xt.See code: @oclif/plugin-help
xt mdx list
列出当前目录下所有文件的MD5值和文件大小
USAGE
$ xt mdx list [-c] [-d <value>]
FLAGS
-c, --checkout 显示结算金额
-d, --dir=<value> [default: .] 指定要扫描的目录路径
DESCRIPTION
列出当前目录下所有文件的MD5值和文件大小
EXAMPLES
$ xt mdx list
$ xt mdx list --dir /path/to/directorySee code: src/commands/mdx/list.ts
xt npm downloads [PACKAGE]
查询npm包的下载量统计
USAGE
$ xt npm downloads [PACKAGE] [-p last-day|last-week|last-month|last-year] [-r <value>]
ARGUMENTS
[PACKAGE] npm包名(可选,不提供则查询全Registry总量)
FLAGS
-p, --period=<option> [default: last-week] 时间段
<options: last-day|last-week|last-month|last-year>
-r, --range=<value> 自定义日期范围(格式: YYYY-MM-DD:YYYY-MM-DD)
DESCRIPTION
查询npm包的下载量统计
EXAMPLES
$ xt npm downloads react
$ xt npm downloads react --period last-month
$ xt npm downloads @types/node --range 2024-01-01:2024-12-31
$ xt npm downloads --period last-weekSee code: src/commands/npm/downloads.ts
xt npm info PACKAGE
查询npm包的基本信息
USAGE
$ xt npm info PACKAGE [-v <value>]
ARGUMENTS
PACKAGE npm包名
FLAGS
-v, --version=<value> 查询指定版本的信息
DESCRIPTION
查询npm包的基本信息
EXAMPLES
$ xt npm info react
$ xt npm info @types/node
$ xt npm info react --version 18.0.0See code: src/commands/npm/info.ts
xt npm search KEYWORD
搜索npm包
USAGE
$ xt npm search KEYWORD [--from <value>] [--size <value>]
ARGUMENTS
KEYWORD 搜索关键词
FLAGS
--from=<value> 起始位置
--size=<value> [default: 10] 返回结果数量
DESCRIPTION
搜索npm包
EXAMPLES
$ xt npm search react
$ xt npm search "typescript utility" --size 20
$ xt npm search vueSee code: src/commands/npm/search.ts
xt npm versions PACKAGE
查询npm包的所有版本
USAGE
$ xt npm versions PACKAGE [-l <value>]
ARGUMENTS
PACKAGE npm包名
FLAGS
-l, --limit=<value> 限制显示的版本数量
DESCRIPTION
查询npm包的所有版本
EXAMPLES
$ xt npm versions react
$ xt npm versions @types/node
$ xt npm versions react --limit 10See code: src/commands/npm/versions.ts
xt pdf metadata FILE
查看PDF文件的元数据信息
USAGE
$ xt pdf metadata FILE
ARGUMENTS
FILE PDF文件路径
DESCRIPTION
查看PDF文件的元数据信息
EXAMPLES
$ xt pdf metadata example.pdf
$ xt pdf metadata /path/to/document.pdfSee code: src/commands/pdf/metadata.ts
xt plugins
List installed plugins.
USAGE
$ xt plugins [--json] [--core]
FLAGS
--core Show core plugins.
GLOBAL FLAGS
--json Format output as json.
DESCRIPTION
List installed plugins.
EXAMPLES
$ xt pluginsSee code: @oclif/plugin-plugins
xt plugins add PLUGIN
Installs a plugin into xt.
USAGE
$ xt plugins add PLUGIN... [--json] [-f] [-h] [-s | -v]
ARGUMENTS
PLUGIN... Plugin to install.
FLAGS
-f, --force Force npm to fetch remote resources even if a local copy exists on disk.
-h, --help Show CLI help.
-s, --silent Silences npm output.
-v, --verbose Show verbose npm output.
GLOBAL FLAGS
--json Format output as json.
DESCRIPTION
Installs a plugin into xt.
Uses npm to install plugins.
Installation of a user-installed plugin will override a core plugin.
Use the XT_NPM_LOG_LEVEL environment variable to set the npm loglevel.
Use the XT_NPM_REGISTRY environment variable to set the npm registry.
ALIASES
$ xt plugins add
EXAMPLES
Install a plugin from npm registry.
$ xt plugins add myplugin
Install a plugin from a github url.
$ xt plugins add https://github.com/someuser/someplugin
Install a plugin from a github slug.
$ xt plugins add someuser/somepluginxt plugins:inspect PLUGIN...
Displays installation properties of a plugin.
USAGE
$ xt plugins inspect PLUGIN...
ARGUMENTS
PLUGIN... [default: .] Plugin to inspect.
FLAGS
-h, --help Show CLI help.
-v, --verbose
GLOBAL FLAGS
--json Format output as json.
DESCRIPTION
Displays installation properties of a plugin.
EXAMPLES
$ xt plugins inspect mypluginSee code: @oclif/plugin-plugins
xt plugins install PLUGIN
Installs a plugin into xt.
USAGE
$ xt plugins install PLUGIN... [--json] [-f] [-h] [-s | -v]
ARGUMENTS
PLUGIN... Plugin to install.
FLAGS
-f, --force Force npm to fetch remote resources even if a local copy exists on disk.
-h, --help Show CLI help.
-s, --silent Silences npm output.
-v, --verbose Show verbose npm output.
GLOBAL FLAGS
--json Format output as json.
DESCRIPTION
Installs a plugin into xt.
Uses npm to install plugins.
Installation of a user-installed plugin will override a core plugin.
Use the XT_NPM_LOG_LEVEL environment variable to set the npm loglevel.
Use the XT_NPM_REGISTRY environment variable to set the npm registry.
ALIASES
$ xt plugins add
EXAMPLES
Install a plugin from npm registry.
$ xt plugins install myplugin
Install a plugin from a github url.
$ xt plugins install https://github.com/someuser/someplugin
Install a plugin from a github slug.
$ xt plugins install someuser/somepluginSee code: @oclif/plugin-plugins
xt plugins link PATH
Links a plugin into the CLI for development.
USAGE
$ xt plugins link PATH [-h] [--install] [-v]
ARGUMENTS
PATH [default: .] path to plugin
FLAGS
-h, --help Show CLI help.
-v, --verbose
--[no-]install Install dependencies after linking the plugin.
DESCRIPTION
Links a plugin into the CLI for development.
Installation of a linked plugin will override a user-installed or core plugin.
e.g. If you have a user-installed or core plugin that has a 'hello' command, installing a linked plugin with a 'hello'
command will override the user-installed or core plugin implementation. This is useful for development work.
EXAMPLES
$ xt plugins link mypluginSee code: @oclif/plugin-plugins
xt plugins remove [PLUGIN]
Removes a plugin from the CLI.
USAGE
$ xt plugins remove [PLUGIN...] [-h] [-v]
ARGUMENTS
[PLUGIN...] plugin to uninstall
FLAGS
-h, --help Show CLI help.
-v, --verbose
DESCRIPTION
Removes a plugin from the CLI.
ALIASES
$ xt plugins unlink
$ xt plugins remove
EXAMPLES
$ xt plugins remove mypluginxt plugins reset
Remove all user-installed and linked plugins.
USAGE
$ xt plugins reset [--hard] [--reinstall]
FLAGS
--hard Delete node_modules and package manager related files in addition to uninstalling plugins.
--reinstall Reinstall all plugins after uninstalling.See code: @oclif/plugin-plugins
xt plugins uninstall [PLUGIN]
Removes a plugin from the CLI.
USAGE
$ xt plugins uninstall [PLUGIN...] [-h] [-v]
ARGUMENTS
[PLUGIN...] plugin to uninstall
FLAGS
-h, --help Show CLI help.
-v, --verbose
DESCRIPTION
Removes a plugin from the CLI.
ALIASES
$ xt plugins unlink
$ xt plugins remove
EXAMPLES
$ xt plugins uninstall mypluginSee code: @oclif/plugin-plugins
xt plugins unlink [PLUGIN]
Removes a plugin from the CLI.
USAGE
$ xt plugins unlink [PLUGIN...] [-h] [-v]
ARGUMENTS
[PLUGIN...] plugin to uninstall
FLAGS
-h, --help Show CLI help.
-v, --verbose
DESCRIPTION
Removes a plugin from the CLI.
ALIASES
$ xt plugins unlink
$ xt plugins remove
EXAMPLES
$ xt plugins unlink mypluginxt plugins update
Update installed plugins.
USAGE
$ xt plugins update [-h] [-v]
FLAGS
-h, --help Show CLI help.
-v, --verbose
DESCRIPTION
Update installed plugins.See code: @oclif/plugin-plugins
xt tken count FILE
统计文件的token数量
USAGE
$ xt tken count FILE [-m
gpt-3.5-turbo|gpt-4|gpt-4-turbo|gpt-4o|gpt-4o-mini|o1|o1-mini|o1-preview|o3-mini|gpt-5|gpt-5-mini|gpt-5-nano|gpt-5-c
hat-latest|text-davinci-003|text-embedding-ada-002|text-embedding-3-small|text-embedding-3-large]
ARGUMENTS
FILE 要统计token数量的文件路径
FLAGS
-m, --model=<option> 指定OpenAI模型名称
<options: gpt-3.5-turbo|gpt-4|gpt-4-turbo|gpt-4o|gpt-4o-mini|o1|o1-mini|o1-preview|o3-mini|gpt-5
|gpt-5-mini|gpt-5-nano|gpt-5-chat-latest|text-davinci-003|text-embedding-ada-002|text-embedding-
3-small|text-embedding-3-large>
DESCRIPTION
统计文件的token数量
EXAMPLES
$ xt tken count ./example.txt
$ xt tken count ./example.txt --model gpt-4
$ xt tken count ./example.txt -m gpt-3.5-turboSee code: src/commands/tken/count.ts
xt tken list [PATTERN]
统计匹配正则表达式的所有文件的token数量
USAGE
$ xt tken list [PATTERN] [-d <value>] [-m
gpt-3.5-turbo|gpt-4|gpt-4-turbo|gpt-4o|gpt-4o-mini|o1|o1-mini|o1-preview|o3-mini|gpt-5|gpt-5-mini|gpt-5-nano|gpt-5-c
hat-latest|text-davinci-003|text-embedding-ada-002|text-embedding-3-small|text-embedding-3-large] [-r]
ARGUMENTS
[PATTERN] [default: .*] 用于匹配文件名的正则表达式
FLAGS
-d, --dir=<value> [default: .] 要扫描的目录路径
-m, --model=<option> 指定OpenAI模型名称
<options: gpt-3.5-turbo|gpt-4|gpt-4-turbo|gpt-4o|gpt-4o-mini|o1|o1-mini|o1-preview|o3-mini|gpt-5
|gpt-5-mini|gpt-5-nano|gpt-5-chat-latest|text-davinci-003|text-embedding-ada-002|text-embedding-
3-small|text-embedding-3-large>
-r, --recursive 递归扫描子目录
DESCRIPTION
统计匹配正则表达式的所有文件的token数量
EXAMPLES
$ xt tken list "\.ts$"
$ xt tken list "\.txt$" --model gpt-4
$ xt tken list "test.*\.js$" -m gpt-3.5-turbo
$ xt tken list ".*" --dir ./srcSee code: src/commands/tken/list.ts
xt tz list
列出操作系统的当前时区
USAGE
$ xt tz list
DESCRIPTION
列出操作系统的当前时区
EXAMPLES
$ xt tz listSee code: src/commands/tz/list.ts
xt tz sw
交互式切换操作系统时区
USAGE
$ xt tz sw [-t <value>]
FLAGS
-t, --timezone=<value> 直接指定要切换的时区(跳过交互式选择)
DESCRIPTION
交互式切换操作系统时区
EXAMPLES
$ xt tz sw
$ xt tz sw --timezone Asia/ShanghaiSee code: src/commands/tz/sw.ts
xt version
USAGE
$ xt version [--json] [--verbose]
FLAGS
--verbose Show additional information about the CLI.
GLOBAL FLAGS
--json Format output as json.
FLAG DESCRIPTIONS
--verbose Show additional information about the CLI.
Additionally shows the architecture, node version, operating system, and versions of plugins that the CLI is using.See code: @oclif/plugin-version
xt wrd metadata FILE
查看Word文件的元数据信息
USAGE
$ xt wrd metadata FILE
ARGUMENTS
FILE Word文件路径
DESCRIPTION
查看Word文件的元数据信息
EXAMPLES
$ xt wrd metadata example.docx
$ xt wrd metadata /path/to/document.docxSee code: src/commands/wrd/metadata.ts
