Astronox Docs

Automations

Save and reuse AI-generated scripts and workflows.

Automations

Save and reuse AI-generated scripts and workflows.

What Are Automations?

Automations let you save useful scripts, commands, or workflows generated by Astronox, then reuse them later with simple prompts.

Example:

You: "Write a script to backup my Documents folder"
AI: [Generates bash script]

You: "Save this as an automation called 'Backup Docs'"
AI: ✓ Saved automation: Backup Docs

[Later...]
You: "Run my backup docs automation"
AI: [Executes saved script]

Why Use Automations?

✅ Reusability

Write once, use many times

Create: "Organize downloads automation"
Reuse: "Run downloads automation" (anytime)

✅ Consistency

Same reliable script every time

  • No re-explaining requirements
  • No variations in approach
  • Proven to work

✅ Time Saving

Skip the generation step

Without automation:
1. Describe task (2 min)
2. AI generates script (1 min)
3. Review and run (1 min)
Total: 4 minutes

With automation:
1. "Run backup automation"
Total: 10 seconds

✅ Sharing (Future)

Export automations to share with team


Types of Automations

Shell Scripts

Bash/Zsh (macOS):

#!/bin/bash
# Backup script
rsync -av ~/Documents/ /Volumes/Backup/Documents/

PowerShell (Windows):

