cihai-cli¶
Command line frontend for the cihai CJK language library.
Install and look up your first character.
Every command, flag, and option.
Development setup, code style, and releases.
Run cihai¶
Choose how you want to invoke the cihai command. The cooldown control only
changes uvx commands because uvx can keep cihai-cli itself out of the
cooldown window.
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.
At a glance¶
Use cihai info to look up a CJK character:
$ cihai info 好
char: 好
kCantonese: hou2 hou3
kDefinition: good, excellent, fine; well
kHangul: 호:0E
kJapaneseOn: KOU
kKorean: HO
kMandarin: hǎo
kTang: '*xɑ̀u *xɑ̌u'
kVietnamese: háo
ucn: U+597D
Use cihai reverse to search definitions:
$ cihai reverse good
char: 好
kCantonese: hou2 hou3
kDefinition: good, excellent, fine; well
kHangul: 호:0E
kJapaneseOn: KOU
kKorean: HO
kMandarin: hǎo
kTang: '*xɑ̀u *xɑ̌u'
kVietnamese: háo
ucn: U+597D
Data is downloaded automatically on first use via cihai.