# Streamline Quick Reference Quick reference guide for common Streamline operations. ## CLI Commands ### Authentication ```bash # Login aitronos auth login # Check current user aitronos auth whoami # Logout aitronos auth logout ``` ### Organization ```bash # List organizations aitronos org list # Select organization aitronos org select # Show current organization aitronos org current ``` ### Templates ```bash # Download project template aitronos streamline template download # Download repository template aitronos streamline template download --type repository ``` ### Repository Management ```bash # Create GitHub repository aitronos streamline repo create \ --name my-automation \ --description "My automation" \ --private # List repositories aitronos streamline repo list ``` ### Deployment ```bash # Deploy from GitHub aitronos streamline deploy \ --repo https://github.com/user/repo.git \ --branch main \ --name "My Automation" # Deploy from subdirectory aitronos streamline deploy \ --repo https://github.com/user/repo.git \ --subdirectory automation-1 \ --name "Automation 1" # Upload ZIP file aitronos streamline upload \ --file automation.zip \ --name "My Automation" ``` ### Automation Management ```bash # List automations aitronos streamline list # Get automation details aitronos streamline get # Delete automation aitronos streamline delete ``` ### Execution ```bash # Execute automation aitronos streamline execute # Execute with parameters aitronos streamline execute \ --param key1=value1 \ --param key2=value2 # List executions aitronos streamline executions list # Get execution details aitronos streamline executions get ``` ### GitHub Sync ```bash # Connect GitHub repository aitronos streamline connect \ --repo https://github.com/user/repo.git \ --branch main # Disconnect GitHub aitronos streamline disconnect # Trigger manual sync aitronos streamline sync # View sync history aitronos streamline sync-history ``` ### Scheduling ```bash # Set schedule (daily at 9 AM) aitronos streamline schedule set \ --cron "0 9 * * *" \ --timezone "UTC" # Remove schedule aitronos streamline schedule remove ``` ## API Endpoints ### Base URL ``` https://api.aitronos.com/v1/streamline ``` ### Authentication All requests require Bearer token: ```bash -H "Authorization: Bearer $FREDDY_SESSION_TOKEN" ``` ### Templates ```bash # Download project template GET /templates/project # Download repository template GET /templates/repository ``` ### Repositories ```bash # List repositories GET /repositories?organization_id= # Get repository automations GET /repositories/automations?organization_id=&repository_url= ``` ### Automations ```bash # List automations GET /automations?organization_id= # Get automation GET /automations/{automation_id} # Delete automation DELETE /automations/{automation_id} # Upload from Git POST /automations/upload/git?organization_id= # Upload manually POST /automations/upload/manual ``` ### GitHub Integration ```bash # Connect GitHub POST /automations/{automation_id}/github/connect # Disconnect GitHub DELETE /automations/{automation_id}/github/disconnect # Trigger sync POST /automations/{automation_id}/sync # Get sync jobs GET /automations/{automation_id}/syncs # GitHub webhook POST /webhooks/github ``` ### Execution ```bash # Execute automation POST /automations/{automation_id}/execute # Get execution status GET /executions/{execution_id} # List executions GET /automations/{automation_id}/executions ``` ### Scheduling ```bash # Set schedule POST /automations/{automation_id}/schedule # Toggle schedule POST /automations/{automation_id}/schedule/toggle # Remove schedule DELETE /automations/{automation_id}/schedule ``` ### Metrics ```bash # Get sync metrics GET /metrics/sync ``` ## Project Structure ### Minimal Structure ``` my-automation/ ├── streamline.yaml # Configuration ├── main.py # Code └── requirements.txt # Dependencies ``` ### streamline.yaml ```yaml name: my-automation description: Brief description execution_file: main.py parameters: - name: param1 type: string required: true description: "Parameter description" ``` ### main.py ```python def main(**kwargs): """Main automation function.""" # Your code here return {"success": True} if __name__ == "__main__": result = main() print(result) ``` ### requirements.txt ```txt requests>=2.31.0 pandas>=2.0.0 ``` ## Cron Expressions ```bash # Every minute * * * * * # Every hour 0 * * * * # Every day at midnight 0 0 * * * # Every day at 9 AM 0 9 * * * # Every weekday at 9 AM 0 9 * * 1-5 # Every Monday at 9 AM 0 9 * * 1 # Every 15 minutes */15 * * * * # Every 6 hours 0 */6 * * * ``` ## Parameter Types ```yaml # String - name: message type: string required: true # Integer - name: count type: integer default: 10 # Float - name: threshold type: float default: 0.75 # Boolean - name: debug type: boolean default: false # Array - name: tags type: array default: [] # Object - name: config type: object default: {} ``` ## Common Workflows ### Create and Deploy ```bash # 1. Create repository aitronos streamline repo create --name my-automation --private # 2. Initialize project mkdir my-automation && cd my-automation aitronos streamline template download # 3. Write code # Edit main.py, streamline.yaml, requirements.txt # 4. Push to GitHub git init git add . git commit -m "Initial commit" git remote add origin git push -u origin main # 5. Deploy to Streamline aitronos streamline deploy \ --repo \ --branch main \ --name "My Automation" # 6. Test execution aitronos streamline execute # 7. Set schedule aitronos streamline schedule set \ --cron "0 9 * * *" ``` ### Update Automation ```bash # 1. Make changes locally # Edit your code # 2. Commit and push git add . git commit -m "Update automation" git push origin main # 3. Automatic sync via webhook # Or trigger manually: aitronos streamline sync # 4. Verify sync aitronos streamline sync-history # 5. Test updated automation aitronos streamline execute ``` ### Monitor Executions ```bash # List recent executions aitronos streamline executions list # Get specific execution aitronos streamline executions get # Check sync status aitronos streamline sync-history # View metrics curl "https://api.aitronos.com/v1/streamline/metrics/sync" \ -H "Authorization: Bearer $FREDDY_SESSION_TOKEN" ``` ## Troubleshooting ### Authentication Issues ```bash # Re-authenticate aitronos auth logout aitronos auth login # Verify session aitronos auth whoami ``` ### Deployment Failed ```bash # Check automation details aitronos streamline get # View sync history aitronos streamline sync-history # Trigger manual sync aitronos streamline sync ``` ### Execution Failed ```bash # Get execution details aitronos streamline executions get # Check recent executions aitronos streamline executions list # Test locally python main.py ``` ### Webhook Not Working ```bash # Disconnect and reconnect aitronos streamline disconnect aitronos streamline connect \ --repo \ --branch main # Verify webhook in GitHub # Settings → Webhooks → Check recent deliveries ``` ## Environment Variables ```bash # API URL export AITRONOS_API_URL="https://api.aitronos.com" # Session token export AITRONOS_SESSION_TOKEN="your-token" # Organization ID export AITRONOS_ORG_ID="org_xyz123" ``` ## Useful Links - **Documentation**: [Streamline Overview](/docs/documentation/streamline/overview) - **API Reference**: [Streamline API](/docs/api-reference/streamline/introduction) - **Freddy Hub**: https://freddy-hub.aitronos.com - **Support**: support@aitronos.com ## Common Timezones ``` UTC # Coordinated Universal Time America/New_York # US Eastern America/Chicago # US Central America/Denver # US Mountain America/Los_Angeles # US Pacific Europe/London # UK Europe/Paris # Central European Asia/Tokyo # Japan Australia/Sydney # Australia ``` ## Status Codes ``` 200 OK # Success 201 Created # Resource created 202 Accepted # Async operation started 204 No Content # Success, no response body 400 Bad Request # Invalid input 401 Unauthorized # Authentication required 403 Forbidden # Insufficient permissions 404 Not Found # Resource not found 409 Conflict # Resource conflict 422 Unprocessable # Validation error 429 Too Many Requests # Rate limited 500 Internal Error # Server error ``` ## Next Steps - **[Getting Started](/docs/documentation/streamline/getting-started)** - Complete tutorial - **[GitHub Deployment](/docs/documentation/streamline/github-deployment)** - Git-based deployment - **[Scheduling](/docs/documentation/streamline/scheduling)** - Automation scheduling - **[Parameters](/docs/documentation/streamline/parameters)** - Parameter configuration