Quickstart¶
cihai-cli installs the cihai command and works out-of-the-box without
configuration.
Run cihai¶
Choose how you want to invoke the command. uvx runs cihai-cli on demand,
pipx runs it through an isolated tool environment, and pip means you already
installed the cihai script into your user Python environment.
Run cihai with uvx:
$ uvx --from cihai-cli cihai info 好
$ uvx --from cihai-cli cihai reverse good
$ uvx --from cihai-cli cihai --help
Run cihai with uvx:
$ uvx \
--exclude-newer P7D \
--exclude-newer-package cihai-cli=2099-01-01 \
--exclude-newer-package cihai=2099-01-01 \
--exclude-newer-package unihan-etl=2099-01-01 \
--from cihai-cli \
cihai info 好
$ uvx \
--exclude-newer P7D \
--exclude-newer-package cihai-cli=2099-01-01 \
--exclude-newer-package cihai=2099-01-01 \
--exclude-newer-package unihan-etl=2099-01-01 \
--from cihai-cli \
cihai reverse good
$ uvx \
--exclude-newer P7D \
--exclude-newer-package cihai-cli=2099-01-01 \
--exclude-newer-package cihai=2099-01-01 \
--exclude-newer-package unihan-etl=2099-01-01 \
--from cihai-cli \
cihai --help
Run cihai with uvx:
$ uvx --no-config --from cihai-cli cihai info 好
$ uvx --no-config --from cihai-cli cihai reverse good
$ uvx --no-config --from cihai-cli cihai --help
Run cihai with pipx:
$ pipx run --spec cihai-cli cihai info 好
$ pipx run --spec cihai-cli cihai reverse good
$ pipx run --spec cihai-cli cihai --help
Run cihai with pipx:
$ pipx run --spec cihai-cli cihai info 好
$ pipx run --spec cihai-cli cihai reverse good
$ pipx run --spec cihai-cli cihai --help
pip and pipx do not provide uv's per-package cooldown exemption. These invocations stay unchanged; use uvx when you need cooldown enforcement without filtering out cihai-cli itself.
Run cihai with pipx:
$ pipx run --spec cihai-cli cihai info 好
$ pipx run --spec cihai-cli cihai reverse good
$ pipx run --spec cihai-cli cihai --help
pip and pipx do not provide uv's per-package cooldown exemption. These invocations stay unchanged; use uvx when you need cooldown enforcement without filtering out cihai-cli itself.
Run cihai with pip:
$ cihai info 好
$ cihai reverse good
$ cihai --help
Install cihai-cli with pip first, then run the cihai command.
Run cihai with pip:
$ cihai info 好
$ cihai reverse good
$ cihai --help
pip and pipx do not provide uv's per-package cooldown exemption. These invocations stay unchanged; use uvx when you need cooldown enforcement without filtering out cihai-cli itself.
Run cihai with pip:
$ cihai info 好
$ cihai reverse good
$ cihai --help
pip and pipx do not provide uv's per-package cooldown exemption. These invocations stay unchanged; use uvx when you need cooldown enforcement without filtering out cihai-cli itself.
Dependency cooldowns
Cooldowns delay newly uploaded packages. uvx can apply one while exempting cihai-cli and the cihai runtime packages it needs.
Installation options¶
Pick the installer that matches how you want to run the command. uvx runs
cihai-cli on demand, pipx installs an isolated command, and pip installs it
into your user Python environment.
With uvx:
$ uvx --from cihai-cli cihai --version
With uvx:
$ uvx \
--exclude-newer P7D \
--exclude-newer-package cihai-cli=2099-01-01 \
--exclude-newer-package cihai=2099-01-01 \
--exclude-newer-package unihan-etl=2099-01-01 \
--from cihai-cli \
cihai --version
With uvx:
$ uvx --no-config --from cihai-cli cihai --version
With pipx:
$ pipx install cihai-cli
Then check the command:
$ cihai --version
pip and pipx do not provide uv's per-package cooldown exemption. This command stays unchanged; use uvx when you need cooldown enforcement without filtering out cihai-cli itself.
With pipx:
$ pipx install cihai-cli
Then check the command:
$ cihai --version
pip and pipx do not provide uv's per-package cooldown exemption. This command stays unchanged; use uvx when you need cooldown enforcement without filtering out cihai-cli itself.
With pip:
$ pip install --user --upgrade cihai-cli
Then check the command:
$ cihai --version
pip and pipx do not provide uv's per-package cooldown exemption. This command stays unchanged; use uvx when you need cooldown enforcement without filtering out cihai-cli itself.
With pip:
$ pip install --user --upgrade cihai-cli
Then check the command:
$ cihai --version
pip and pipx do not provide uv's per-package cooldown exemption. This command stays unchanged; use uvx when you need cooldown enforcement without filtering out cihai-cli itself.
Dependency cooldowns
Cooldowns delay newly uploaded packages. uvx can apply one while exempting cihai-cli and the cihai runtime packages it needs.
Developmental releases¶
New versions of cihai CLI are published to PyPI as alpha, beta, or release candidates. In their
versions you will see notification like a1, b1, and rc1, respectively. 1.10.0b4 would mean
the 4th beta release of 1.10.0 before general availability.
pip:
$ pip install --user --upgrade --pre cihai-cli
pipx:
$ pipx install \ --suffix=@next \ --pip-args '\--pre' \ --force \ 'cihai-cli'
Run that prerelease command as
cihai@next:$ cihai@next info 好
-
$ uv tool install --prerelease=allow cihai-cli
uv:
$ uv add cihai-cli --prerelease allow
uvx:
$ uvx --from 'cihai-cli' --prerelease allow cihai
via trunk (can break easily):
Configuration¶
See cihai’s configuration documentation.