vermink
零依赖终端美化引擎:把纯文本主题编译成 Zsh / Bash / PowerShell 的提示符与状态栏。
安装
pip install vermink
快速开始
# 生成默认 dark 主题并安装到当前 shell
vermink init
# 预览主题效果(不修改任何文件)
vermink preview dark
# 列出所有主题
vermink list
子命令
| 命令 | 说明 |
|---|---|
vermink init [--shell zsh|bash|pwsh] |
生成默认 dark 主题并安装 |
vermink preview <主题名> [--plain] |
终端预览渲染效果 |
vermink install <主题名> --shell zsh|bash|pwsh |
安装到 shell 启动文件(自动备份) |
vermink uninstall --shell zsh|bash|pwsh |
卸载并还原备份 |
vermink list [--shell zsh|bash|pwsh] |
列出主题与当前生效主题 |
vermink show <主题名> |
打印主题源配置 |
主题文件
主题文件使用 INI 格式,包含以下区块:
## vermink theme mytheme
[palette]
user = bright_green
host = bright_cyan
dir = bright_blue
git = bright_magenta
git_state = yellow
venv = bright_green
time = grey
exit_code = red
[prompt]
user
host
dir
git
git_state
[status]
venv
time
exit_code
[format]
user = user
host = host
dir = dir
git = git
git_state = git_state
venv = venv
time = time
exit_code = exit_code
区块说明
- [palette]:定义颜色名称,支持命名色(如
red、bright_green)、256 色(如208)、HEX 色(如#ff8800)、修饰符(如bold、dim) - [prompt]:左侧提示符显示的片段列表
- [status]:状态栏显示的片段列表(Zsh 为 RPROMPT,Bash/Pwsh 合并到主提示符)
- [format]:将片段映射到配色名,设为
none表示不着色
可用片段
| 片段 | 说明 |
|---|---|
user |
当前用户名 |
host |
主机名 |
dir |
当前目录(~ 缩写) |
git |
Git 分支名 |
git_state |
Git 状态(* 有修改,+ 有未跟踪文件) |
venv |
虚拟环境名 |
time |
当前时间(HH:MM) |
exit_code |
上一条命令的退出码(非零时显示) |
内置主题
- dark:深色终端主题(默认)
- light:浅色终端主题
自定义主题
# 保存主题到配置目录
vermink init --theme dark --name mytheme --no-install
# 编辑主题
vim ~/.config/vermink/themes/mytheme.conf
# 安装自定义主题
vermink install mytheme --shell zsh
Shell 支持
| Shell | 提示符 | 状态栏 |
|---|---|---|
| Zsh | PS1 | RPROMPT(右侧) |
| Bash | PS1(PROMPT_COMMAND) | 合并到主提示符 |
| PowerShell | prompt 函数 | 合并到主提示符 |
开发
# 安装开发依赖
pip install -e ".[test]"
# 运行测试
pytest tests/
# 代码检查
ruff check .
许可证
MIT
Release files for vermink 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| vermink-0.1.0.tar.gz | 21.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| vermink-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 41.2 kB
Release files / vermink-0.1.0.tar.gz
| Download URL | vermink-0.1.0.tar.gz |
|---|---|
| Size | 21.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a99f9e3b490009b2aca007682038c40c45781780916294e464b737073a1222ab
|
|
BLAKE2b-256 checksum How to use checksums |
7a0cf82e45b8294e07f75ad5231804e48747adb56ea4a8cbdbafa56d354a58be
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 25, 2026.
Transparency logRelease files / vermink-0.1.0-py3-none-any.whl
| Download URL | vermink-0.1.0-py3-none-any.whl |
|---|---|
| Size | 19.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8e88c810b2ae709c378bd519dda8aa5a562c700102f6921459a3cad9e2b8348a
|
|
BLAKE2b-256 checksum How to use checksums |
61cc18e264d777c98ed9352edbf0b652fa62bd0863b5c93315e1b1e7413f9fe8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 25, 2026.
Transparency log