poka.sh

Docs

Environment variables and file locations

reference

File locations

What Linux and macOS Windows
Config root ~/.poka/ %APPDATA%\Poka\
Extensions ~/.poka/extensions/ %APPDATA%\Poka\extensions\
Caches poka/ under the operating system's cache directory poka\ under the same

Each extension lives in its own subdirectory of the extensions directory, holding a plugin.json manifest and a .wasm file. The directory is created on first use. A multi-format module lists the extra extensions it handles in its manifest's aliases, so one install covers them all.

The cache directory is ~/.cache on Linux, ~/Library/Caches on macOS and %LOCALAPPDATA% on Windows. Under its poka/ folder:

Folder Holds
thumbnails/ Thumbnails, about 256 pixels on the longest side
previews/ Cached preview results, keyed by path, modification time and extension
generated/ Output a module generates, such as a mesh tessellated from STEP
wasm-cache/ Compiled modules, so the first preview of a format skips compilation

Transcoded audio and video (made when ffmpeg is on PATH) are written to poka/transcoded/ under the system temporary directory. The settings window shows the size of these caches and can clear them. Clearing is safe: everything is rebuilt on demand.

Environment variables

Desktop app

Variable Effect
POKA_LIBMPV Full path to libmpv. When set it is the only place Poka looks, so a wrong path is reported rather than falling back to another copy. Otherwise Poka looks next to the executable, then on the system search path
POKA_REGISTRY_URL The catalogue extensions are installed from. Default https://poka.sh/api/formats.json
POKA_REGISTRY_ALLOW_UNVERIFIED 1 lets an install proceed without a hash check. For a local development registry only
POKA_INITIAL_FILE The file to preview when the app starts. Set by the poka <file> command itself; you rarely need to set it
POKA_DEV_BIN Used by desktop/src-tauri/dev-launcher.sh to point at a different debug binary

Local web server (poka-web)

Variable Effect
POKA_WEB_ADDR Address to bind. Default 127.0.0.1:21220. Use 0.0.0.0:8787 to reach it from another machine, or a port of 0 for a throwaway port (the chosen address is printed on start)
POKA_WEB_EXTENSIONS Directory of extensions to serve. Default web/extensions/, which scripts/fetch-extensions.py fills
POKA_WEB_EXAMPLES Directory served under /examples/ and used by ?src=. Default: poka-samples/sample files beside the repository

Developer tooling

Variable Effect
POKA_INTERFACES, POKA_PARSERS, POKA_VIEWERS, POKA_SAMPLES Where the scripts find each sibling repository. If set, it must name a checkout; a wrong value is an error. Otherwise the scripts look beside this repository, or beside any folder above it
POKA_EXTENSIONS_DIR Extensions directory for scripts/test-parsers.py and test-parsers-robustness.py (also --extensions-dir)
POKA_WEB_URL The server scripts/test-parity.mjs and scripts/corpus-coverage.mjs talk to. Default http://127.0.0.1:21220

Do not set CARGO_TARGET_DIR: it overrides the shared target directory each sibling repository pins, and makes every crate build its own copy of the dependencies.