Skip to main content

cihai-cli · Python Package License Code Coverage

Command line interface to the cihai CJK-language library. cihai info and cihai reverse look up CJK characters and definitions in the UNIHAN database, bootstrapping it locally on first use.

Requires Python 3.10 or newer.

Installation

$ pip install --user cihai-cli

Or manage it inside an existing project with uv:

$ uv add cihai-cli

Install the CLI as a user-wide tool with uv:

$ uv tool install cihai-cli

Run it on-demand without installing:

$ uvx --from cihai-cli cihai --version

Developmental releases

You can test the unpublished version of cihai-cli before it's released.

  • pip:

    $ pip install --user --upgrade --pre cihai-cli
    
  • uv:

    $ uv tool install --prerelease=allow cihai-cli
    
    $ uv add --prerelease=allow cihai-cli
    
  • pipx:

    $ pipx install --suffix=@next cihai-cli --pip-args '\--pre' --include-deps --force
    

    Then use cihai@next info 好.

For more information see developmental releases

Character lookup

See CLI in the documentation for full usage information.

$ cihai info 好
char: 好
kCantonese: hou2 hou3
kDefinition: good, excellent, fine; well
kHangul: 호
kJapaneseOn: KOU
kKorean: HO
kMandarin: hǎo
kTang: "*xɑ̀u *xɑ̌u"
kTotalStrokes: "6"
ucn: U+597D

Retrieve all character information (including book indices):

$ cihai info 好 -a
char: 好
kCangjie: VND
kCantonese: hou2 hou3
kCihaiT: "378.103"
kDefinition: good, excellent, fine; well
kFenn: 552A
kFourCornerCode: "4744.7"
kFrequency: "1"
kGradeLevel: "1"
kHKGlyph: 0871
kHangul: 호
kHanyuPinlu: hǎo(6060) hāo(142) hào(115)
kHanyuPinyin: 21028.010:hǎo,hào
kJapaneseKun: KONOMU SUKU YOI
kJapaneseOn: KOU
kKorean: HO
kMandarin: hǎo
kPhonetic: "481"
kRSAdobe_Japan1_6: C+1975+38.3.3 C+1975+39.3.3
kRSKangXi: "38.3"
kTang: "*xɑ̀u *xɑ̌u"
kTotalStrokes: "6"
kVietnamese: háo
kXHC1983: 0445.030:hǎo 0448.030:hào
ucn: U+597D

Reverse lookup

$ cihai reverse library
char: 圕
kCantonese: syu1
kDefinition: library
kJapaneseOn: TOSHOKAN SHO
kMandarin: tú
kTotalStrokes: '13'
ucn: U+5715
--------
char: 嫏
kCantonese: long4
kDefinition: the place where the supreme stores his books; library
kJapaneseOn: ROU
kMandarin: láng
kTotalStrokes: '11'
ucn: U+5ACF
--------

cihai info and cihai reverse log their result to stderr at INFO level, not stdout; raising --log-level above INFO silences it along with diagnostics. --help and --version print to stdout as usual.

Developing

$ git clone https://github.com/cihai/cihai-cli.git
$ cd cihai-cli

Bootstrap your environment and learn more about contributing, or read this repository's CONTRIBUTING.md for the exact gates. We use the same conventions / tools across all cihai projects: pytest, sphinx, mypy, ruff, tmuxp, and file watcher helpers (e.g. entr(1)).

Python versions

  • Final Python 3.7 version: 0.16.0

Docs Build Status

Metadata

Release files for cihai-cli 0.35.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cihai-cli 0.35.0
File Size Uploaded Provenance
cihai_cli-0.35.0.tar.gz 300.0 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for cihai-cli 0.35.0
File Interpreter ABI Platform
cihai_cli-0.35.0-py3-none-any.whl Python 3 none any Details

Total release size: 311.7 kB

Release files / cihai_cli-0.35.0.tar.gz

Download URL cihai_cli-0.35.0.tar.gz
Size 300.0 kB
Tags Source
SHA-256 checksum
How to use checksums
4e83c16fe4359e2b9f9f9df505f0438ecd4800bc465d11dfcd996041d9e348be
BLAKE2b-256 checksum
How to use checksums
01ad8fe8701122011bd42ec30b79c0f64f7f2f1e0fb95e332fb584e1636a4ad9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Oct 24, 2026.

Transparency log

Release files / cihai_cli-0.35.0-py3-none-any.whl

Download URL cihai_cli-0.35.0-py3-none-any.whl
Size 11.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
118bd23a05f3abae31ce9a8a70dbcd08f8b115d5bbc422a5da113d0d0032e72e
BLAKE2b-256 checksum
How to use checksums
87a49614f04229abbfee12df74b45ef98bd4f6d2afb568525d20e90a3c480f0f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Oct 24, 2026.

Transparency log

Security for cihai-cli 0.35.0

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.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for cihai_cli-0.35.0.tar.gz

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 Oct 24, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.35.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page