Skip to content

Latest commit

 

History

History
69 lines (47 loc) · 3.27 KB

File metadata and controls

69 lines (47 loc) · 3.27 KB

MEGA CMD + AI

Skill files that teach AI agents how to use MEGA CMD — MEGA's CLI for end-to-end encrypted cloud storage. No code, no scripts, no integration work.

AI agent scanning Gmail, organizing invoices in MEGA, and emailing a summary — AI runs on local hardware

One prompt: AI scans Gmail for invoices, organizes them in MEGA by vendor, creates a share link, and emails a summary to your accountant — AI runs on your hardware.

Why This Exists

Your data deserves both AI automation and real privacy.

  • MEGA provides zero-knowledge encryption — not even MEGA can read your files
  • Skill files give the AI agent precise instructions — no code generation, no scripts, no surprises
  • Works with any AI agent — local or cloud, your choice

How It Works

A skill file is a markdown document that describes CLI commands, their syntax, and rules. The AI agent reads it and executes the commands directly.

skills/
├── megacmd.md       ← Teaches any AI agent how to use MEGA CMD
└── gws-gmail.md     ← Teaches any AI agent how to use Gmail via GWS CLI

Grab a skill file, drop it into your project, and your AI agent can work with MEGA.

Quick Start

git clone https://github.com/meganz/megacmd-ai.git
cd megacmd-ai

Run your preferred AI agent and paste any prompt from the examples below.

Examples

Example What it does Details
Gmail → MEGA Search Gmail for invoices, download PDFs, organize in MEGA by vendor, share with accountant gmail-invoices.md
Find PDF contracts Search MEGA for PDF contracts, extract counterparties and banking details find-pdf-contracts.md
Find images Find JPEG images in MEGA matching a criteria, copy to local folder find-images.md
Manage shares Audit all shared files in MEGA, summarize public links, optionally unshare manage-shares.md
Clean drive Remove all file version history and report space freed clean-drive.md

Every example works by pasting one prompt. The AI reads the skill files and does the rest.

Security

Commands are whitelisted via permission configs (.claude/settings.json, opencode.json):

Auto-approved Requires your approval
mega-ls, mega-find, mega-get, mega-put, mega-export mega-rm (delete)
gws gmail ... list, get, attachments mega-deleteversions (remove history)
jq, base64, tr, cat, ls, mkdir gws gmail ... send (email)

Two layers of protection:

  1. Soft guardrail — the skill says "only use these commands"
  2. Hard guardrail — the permissions config blocks everything else

Requirements