Commands

unihan-etl provides a subcommand-based CLI for working with UNIHAN data.

Usage

Running unihan-etl without arguments shows help with available commands:

$ unihan-etl

Available Commands

Command

Description

export

Export UNIHAN data to CSV, JSON, or YAML

download

Download and cache UNIHAN database

fields

List available UNIHAN fields

files

List available UNIHAN source files

search

Look up character data

Main command

The unihan-etl command is the entry point for all UNIHAN ETL operations. Use subcommands to export data, download the database, or query fields and files.

Command

unihan-etl - Export UNIHAN data to CSV, JSON, or YAML.

Download and export Unicode Han character database.

download:

unihan-etl download

explore:

unihan-etl fields unihan-etl files unihan-etl search 好

Usage

usage: unihan-etl [-h] [-V] [-l {DEBUG,INFO,WARNING,ERROR,CRITICAL}]
                  {export,download,fields,files,search} ...

Examples

$ unihan-etl export
$ unihan-etl export -F json -f kDefinition

Options

-V, --version

show program's version number and exit

-l, --log-level

Logging level. Default: INFO

Default
INFO
Choices
DEBUG, INFO, WARNING, ERROR, CRITICAL

Global Options

  • -l, --log-level {DEBUG,INFO,WARNING,ERROR,CRITICAL}: Logging level (default: INFO)

  • -V, --version: Show version and exit

Output Formats

The fields, files, and search commands support different output formats:

  • Table (default): Human-readable formatted output

  • --json: Pretty-printed JSON (entire result as array/object)

  • --ndjson: Newline-delimited JSON (one record per line, ideal for LLM consumption)