Edison Developer Documentation
Welcome to the Edison developer documentation! This guide will help you understand Edison's architecture, code organization, and how to extend its functionality.
Table of Contents
- Architecture Overview
- Code Structure
- API Integration
- Contributing Guidelines
- Development Environment Setup
Getting Started with Development
Edison is a Python application that translates natural language into shell commands using OpenAI's APIs. It's designed to be modular and extensible, making it easy to add new features.
flowchart TD
User([User]) -->|Query| CLI[CLI Module]
CLI -->|Process| Core[Core Module]
Core -->|API Request| OpenAI[OpenAI API]
OpenAI -->|Response| Core
Core -->|Command| Shell[Shell]
Core -->|Feedback| CLI
CLI -->|Display| User
subgraph Edison Application
CLI
Core
end
style User fill:#f9d5e5,stroke:#333,stroke-width:2px
style Edison Application fill:#d3f6db,stroke:#333,stroke-width:4px
style OpenAI fill:#d3f6f5,stroke:#333,stroke-width:2px
style Shell fill:#eeeeee,stroke:#333,stroke-width:2px
Quick Start for Developers
-
Clone the repository:
git clone https://github.com/user/command-assistant cd command-assistant -
Create a development environment:
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate pip install -e . -
Run Edison in development mode:
python -m edison your query here
Key Developer Resources
| Resource | Description |
|---|---|
| Architecture Overview | High-level design and component interaction |
| Code Structure | Detailed breakdown of the codebase |
| API Integration | How Edison interacts with the OpenAI API |
| Contributing Guidelines | How to contribute to the project |
Development Philosophy
Edison follows these design principles:
- Modularity: Components should be loosely coupled and focused on a single responsibility
- Simplicity: Keep the codebase simple and maintainable
- User-centric: Features should address real user needs
- Safety: Prioritize user safety when generating and executing commands
Component Overview
Edison is organized into several main components:
- CLI: Command-line interface and user interaction
- Core: Business logic, API integration, and command processing
- Config: Configuration management
- UI: User interface components
- Utils: Utility functions and helpers