# โ๏ธ Initial Setup This guide walks you through the initial configuration of the Acode AI CLI Assistant Plugin after installation. ## ๐ฏ First-Time Configuration After installing the plugin and restarting Acode, follow these steps to set it up: 1. **Open the AI Assistant** - Tap the AI CLI Assistant icon in the Acode sidebar - Or use the keyboard shortcut `Ctrl/Cmd + Shift + P` 2. **Select an AI Provider** - The plugin will prompt you to choose an AI provider - You can select from: - OpenAI - Google Gemini - Ollama (local) - Groq - Anthropic Claude - OpenRouter - Qwen - OpenAI-Like 3. **Configure API Credentials** - Enter your API key for the selected provider - For some providers, you'll also need to select a model - For Ollama, you can use the default local endpoint 4. **Set a Passphrase** - Create a secret passphrase to encrypt your API keys - This passphrase will be required for future API key management - Choose a strong passphrase and remember it ## ๐ค AI Provider Selection Choosing the right AI provider depends on your needs: ### OpenAI - **Best for**: General-purpose coding assistance - **Models**: GPT-4, GPT-3.5 Turbo, Qwen, and others - **Requirements**: API key from OpenAI platform ### Google Gemini - **Best for**: Code analysis and explanation - **Models**: Gemini Pro, Gemini 1.5 Pro - **Requirements**: API key from Google AI Studio ### Ollama (Local) - **Best for**: Privacy-focused development - **Models**: Llama2, CodeLlama, Mistral, and others - **Requirements**: Ollama installed locally on your device ### Groq - **Best for**: Fast code generation - **Models**: Llama3, Mixtral, and others - **Requirements**: API key from Groq Cloud ### Anthropic Claude - **Best for**: Detailed code explanation and documentation - **Models**: Claude 3 Opus, Claude 3 Sonnet - **Requirements**: API key from Anthropic ### OpenRouter - **Best for**: Access to multiple AI models through one API - **Models**: All models available through OpenRouter - **Requirements**: API key from OpenRouter ### Qwen - **Best for**: Chinese language developers or those interested in Alibaba's models - **Models**: Qwen Turbo, Qwen Plus, Qwen Max - **Requirements**: API key from Alibaba Cloud ### OpenAI-Like - **Best for**: Custom or self-hosted AI services - **Models**: Any model compatible with OpenAI API - **Requirements**: API endpoint URL, API key, and model name ## ๐ Security Setup The plugin uses advanced encryption to protect your API keys: 1. **AES-GCM Encryption** - All API keys are encrypted using AES-GCM - This provides both confidentiality and integrity 2. **PBKDF2 Key Derivation** - Your passphrase is processed through PBKDF2 - Uses 100,000 iterations for strong key derivation 3. **Random Initialization Vectors** - Each encryption uses a random IV - Ensures the same API key encrypted multiple times produces different ciphertext ## ๐จ UI Configuration The plugin automatically adapts to your Acode theme: ### Dark Mode - Galaxy-themed background with cosmic effects - Blue and purple accent colors - Dark interface elements for comfortable night coding ### Light Mode - Softened galaxy theme with light colors - Reduced animation intensity - Light interface elements for daytime use ### Auto Mode - Follows your system preference - Automatically switches between light and dark themes ## ๐ฑ Interface Orientation The plugin is fully responsive and works in all device orientations: ### Portrait Mode - Optimized for vertical phone use - Compact layout with efficient space usage ### Landscape Mode - Enhanced for horizontal typing - Wider chat interface for better code viewing ### Tablet Support - Full desktop-like experience on tablets - Larger interface elements for touch interaction ## ๐งช Testing Your Setup After completing the initial setup, test your configuration: 1. **Open the AI Assistant** - Use `Ctrl/Cmd + Shift + A` keyboard shortcut 2. **Send a Test Query** - Try something simple like: "Explain what a function is in JavaScript" 3. **Check Response** - You should receive a response from your selected AI provider - If not, check your API key and internet connection 4. **Test Context Features** - Select some code in your editor - Use `Ctrl/Cmd + E` to explain the selected code - Verify that the AI can access your code context ## ๐ ๏ธ Advanced Configuration Options ### Real-Time Analysis - Enabled by default - Provides live code suggestions as you type - Can be configured in settings for different sensitivity levels ### Performance Settings - Adjust debounce timing for real-time analysis - Configure cache expiration times - Optimize for your device's capabilities ### Customization - Modify theme colors through CSS variables - Adjust UI elements for your preferences - Configure keyboard shortcuts ## ๐ง Troubleshooting Setup Issues ### Common Setup Problems #### AI Assistant Not Opening - Ensure the plugin is enabled in Settings โ Plugins - Restart Acode completely - Check that you've completed the initial setup #### Provider Selection Not Working - Verify your internet connection - Check that the selected provider is functioning - Try selecting a different provider #### Passphrase Issues - If you forget your passphrase, you'll need to reconfigure all API keys - The passphrase cannot be recovered if lost - Choose a passphrase you can remember ### Setup Verification To verify your setup is working correctly: 1. Open the AI assistant 2. Send a simple query 3. Check that you receive a proper response 4. Test context-aware features with selected code 5. Verify that your API key is properly encrypted and stored ## ๐ Next Steps After completing the initial setup, you should: 1. Learn about [API Key Configuration](API-Key-Configuration.md) 2. Explore [Basic Chat Operations](Basic-Chat-Operations.md) 3. Try [Real-Time Code Analysis](Real-Time-Code-Analysis.md) 4. Check out [Bulk File Operations](Bulk-File-Operations.md) ## ๐ Getting Help If you encounter issues during setup: 1. Check the [Common Issues](Common-Issues.md) documentation 2. Visit our [GitHub Issues](https://github.com/RenzMc/Acode-Plugin-AI-cli/issues) page 3. Join our [Discussions](https://github.com/RenzMc/Acode-Plugin-AI-cli/discussions) community for support ---