thcode is distributed as a global npm package with the bin commandDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/Temicide/thcode/llms.txt
Use this file to discover all available pages before exploring further.
thcode pointing to dist/index.js. Because Node.js is a runtime prerequisite — not merely a build tool — it must be installed before you can run thcode itself. The steps below walk through installing prerequisites, building from source, and verifying the result.
Prerequisites
| Requirement | Minimum | Recommended baseline |
|---|---|---|
| Operating system | Windows 11 | Windows 11 25H2+ |
| Node.js | 22.x | 24 LTS |
| PowerShell | 7.4 (pwsh.exe) | 7.6 LTS (pwsh.exe) |
| Terminal | Windows Terminal | Windows Terminal |
Why Windows First?
thcode’s Windows-first scope (ADR 0008) is a deliberate engineering trade-off. Cross-platform support requires separate adapters for credential stores (DPAPI on Windows, Keychain on macOS, Secret Service on Linux), shell execution semantics, path handling (drive letters, backslashes, case-insensitivity), and terminal behavior. Proving one platform end-to-end before expanding reduces implementation risk. macOS and Linux support are planned in that order after the Windows baseline is stable.Build from Source
Clone the repository and enter the CLI directory
Open Windows Terminal and launch a PowerShell 7 (
pwsh.exe) session. Navigate to the repository root, then move into the cli/ subdirectory — this is the only subdirectory with a supported release path.Install dependencies
Install all Node.js dependencies declared in
package.json. This includes runtime dependencies (ink, react, better-sqlite3) and development dependencies (typescript, vitest).Compile TypeScript
Run the TypeScript compiler using the project’s Under the hood this runs
tsconfig.json. Output lands in dist/.tsc -p tsconfig.json. A clean build produces no errors and emits JavaScript to dist/.Run the test suite
Confirm the build is correct by running the offline Vitest suite. All tests run without provider credentials or network access.
The test suite is fully offline. No Typhoon API key or any other provider credential is required to pass it.
Development Mode (No Build Step)
During active development you can skip the compile step entirely. Thedev script uses Node.js’s experimental TypeScript strip-types support to run src/index.ts directly:
Global Installation (Optional)
Once the package is built, you can link it globally so thethcode command is available anywhere in your PowerShell session:
thcode bin command (declared in package.json as "thcode": "dist/index.js") becomes available on your PATH:
Continuous Watch Mode
To keep the test suite running as you edit source files:vitest in watch mode and re-executes affected tests on every save.