Get started in 3 steps:
- Install:
npm install -g @tinfoil-code/qwen-code@latest
- Run:
tinfoil-qwen
- Enter your Tinfoil API key when prompted
What is Tinfoil Code?
Tinfoil Code is a privacy-focused command-line AI coding assistant. Unlike traditional AI coding tools, it processes all AI inferences using Tinfoil, ensuring all data remains inside secure hardware enclaves and is never accessible by anyone.Prerequisites
- Node.js v20+
- Tinfoil API Key: Get an API key
Installation and Setup

Using Tinfoil Code
Once setup is complete, you can start asking questions:
> Analyze this codebase
> Explain this function
> Generate tests for this module


Configuration
Session Management
Control your token usage with configurable session limits to optimize costs and performance. Create or edit.tinfoil/settings.json
in your home directory:
Session token limit applies to a single conversation, not cumulative API calls.
Alternative API Key Setup
Environment Variable:.env
File:
Create a .env
file in your project root:
Usage Examples
Explore Codebases
Code Development
Automate Workflows
Debugging & Analysis
Session Commands
/help
- Display available commands/clear
- Clear conversation history/compress
- Compress history to save tokens/stats
- Show current session information/exit
or/quit
- Exit Tinfoil Code