# Backup script
Copy-Item -Recurse ~/Documents/* D:\Backup\Documents\

Python Scripts

#!/usr/bin/env python3
# File organizer
import os
import shutil
from pathlib import Path

def organize_downloads():
    downloads = Path.home() / "Downloads"
    for file in downloads.iterdir():
        if file.suffix == ".pdf":
            dest = downloads / "PDFs"
            dest.mkdir(exist_ok=True)
            shutil.move(str(file), str(dest / file.name))

AppleScript (macOS)

-- Set volume automation
set volume output volume 50
display notification "Volume set to 50%" with title "Astronox"

Multi-Step Workflows

Not just code - entire workflows:

Automation: "Morning Setup"
1. Open Terminal
2. cd to project folder
3. Start development server
4. Open VS Code
5. Launch Chrome to localhost:3000

Creating Automations

From AI Response

Step 1: Ask AI to generate

You: "Write a script to compress old files"
AI: [Generates script with explanation]

Step 2: Save as automation

You: "Save this as an automation"
AI: What would you like to name it?

You: "Compress Old Files"
AI: ✓ Saved automation: Compress Old Files
   Location: ~/Library/.../automations/compress-old-files.sh

From Existing Script

Import your own:

You: "Save this script as an automation:
     [paste your script]"

AI: ✓ Created automation from your script
   Name it?

You: "Daily Backup"

Automation Metadata

Each automation stores:

  • Name: User-friendly name
  • Script: The actual code
  • Description: What it does (auto-generated)
  • Type: bash, python, applescript, etc.
  • Created: Timestamp
  • Last run: Last execution time
  • Run count: Usage tracking

Running Automations

By Name

"Run my backup automation"
"Execute the compress files automation"
"Start my morning setup workflow"

List Available

You: "Show my automations"
AI: You have 5 saved automations:

    1. Backup Docs (bash) - Last run: 2 days ago
    2. Organize Downloads (python) - Last run: yesterday
    3. Compress Old Files (bash) - Never run
    4. Morning Setup (workflow) - Last run: today
    5. Weekly Cleanup (bash) - Last run: 7 days ago

Preview Before Run

You: "Show me the backup automation"
AI: [Displays script content and description]

You: "Run it"
AI: [Executes]

Managing Automations

Viewing Details

You: "Tell me about the Backup Docs automation"

AI: Automation: Backup Docs
    Type: Bash script
    Created: Dec 10, 2025
    Last run: 2 days ago
    Run count: 15 times

    Description:
    Backs up Documents folder to external drive
    using rsync with progress and verification

    Script: (45 lines)
    #!/bin/bash
    ...

Editing Automations

You: "Edit the backup automation"
AI: [Shows current script]

You: "Change the backup location to /Volumes/TimeMachine"
AI: [Updates script]
    ✓ Updated automation

    Review changes?

You: "Yes"
AI: [Shows diff of changes]

Renaming

"Rename 'Backup Docs' to 'Daily Document Backup'"

Deleting

You: "Delete the compress files automation"
AI: ⚠️ Are you sure?
    This will permanently delete:
    • Compress Old Files automation
    • Script file
    • Run history

    [✓ Delete] [✗ Cancel]

Automation Safety

Safe Mode Confirmations

Even for saved automations:

You: "Run cleanup automation"

AI: ⚠️ This automation will:
    • Delete files older than 90 days
    • Empty trash
    • Free up estimated 5GB

    Proceed?
    [✓ Run] [✗ Cancel]

Full Mode

Trusted automations run immediately:

You: "Run backup automation"
AI: ✓ Running...
    [Progress updates]
    ✓ Backup complete

Review Before First Run

New automation first run:

You: "Run new automation"

AI: ⚠️ First run of this automation

    It will:
    • Read files from ~/Documents
    • Compress files >100MB
    • Save to ~/Archives/

    Review script? [Yes] [No, trust and run]

Advanced Automation Features

Parameters

Parameterized automations:

Save script: backup-folder.sh [folder] [destination]

Run with params:
"Run backup folder automation for ~/Projects to /Backup"

AI substitutes:

# Original
rsync -av $1 $2

# Becomes
rsync -av ~/Projects /Backup

Scheduling (Future)

Coming soon:

"Schedule 'Daily Backup' to run every day at 6 PM"
"Run 'Weekly Cleanup' every Sunday at 10 AM"

Astronox will:

  • Use system scheduler (cron/Task Scheduler)
  • Send notifications on completion
  • Log results

Chaining Automations

Run multiple automations:

"Run my morning routine:
1. Backup automation
2. Organize downloads automation
3. Start dev server automation"

Creates temporary plan linking automations


Error Handling

Smart retries:

Automation fails:
• Retry 3 times
• Log error details
• Notify user
• Suggest fixes

Automation Templates

Pre-built Examples

File Management:

  • Organize Downloads by Type
  • Archive Old Files
  • Find and Delete Duplicates
  • Batch Rename by Pattern
  • Compress Large Files

Backup:

  • Incremental Backup
  • Full System Backup
  • Selective Folder Backup
  • Cloud Sync

Development:

  • Project Setup
  • Dependency Update
  • Test Runner
  • Build and Deploy

System:

  • Disk Cleanup
  • Log Rotation
  • Process Monitor
  • Resource Alert

Creating from Template

You: "Create a backup automation from template"

AI: Choose a template:
    1. Incremental Backup (rsync-based)
    2. Full System Backup (tar archive)
    3. Selective Folder Backup (custom)
    4. Cloud Sync (rclone)

You: "1"

AI: Incremental Backup template selected
    Customize:
    • Source folder? [~/Documents]
    • Destination? [/Volumes/Backup]
    • Include hidden files? [Yes/No]

    [Customize] [Use defaults]

Sharing Automations

Export (Future)

"Export my backup automation"

Creates:

backup-docs.astronox-automation
├── script.sh
├── metadata.json
└── README.md

Share via:

  • Email
  • Cloud storage
  • GitHub gist

Import (Future)

"Import automation from file"
[Select .astronox-automation file]

AI: Found automation: "Backup Docs"
    by: John Doe
    Description: Documents backup using rsync

    Review script? [Yes] [No, import directly]

Safety:

  • Always review imported scripts
  • Check for malicious code
  • Verify source

Automation Organization

Folders (Future)

Automations/
├── Backup/
│   ├── Daily Documents
│   ├── Weekly Full System
│   └── Project Snapshots
├── Cleanup/
│   ├── Downloads Organizer
│   └── Temp File Remover
└── Development/
    ├── Project Setup
    └── Deploy Script

Tags

"Tag 'Backup Docs' with backup, daily, critical"
"Show automations tagged with 'backup'"

Favorites

"Mark 'Morning Setup' as favorite"
"Show favorite automations"

Quick access to most-used automations


Use Cases

Daily Workflow

Automation: "Morning Start"
1. Open work folders
2. Start database
3. Launch dev environment
4. Open browser to local sites

One command: "Run morning start"

File Organization

Automation: "Organize Downloads" (weekly)
1. Group by file type
2. Move old files to archive
3. Delete temps
4. Generate report

Run: "Organize downloads"

Backup Routine

Automation: "Backup Everything"
1. Documents → External drive
2. Projects → Cloud
3. Photos → NAS
4. Verify all complete

Run: "Run backup everything"

Deployment

Automation: "Deploy to Production"
1. Run tests
2. Build project
3. Upload to server
4. Verify deployment
5. Notify team

Run: "Deploy to production"

Troubleshooting Automations

Automation Not Found

You: "Run my backup script"
AI: I don't have an automation matching "backup script"

    Did you mean:
    • Backup Docs
    • Backup Everything

    Or show all: "List automations"

Execution Failed

AI: ❌ Automation failed: Permission denied

    Error in: backup-docs.sh
    Line 15: rsync -av ~/Documents /Volumes/Backup

    Possible fixes:
    • Check if /Volumes/Backup is mounted
    • Grant full disk access permissions
    • Run with sudo (⚠️ use caution)

    [Retry] [Edit script] [View logs]

Outdated Automation

AI: ⚠️ This automation was created 6 months ago
    and may not work with recent changes

    Review and update? [Yes] [No, try anyway]

Best Practices

✅ Descriptive Names

Good:
• "Daily Document Backup to External Drive"
• "Organize Downloads by Month and Type"

Avoid:
• "Script 1"
• "Backup"

✅ Test Before Saving

1. Generate script
2. "Run this on test data first"
3. Verify it works
4. "Save as automation"

✅ Add Comments

When creating from scratch:

"Write a backup script with detailed comments
explaining each step"

AI will generate well-documented code


✅ Version Important Automations

"Save this as 'Deploy Script v2'"

Keep old versions when making major changes


✅ Review Periodically

Monthly: "Show automations I haven't used in 60 days"
Review: Delete unused or update outdated

Future Features

  • Automation marketplace: Share with community
  • Scheduling: Cron/task scheduler integration
  • Monitoring: Success/failure notifications
  • Versioning: Git-like version control
  • Collaboration: Team automation sharing
  • Analytics: Usage stats and optimization

Next: Learn about Clipboard Integration.