Direct access to the OpenFiles API with complete control over file operations. Perfect for custom integrations, non-AI workflows, and advanced use cases.
Create a new file or new version of existing file:
Copy
const result = await client.writeFile({ path: 'docs/api-guide.md', content: '# API Guide\n\nThis guide covers...', contentType: 'text/markdown'})// Creates version 1, or increments version if file exists
// Separate clients for different projectsconst projectA = new OpenFilesClient({ apiKey: 'oa-...', basePath: 'clients/project-a'})const projectB = new OpenFilesClient({ apiKey: 'oa-...', basePath: 'clients/project-b'})// Files are automatically organized:// clients/project-a/documents/contract.pdf// clients/project-b/documents/contract.pdf