Documentation Index
Fetch the complete documentation index at: https://docs.openfiles.ai/llms.txt
Use this file to discover all available pages before exploring further.
GitHub Repository
All our examples are available in our GitHub repository:
OpenFiles Examples
github.com/openfiles-ai/openfiles/tree/main/examplesComplete, runnable projects you can clone and modify
Quick Start Examples
Create a README Generator
import OpenAI from '@openfiles-ai/sdk/openai'
const ai = new OpenAI({
apiKey: process.env.OPENAI_API_KEY,
openFilesApiKey: process.env.OPENFILES_API_KEY,
basePath: 'projects'
})
async function generateReadme(projectName: string, description: string) {
const response = await ai.chat.completions.create({
model: 'gpt-4',
messages: [{
role: 'user',
content: `Create a comprehensive README.md for a project called "${projectName}".
Description: ${description}`
}]
})
return response.choices[0].message.content
}
// Usage
const result = await generateReadme(
'OpenFiles SDK',
'File storage for AI agents'
)
console.log(result)
Core Client Usage
import { OpenFilesClient } from '@openfiles-ai/sdk/core'
const client = new OpenFilesClient({
apiKey: process.env.OPENFILES_API_KEY
})
// Create specifications file
await client.writeFile({
path: 'design/todo-app-specs.md',
content: 'UI specifications for todo application...'
})
// Read specifications
const specs = await client.readFile({
path: 'design/todo-app-specs.md'
})
// Implement based on specs
await client.writeFile({
path: 'code/todo-app.js',
content: generateTodoAppCode(specs.content)
})
// Create review document
await client.writeFile({
path: 'reviews/todo-app-review.md',
content: 'Code review findings...'
})
Running the Examples
-
Clone the repository
git clone https://github.com/openfiles-ai/openfiles.git
cd examples
-
Choose an example
cd typescript/openai-chat-app
-
Install dependencies
-
Set environment variables
cp .env.example .env
# Edit .env with your API keys
-
Run the example
Contributing Examples
- Fork the examples repository
- Create your example in the appropriate language folder
- Include a README with setup instructions
- Submit a pull request
Get Help
Email Support
Get help from our support team
GitHub Issues
Report issues with examples