DJ-Goanna-Coding/oppo-node
0
1# Quick Start Guide2 3## Initial Setup (First Time)4 51. **Run the setup script:**6 ```bash7 bash setup.sh8 ```9 102. **Configure your credentials:**11 Edit `.env` file with your credentials:12 - Get HuggingFace token from: https://huggingface.co/settings/tokens13 - Get Anthropic API key from: https://console.anthropic.com/14 153. **Update space names:**16 Edit `config.yaml` to set your HuggingFace space names17 18## Using the Web Interface19 20```bash21streamlit run app.py22```23 24Then open your browser to the URL shown (usually http://localhost:8501)25 26### Web Interface Features:27 28- **Dashboard**: Overview of your spaces and recent activity29- **AI Agent**: Chat with Claude to get help with code and file management30- **File Manager**: Browse, upload, and manage files31- **Space Sync**: Synchronize files to HuggingFace Spaces32- **Audit & Archive**: Create file inventories and compressed archives33 34## Using the Command Line35 36### Run File Audit37```bash38python automation.py audit39```40Creates `inventory.json` and `genesis_archive_*.tar.gz`41 42### Sync All Configured Spaces43```bash44python automation.py sync45```46Uploads files to all spaces with `auto_sync: true`47 48### Sync Specific Space49```bash50python automation.py sync-space --space vamguard-titan51```52 53### Create Backup54```bash55python automation.py backup56```57Backs up everything to mapping-and-inventory space58 59### Full Automation60```bash61python automation.py full62```63Runs: audit → sync all → backup64 65## GitHub Actions Setup66 67For automated syncing via GitHub Actions:68 691. **Add secrets to your GitHub repository:**70 - Go to Settings → Secrets and variables → Actions71 - Add: `HF_TOKEN`, `HF_USERNAME`, `ANTHROPIC_API_KEY`72 732. **Push to trigger:**74 ```bash75 git add .76 git commit -m "Initial setup"77 git push78 ```79 803. **Manual trigger:**81 - Go to Actions tab on GitHub82 - Select "HuggingFace Space Sync" workflow83 - Click "Run workflow"84 85## Common Tasks86 87### Create a New HuggingFace Space88 89**Via Web UI:**901. Open app: `streamlit run app.py`912. Navigate to "Space Sync" → "Create Space" tab923. Enter space name and click "Create Space"93 94**Via Python:**95```python96from hf_space_sync import HFSpaceSync97 98sync = HFSpaceSync()99sync.create_space("my-new-space", "streamlit", private=False)100```101 102### Upload Files to a Space103 104```python105from hf_space_sync import HFSpaceSync106 107sync = HFSpaceSync()108sync.upload_files("vamguard-titan", "app.py", commit_message="Update app")109```110 111### Ask the AI Agent for Help112 113**Via Web UI:**1141. Open app: `streamlit run app.py`1152. Go to "AI Agent" page1163. Type your question: "How do I organize my Python files?"117 118**Via Python:**119```python120from app import AIAgent121 122agent = AIAgent()123response = agent.process_request("Help me sync files to HuggingFace")124print(response)125```126 127## Troubleshooting128 129**"Module not found" errors:**130```bash131source venv/bin/activate # Activate virtual environment132pip install -r requirements.txt133```134 135**HuggingFace authentication errors:**136- Check `.env` file has correct `HF_TOKEN`137- Verify token at https://huggingface.co/settings/tokens138- Ensure token has write permissions139 140**AI Agent not responding:**141- Verify `ANTHROPIC_API_KEY` in `.env`142- Check API key at https://console.anthropic.com/143- Ensure you have API credits144 145## File Locations146 147- **Configuration**: `config.yaml`148- **Environment**: `.env`149- **Logs**: `automation_log_*.txt`150- **Reports**: `automation_report_*.json`151- **Inventories**: `inventory.json`152- **Archives**: `genesis_archive_*.tar.gz`153 154## Getting Help155 156- Check the full README.md for detailed documentation157- Review logs in `automation_log_*.txt`158- Open an issue on GitHub159- Use the AI Agent in the web interface160 161## Next Steps162 1631. Customize `config.yaml` for your needs1642. Add more spaces to the configuration1653. Set up GitHub Actions for automation1664. Explore the AI Agent capabilities1675. Create scheduled backups168 169Happy coding! 🚀170 