nx-title-id
Prints the title ID of the Nintendo Switch game whose packages (.nsp, .nsz, .xci, .xcz) are in a folder.
uvx nx-title-id <folder> [-k prod.keys]
Base games, updates and DLC in the same folder all count as their base game, so a folder with one game prints one line:
$ uvx nx-title-id ~/Games/Super\ Mario\ Odyssey
0100000000010000
How the title ID is found
For each package, in order:
- The ticket's name. A package's ticket is named after its rights ID (
<32 hex digits>.tik), whose first 16 digits are the title ID. This wins over the file name, since tags in file names can be wrong. - A
[title ID]tag in the file name, such asGame [0100000000010000][v0].nsp. - The meta NCA. For a package with neither, the NCA headers are decrypted with
header_keyfromprod.keys, and the lowest title ID among the meta NCAs is used. The keys file is-k, else~/.switch/prod.keyswhen it exists; it is read only when a package needs it, and no key value is printed.
Steps 1 and 2 use only the Python standard library. Step 3 uses pycryptodome for AES.
Cartridge images (.xci, .xcz) seldom carry a ticket, so they usually need a tag or the keys. Cartridge dumps with the 0x1000-byte key area at the start, and NCA0 headers from very early titles, are not read.
Exit status
0 when at least one title ID was printed. Non-zero, with a message, when the path is not a folder, no package has a readable title ID, the keys file is missing or has no header_key. When the folder holds more than one game, every title ID is printed and a warning goes to stderr.
Development
uv run nx-title-id <folder> # run from this folder
uv run tryke test # run the tests
uv build # sdist and wheel into dist/
uv publish # upload to PyPI
Metadata
Release files for nx-title-id 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| nx_title_id-1.0.0.tar.gz | 6.3 kB | Without provenance | Details for nx_title_id-1.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| nx_title_id-1.0.0-py3-none-any.whl | Python 3 | none | any | Details for nx_title_id-1.0.0-py3-none-any.whl |
Total release size: 13.4 kB
Release files / nx_title_id-1.0.0.tar.gz
| Download URL | nx_title_id-1.0.0.tar.gz |
|---|---|
| Size | 6.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5d1b461c0cf571bd77f4279d98df3c5349654f2ed4b2c107911489e3ca787d52
|
|
BLAKE2b-256 checksum How to use checksums |
f350d6328fdc1ec45c04533a3f1bb68905620d7c025e187c57cdb5475f6ddd35
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.13.6 {"installer":{"name":"uv","version":"0.13.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / nx_title_id-1.0.0-py3-none-any.whl
| Download URL | nx_title_id-1.0.0-py3-none-any.whl |
|---|---|
| Size | 7.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
dacd8fdf3aa0ab777f1dac154e953d9ca90b4a2045b0a2e4741da75d3d532903
|
|
BLAKE2b-256 checksum How to use checksums |
1daaa54c5cf3905c2038df9d03b9bcb75fbe0e0d8f80fa707540df293c0c60c6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.13.6 {"installer":{"name":"uv","version":"0.13.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for nx-title-id 1.0.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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
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.