Prerequisites
- OpenAI API key
- Node.js 18+ or Python 3.8+
1. Get API Key
- Sign in to console.openfiles.ai with GitHub
- Go to API Keys Tab
- Click “Create API Key”
- Copy the key (starts with
oa_
)
2. Install SDK
- npm
- yarn
- pnpm
- pip
3. Set Environment Variables
4. Update Your Code
Replace your OpenAI import and add the OpenFiles API key:5. Run Your Code
Your AI can now create, read, and edit files automatically. The agent will use file operations when it determines they’re needed based on the user’s request.Verify It Works
Try these prompts to test file operations:What Just Happened?
- OpenFiles injected 8 file operation tools into your AI
- The AI chose which tools to use based on your requests
- Files are stored with automatic versioning
- Your existing code works exactly the same way