RKNN CLI
A command line tool for parsing and displaying RKNN model information with FlatBuffers support.
Features
- Parse both FlatBuffers binary data and JSON metadata from RKNN files
- Extract detailed model information including format, compiler, runtime
- Display input/output tensor information with layout (NCHW) and data type
- Visualize FlatBuffers graph with Graphviz (SVG output)
- Python 3.8+ compatible
Installation
From PyPI (Recommended)
pip install rknncli
Development Installation
git clone https://github.com/your-username/rknncli.git
cd rknncli
pip install -e .
Usage
rknncli <path-to-rknn-model>
Example:
rknncli assets/base-encoder.rknn
Graph visualization:
rknncli assets/base-encoder.rknn --draw base-encoder.svg
Note: Graph visualization requires Graphviz installed and dot available in PATH.
Output Format
The tool prints comprehensive model information including FlatBuffers metadata:
Model: rknn model
Target Platform: rk3588
Format: RKNPU v2
Source: ONNX
Compiler: 2.1.0+708089d1(compiler version: 2.1.0)
Runtime: rk3588
Number of graphs: 1
Input information
--------------------------------------------------------------------------------
ValueInfo "base-mel": type FLOAT32, shape [1, 80, 3000], layout NCHW,
Output information
--------------------------------------------------------------------------------
ValueInfo "cross_k_0": type FLOAT16, shape [1, 1500, 512], layout NCHW,
ValueInfo "cross_v_0": type FLOAT16, shape [1, 1500, 512], layout NCHW,
Development
Prerequisites
- Python 3.8+
- FlatBuffers compiler (for schema updates)
Setup
# Clone the repository
git clone https://github.com/hebangwen/rknncli.git
cd rknncli
# Install in development mode
pip install -e .
# Run tests
rknncli assets/base-encoder.rknn
Updating FlatBuffers Schema
If you need to update the RKNN schema:
cd schemas
./generate_schema.sh
Publishing to PyPI
To publish a new version:
# Build the package
python -m build
# Upload to PyPI
./scripts/upload_to_pypi.sh
Changelog
See CHANGELOG.md for version history.
License
MIT License - see LICENSE file for details.
Metadata
Release files for rknncli 0.3.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| rknncli-0.3.3.tar.gz | 34.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| rknncli-0.3.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 61.6 kB
Release files / rknncli-0.3.3.tar.gz
| Download URL | rknncli-0.3.3.tar.gz |
|---|---|
| Size | 34.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9e0c5135bffa457cb8617c4710c56dd21778a698098d18cde53760e0ace4848c
|
|
BLAKE2b-256 checksum How to use checksums |
e5facd912f9a0faabacdf6d52f78cba18af7666bc7a682b73f9201668517bd8e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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 Feb 6, 2026.
Transparency logRelease files / rknncli-0.3.3-py3-none-any.whl
| Download URL | rknncli-0.3.3-py3-none-any.whl |
|---|---|
| Size | 27.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5e0190cda858ebf0b17908af4d893b5c236e73138ac17f74b51a6f4e4bbc729c
|
|
BLAKE2b-256 checksum How to use checksums |
fedbcc5f3293f838e583028aa6f827a2b93c41ccd81e4b06b09b404aa5d88b26
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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 Feb 6, 2026.
Transparency log