"""Documentation: Usage Guide""" # Usage Guide - Burme-Coder-Max ## Quick Start ### Ask a Question ```bash burme-coder ask "Python decorator hta ya py" ``` ### Interactive Mode ```bash burme-coder interactive ``` ### Train Agent ```bash burme-coder train --data ./data/trajectories ``` ## CLI Commands ### `ask` - Ask a single question ```bash burme-coder ask [INSTRUCTION] [OPTIONS] Options: --model TEXT AI model to use (default: gpt-4) --verbose Show detailed output --output, -o Save response to file ``` ### `interactive` - Start chat mode ```bash burme-coder interactive ``` Interactive commands: - `exit` - Quit - `clear` - Clear history - `help` - Show help - `history` - Show conversation history ### `train` - Train on trajectories ```bash burme-coder train [OPTIONS] Options: --data TEXT Training data directory (default: ./data/trajectories) --epochs INT Number of epochs (default: 10) --batch-size INT Batch size (default: 4) ``` ### `eval` - Evaluate performance ```bash burme-coder eval --data ./data/trajectories ``` ## Python API ### Import and Use Agent ```python from burme_coder.core import CoderAgent agent = CoderAgent(model="gpt-4") response = agent.generate_response("Python list sorting hta ya") print(response["response"]) ``` ### Use Animations ```python from burme_coder.animations import Spinner, ProgressBar with Spinner("Loading"): do_something() for i in ProgressBar(range(100)): process(i) ``` ### Use Thanking System ```python from burme_coder.ui.thanking import ThankYou ThankYou.show() ``` ## Configuration Edit `.env` file: ```bash # API Keys OPENAI_API_KEY=sk-your-key-here # Animation Settings ANIMATION_SPEED=0.05 ANIMATION_COLOR=true # Cache Settings CACHE_DIR=./data/cache CACHE_TTL=3600 ``` ## Knowledge Base Search local knowledge: ```python from burme_coder.knowledge import LocalKB kb = LocalKB() results = kb.search("python decorators") for result in results: print(result["snippet"]) ``` Update from web: ```python from burme_coder.knowledge import WebUpdater updater = WebUpdater() updater.update_markdown_files("./data/knowledge/skills") ``` ## Examples See `examples/` directory for more examples: - `demo_animation.py` - Animation demonstrations - `demo_thanking.py` - Thanking system examples - `demo_skill_query.py` - Knowledge base queries