Skip to content
Last updated

Quick reference guide for common Streamline operations.

CLI Commands

Authentication

# Login
aitronos auth login

# Check current user
aitronos auth whoami

# Logout
aitronos auth logout

Organization

# List organizations
aitronos org list

# Select organization
aitronos org select <org-id>

# Show current organization
aitronos org current

Templates

# Download project template
aitronos streamline template download

# Download repository template
aitronos streamline template download --type repository

Repository Management

# Create GitHub repository
aitronos streamline repo create \
  --name my-automation \
  --description "My automation" \
  --private

# List repositories
aitronos streamline repo list

Deployment

# 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

# List automations
aitronos streamline list

# Get automation details
aitronos streamline get <automation-id>

# Delete automation
aitronos streamline delete <automation-id>

Execution

# Execute automation
aitronos streamline execute <automation-id>

# Execute with parameters
aitronos streamline execute <automation-id> \
  --param key1=value1 \
  --param key2=value2

# List executions
aitronos streamline executions list <automation-id>

# Get execution details
aitronos streamline executions get <execution-id>

GitHub Sync

# Connect GitHub repository
aitronos streamline connect <automation-id> \
  --repo https://github.com/user/repo.git \
  --branch main

# Disconnect GitHub
aitronos streamline disconnect <automation-id>

# Trigger manual sync
aitronos streamline sync <automation-id>

# View sync history
aitronos streamline sync-history <automation-id>

Scheduling

# Set schedule (daily at 9 AM)
aitronos streamline schedule set <automation-id> \
  --cron "0 9 * * *" \
  --timezone "UTC"

# Remove schedule
aitronos streamline schedule remove <automation-id>

API Endpoints

Base URL

https://api.aitronos.com/v1/streamline

Authentication

All requests require Bearer token:

-H "Authorization: Bearer $FREDDY_SESSION_TOKEN"

Templates

# Download project template
GET /templates/project

# Download repository template
GET /templates/repository

Repositories

# List repositories
GET /repositories?organization_id=<org-id>

# Get repository automations
GET /repositories/automations?organization_id=<org-id>&repository_url=<url>

Automations

# List automations
GET /automations?organization_id=<org-id>

# Get automation
GET /automations/{automation_id}

# Delete automation
DELETE /automations/{automation_id}

# Upload from Git
POST /automations/upload/git?organization_id=<org-id>

# Upload manually
POST /automations/upload/manual

GitHub Integration

# 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

# Execute automation
POST /automations/{automation_id}/execute

# Get execution status
GET /executions/{execution_id}

# List executions
GET /automations/{automation_id}/executions

Scheduling

# Set schedule
POST /automations/{automation_id}/schedule

# Toggle schedule
POST /automations/{automation_id}/schedule/toggle

# Remove schedule
DELETE /automations/{automation_id}/schedule

Metrics

# Get sync metrics
GET /metrics/sync

Project Structure

Minimal Structure

my-automation/
├── streamline.yaml      # Configuration
├── main.py             # Code
└── requirements.txt    # Dependencies

streamline.yaml

name: my-automation
description: Brief description
execution_file: main.py
parameters:
  - name: param1
    type: string
    required: true
    description: "Parameter description"

main.py

def main(**kwargs):
    """Main automation function."""
    # Your code here
    return {"success": True}

if __name__ == "__main__":
    result = main()
    print(result)

requirements.txt

requests>=2.31.0
pandas>=2.0.0

Cron Expressions

# 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

# 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

# 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 <repo-url>
git push -u origin main

# 5. Deploy to Streamline
aitronos streamline deploy \
  --repo <repo-url> \
  --branch main \
  --name "My Automation"

# 6. Test execution
aitronos streamline execute <automation-id>

# 7. Set schedule
aitronos streamline schedule set <automation-id> \
  --cron "0 9 * * *"

Update Automation

# 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 <automation-id>

# 4. Verify sync
aitronos streamline sync-history <automation-id>

# 5. Test updated automation
aitronos streamline execute <automation-id>

Monitor Executions

# List recent executions
aitronos streamline executions list <automation-id>

# Get specific execution
aitronos streamline executions get <execution-id>

# Check sync status
aitronos streamline sync-history <automation-id>

# View metrics
curl "https://api.aitronos.com/v1/streamline/metrics/sync" \
  -H "Authorization: Bearer $FREDDY_SESSION_TOKEN"

Troubleshooting

Authentication Issues

# Re-authenticate
aitronos auth logout
aitronos auth login

# Verify session
aitronos auth whoami

Deployment Failed

# Check automation details
aitronos streamline get <automation-id>

# View sync history
aitronos streamline sync-history <automation-id>

# Trigger manual sync
aitronos streamline sync <automation-id>

Execution Failed

# Get execution details
aitronos streamline executions get <execution-id>

# Check recent executions
aitronos streamline executions list <automation-id>

# Test locally
python main.py

Webhook Not Working

# Disconnect and reconnect
aitronos streamline disconnect <automation-id>
aitronos streamline connect <automation-id> \
  --repo <repo-url> \
  --branch main

# Verify webhook in GitHub
# Settings → Webhooks → Check recent deliveries

Environment Variables

# 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"

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