Development uses Bun as the runtime, package manager, test runner, and build driver.
bun installThe repo also includes a devenv.sh environment with Bun, Git, Zig, Nix language support, and TypeScript language support:
devenv shell
bun installbun run devStart with an initial query:
bun run dev pikachuRun the CLI entrypoint directly:
bun run src/cli.tsx charizardCompile the app to dist/pkdx:
bun run buildPass a Bun compile target when building for another platform:
bun build --compile --target=bun-linux-x64 --outfile=dist/pkdx src/cli.tsxSmoke-test the compiled binary:
bun run smoke:binaryThe npm wrapper package uses a Node launcher at bin/pkdx.mjs and lists platform binary packages as optional dependencies. Release builds create one npm package per binary under dist/npm/platform/ and a sanitized wrapper package under dist/npm/root/, then publish the platform packages before publishing the wrapper package.
Keep local development builds at dist/pkdx; the wrapper package files allowlist excludes dist/ so a host-only development binary is not published by accident.
Supported npm binaries are macOS arm64/x64, glibc Linux arm64/x64, and Windows x64. Alpine/musl Linux is not currently shipped.
Before publishing, verify package contents with:
bun run prepare:release-packages
bun run verify:release-packageMain local quality gate:
bun run checkOther useful commands:
bun test
bun run typecheck
bun run format:check
bun run lint
bun run bench
bun run ciFor OpenSpec work on the active rebuild change:
bun run openspec validate rebuild-terminal-pokedexFor devenv changes:
devenv testSearch uses generated species indexes in src/search/. Regenerate them when search source data or alias overrides change:
bun run generate:indexPokeAPI types are generated from the upstream OpenAPI document:
bun run generate:pokeapi-typesDo not manually edit src/pokeapi/generated.ts; regenerate it instead.
src/cli.tsxparses CLI options and starts the OpenTUI renderer.src/ui/contains the React/OpenTUI interface.src/app-state.tsowns search/detail state transitions and key handling.src/search/owns species index lookup and fuzzy search.src/pokemon-detail.tsandsrc/pokeapi/load and shape PokeAPI data.src/pokesprite.ts,src/sprite-rendering.ts, andsrc/terminal-images.tsresolve and render sprites.docs/adr/records accepted project decisions.CONTEXT.mddefines the domain language used in the codebase.