itqan-cli
Itqan Quranic Asset Manager
itqan adds Itqan Quranic data, such as mushafs, tafsirs,
translations and fonts, to your app's project, the way npm or pub adds code libraries.
- You list the assets you want, and which versions you accept, in
itqan-assets.yaml. itqan installdownloads them into a folder in your project.- It records the exact versions it installed in
itqan-assets.lock, so your teammates and your CI get exactly the same files.
It works for any kind of project (web, React Native, Flutter, Python or anything else) on macOS, Linux and Windows.
Contents: Install · Quick start · Use the assets in your app · The manifest · Updating assets · Assets that need access approval · CI · Commands · Configuration · Troubleshooting
Install
Pick the line for the tools you already have. Each one gives you the same itqan command.
| You work with | Install | Needs Python? |
|---|---|---|
| JavaScript, TypeScript, React Native | npm install --save-dev itqan-cli (or just npx itqan-cli ...) |
No |
| Dart or Flutter | dart pub global activate itqan_cli |
No |
| macOS or Linux, with Homebrew | brew install itqan-community/tap/itqan |
No |
| Python 3.11 or newer | pipx install itqan-cli or uv tool install itqan-cli |
Yes |
| GitHub Actions | uses: itqan-community/setup-itqan@v1 (see CI) |
No |
| None of these | Download the program | No |
Check that it works:
itqan --version
The options that don't need Python run a ready-made itqan program for your computer. It exists
for macOS (Apple Silicon and Intel), Linux (x86_64 and arm64, with glibc) and Windows (x86_64).
On any other system, such as Windows on ARM or Alpine Linux, install with Python.
npm
Add it to your project, so everyone on the team gets the same version:
npm install --save-dev itqan-cli
Then run it with npx itqan ..., or from a script in package.json:
{
"scripts": {
"assets": "itqan install"
}
}
To try it without installing anything, use npx itqan-cli init and npx itqan-cli install.
Dart and Flutter
dart pub global activate itqan_cli
If itqan isn't found afterwards, add pub's folder to your PATH. dart pub global activate
prints the folder to add.
The package version is the CLI version: dart pub global activate itqan_cli 0.2.0 gives you
itqan 0.2.0. The first time you run itqan, it downloads the program for your computer from the
GitHub Release, checks it against the
release's SHA256SUMS file, and keeps it for later runs.
Homebrew
brew install itqan-community/tap/itqan
brew upgrade itqan # later, to update
Python
pipx install itqan-cli # or: uv tool install itqan-cli
This installs itqan, and the same command again under the name itqan-cli.
Download the program directly
Each GitHub Release has the program for
each system, named itqan-<version>-<os>-<arch> (with .exe on Windows), and a SHA256SUMS
file to check it with. Download yours, check it, and put it on your PATH as itqan. On an Apple
Silicon Mac, for example:
v=0.2.0 # the release you want
curl -fLO "https://github.com/Itqan-community/itqan-cli/releases/download/v$v/itqan-$v-macos-arm64"
curl -fLO "https://github.com/Itqan-community/itqan-cli/releases/download/v$v/SHA256SUMS"
shasum -a 256 --check --ignore-missing SHA256SUMS # Linux: sha256sum --check --ignore-missing SHA256SUMS
chmod +x "itqan-$v-macos-arm64"
sudo mv "itqan-$v-macos-arm64" /usr/local/bin/itqan
On Windows, download itqan-<version>-windows-x86_64.exe, rename it to itqan.exe, and put it in
a folder on your PATH.
Quick start
Run these in your project's folder:
itqan init # 1. create itqan-assets.yaml, with a few real assets as examples
itqan browse # 2. optional: search the catalog and add the assets you want
itqan install # 3. download them and write itqan-assets.lock
You now have:
your-project/
├── itqan-assets.yaml # what you asked for: edit this, and commit it
├── itqan-assets.lock # what was installed: don't edit it, but commit it
└── assets/
├── english-translation/
│ └── tr-ab-en_hilali.csv
├── tafsir-jalalayn/
│ └── ...
└── .itqan/ # the CLI's own bookkeeping, not part of any asset
Commit itqan-assets.yaml and itqan-assets.lock. You can commit the assets/ folder too, or
add it to .gitignore and run itqan install after cloning (and in CI), which downloads exactly
the versions in the lockfile.
In itqan browse, type to filter the list, press Enter to add the highlighted asset, or press
Space on several and then Enter. itqan browse tafsir starts with a search, and
itqan browse --category translation shows one kind of asset.
Use the assets in your app
Each asset goes into its own folder, <assets_dir>/<entry name>/. assets_dir is assets unless
your manifest says otherwise (see The manifest). Point it at the folder your
framework already serves or bundles.
Web apps (Vite, Next.js, Create React App, and others)
Install into the public/ folder, which these tools serve as-is:
# itqan-assets.yaml
assets_dir: "public/quran"
The files are then served from /quran/:
const csv = await fetch("/quran/english-translation/tr-ab-en_hilali.csv").then((r) => r.text());
Flutter
Flutter only bundles the folders listed in pubspec.yaml, and listing a folder doesn't include
its subfolders. itqan can keep that list for you. Put itqan-assets.yaml next to
pubspec.yaml, and install once with --flutter:
itqan install --flutter
This adds every folder with installed files to flutter: assets:, inside a block that itqan
manages:
flutter:
assets:
- images/ # your own entries are left alone
# itqan:start (managed by `itqan install`, do not edit)
- assets/english-translation/
- assets/tafsir-jalalayn/
# itqan:end
Commit pubspec.yaml with the block. From then on, every itqan install (yours, a teammate's,
CI's) keeps the block in step with the manifest, with no flag needed. Nothing else in
pubspec.yaml is changed, and the file isn't touched at all when nothing changed. Load the files
with rootBundle:
import 'package:flutter/services.dart';
final csv = await rootBundle.loadString('assets/english-translation/tr-ab-en_hilali.csv');
To stop, delete the block, including both marker lines. To skip it for one run, pass
--no-flutter.
React Native, Python and everything else
The assets are plain files in <assets_dir>/<entry name>/. Read them, bundle them or copy them
the way your platform handles any other data file.
The manifest
itqan-assets.yaml lists the assets you want. itqan init writes one for you, with comments
explaining each part. A fuller example:
schema_version: 1
# Where to download the assets, relative to this file. Optional, defaults to "assets".
assets_dir: "public/quran"
assets:
# The entry's name is the asset's name in the catalog (as `itqan browse` shows it).
tafsir-jalalayn:
version: "^2.0.0"
# The same asset in English. Each language is its own entry with its own folder, so it needs its
# own name and has to say which asset it is.
tafsir-jalalayn-en:
asset: tafsir-jalalayn
language: en
version: "~1.3"
Which versions an entry accepts:
version: |
Accepts | Example |
|---|---|---|
"^2.1.0" |
any newer version that keeps the same first number | 2.1.0, 2.4.3, not 3.0.0 |
"~2.1" |
only fixes to 2.1 | 2.1.0, 2.1.7, not 2.2.0 |
"2.1.0" |
exactly this version | 2.1.0 only |
Use ^ unless you have a reason not to. A publisher changes the first number when an update
could break apps that use the asset. Below 1.0 the second number plays that role, so "^0.3.0"
accepts 0.3.x only.
Each language of an asset has its own version history. That's why tafsir-jalalayn above is on
2.x while its English translation is on 1.3.x. Leave out language to get the asset's original
language.
The full format, including every rule and error, is specified in ASSET_MANIFEST.md.
Updating assets
- Add or remove an asset, or change a
version:range: edititqan-assets.yamland runitqan install. It sees that the lockfile no longer matches the manifest, picks the newest versions the manifest allows, and rewrites the lockfile. - Get newer versions within the ranges you already have:
itqan install --force. - Install what the lockfile says, for example after cloning or in CI:
itqan install.
itqan install writes the lockfile only after every download succeeded, so a failed install
never leaves a lockfile that doesn't match your files.
Assets that need access approval
Some publishers approve each developer before their assets can be downloaded.
-
itqan browselists these assets too, markedrequest access,access pendingoraccess rejected, with a link to the asset's page on cms.itqan.dev. Request access there. -
Once you're approved, create an API key at cms.itqan.dev/account/api-keys and save it:
itqan login -
The asset now shows as
grantedinitqan browse, anditqan installcan download it.
If itqan install hits an asset you can't download yet, it says which one and where to request
access. In CI, pass the key in the ITQAN_API_KEY environment variable instead of
itqan login.
CI
Run itqan install in CI to download the exact versions in itqan-assets.lock. On a pull
request that updates an asset, this also checks that the new version installs.
GitHub Actions
The setup-itqan action installs itqan on
Linux, macOS and Windows runners:
steps:
- uses: actions/checkout@v7
- uses: itqan-community/setup-itqan@v1
with:
version: latest # or a fixed version, such as 0.2.0
- run: itqan install
env:
ITQAN_API_KEY: ${{ secrets.ITQAN_API_KEY }} # only needed for assets that need access approval
Pass install: true to have the action run itqan install itself. The
action's README lists all its options.
Other CI systems
Install itqan with whichever method from Install suits your build image. For
example, npm ci for a project with itqan-cli in its devDependencies, or
pipx install itqan-cli. Then run itqan install, with ITQAN_API_KEY set if you need it.
Commands
| Command | What it does |
|---|---|
itqan init |
Create itqan-assets.yaml with a few assets from the catalog, or commented examples when offline. --assets-dir sets where assets go; --force overwrites an existing manifest. |
itqan browse [SEARCH] |
Search the catalog, pick assets, add them to itqan-assets.yaml (created if missing), and optionally install them. --category limits it to one kind of asset; --no-interactive prints a table (the default when not in a terminal); --json prints JSON. |
itqan install |
Download the assets and write itqan-assets.lock. Uses the lockfile's exact versions while it matches the manifest. --force picks the newest allowed versions and downloads again. --flutter keeps pubspec.yaml up to date (see Flutter). --assets-dir overrides the manifest's folder for one run. |
itqan sync |
Same as itqan install. |
itqan login |
Save your API key for the registry, after checking it. --api-key passes the key without the prompt. |
itqan logout |
Remove the saved key. |
itqan --version |
Print the CLI version. |
Add --help to any command for all its options. install and browse read the manifest from
itqan-assets.yaml in the current folder; --manifest (or -m) points them elsewhere.
Configuration
| Option | Environment variable | Default |
|---|---|---|
--api-key |
ITQAN_API_KEY |
The key saved by itqan login, if any. |
--registry-url |
ITQAN_REGISTRY_URL |
https://api.cms.itqan.dev, the public registry. |
ITQAN_CONFIG_DIR |
Where itqan login saves keys: ~/.config/itqan (%APPDATA%\itqan on Windows). |
|
ITQAN_CACHE_DIR |
Dart package only. Where the downloaded program is kept: ~/Library/Caches/itqan (macOS), ~/.cache/itqan (Linux), %LOCALAPPDATA%\itqan (Windows). |
|
ITQAN_CLI_DOWNLOAD_URL |
Dart package only. A folder (https:// or file://) with a release's programs and SHA256SUMS, such as a mirror, used instead of the GitHub Release. |
A key passed with --api-key or ITQAN_API_KEY is used instead of the saved one. The saved key
file is readable only by you.
Troubleshooting
"command not found: itqan". The folder itqan was installed into isn't on your PATH. For
pipx, run pipx ensurepath. For Dart, add the folder dart pub global activate printed. For npm,
run it through npx itqan.
macOS says the program can't be opened. Programs downloaded with a browser are blocked
because they aren't notarized by Apple. Allow it with
xattr -d com.apple.quarantine /usr/local/bin/itqan. Downloads made with curl, Homebrew, npm
or Dart aren't affected.
npm: "@itqan-community/cli-... is not installed". npm installs the program for your computer
as an optional dependency of itqan-cli. Reinstall without --omit=optional or
--no-optional.
"There is no itqan binary for ..." or "no prebuilt binary". Your system isn't one of those
listed under Install. Install with Python instead: pipx install itqan-cli.
itqan install says an asset needs access, or returns 401 or 403. See
Assets that need access approval. In CI, check that
ITQAN_API_KEY is set.
Flutter: "Unable to load asset". Make sure the manifest sits next to pubspec.yaml, run
itqan install --flutter, and then restart the app fully. Hot reload doesn't pick up new assets.
Development
uv sync
uv run pytest
uv build
uv run --group binary pyinstaller --onefile --name itqan --copy-metadata itqan-cli --specpath build src/itqan_cli/__main__.py # dist/itqan
The npm package is built from npm/ and the pub.dev package lives in dart/ (tested
with dart test). Releases are published from version tags; see RELEASING.md.
Metadata
Release files for itqan-cli 0.2.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 |
|---|---|---|---|---|
| itqan_cli-0.2.0.tar.gz | 65.0 kB | With provenance | Details for itqan_cli-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| itqan_cli-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for itqan_cli-0.2.0-py3-none-any.whl |
Total release size: 106.9 kB
Release files / itqan_cli-0.2.0.tar.gz
| Download URL | itqan_cli-0.2.0.tar.gz |
|---|---|
| Size | 65.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
78408ebae53f4a9059c384eb237391746b7dc26f210ee2fa533133fa35e82f14
|
|
BLAKE2b-256 checksum How to use checksums |
51700da6b16e12ec666d0bdb8dd3e78d9f10c892e3b82feda898259161a2ab6d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 12, 2026.
Transparency logRelease files / itqan_cli-0.2.0-py3-none-any.whl
| Download URL | itqan_cli-0.2.0-py3-none-any.whl |
|---|---|
| Size | 41.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
91b1c62f806ebefcab25a03194e01cfcf402ef99e3e953cf6ae90de87aa195d3
|
|
BLAKE2b-256 checksum How to use checksums |
9d1d031b3b7adcfde130722b8d48a61e9579e005edba95d1894d8cdb825f7ad9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 12, 2026.
Transparency logSecurity for itqan-cli 0.2.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
Both files in this release have been uploaded with provenance metadata.
Attestation for itqan_cli-0.2.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 12, 2026.
Transparency logA 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.