# Mags

> Secure cloud sandboxes and one-command app deploys, running on hardware-isolated microVMs that boot in <100ms.

Mags gives developers and AI agents two things on the same microVM platform:

- **Sandboxes** — run any script or command in an isolated, disposable microVM. Persist files to the cloud, expose public URLs, SSH in, or schedule cron jobs. Managed via the `mags` CLI, Python/Node SDKs, or REST API.
- **Deploy** — turn any Docker image or GitHub repo into a managed app with a public HTTPS URL, private service-to-service networking, scale-to-zero, persistent volumes, one-click Postgres/Redis, custom domains, and instant rollbacks.

Install: `npm install -g @magpiecloud/mags`

## Docs

- [Home](https://mags.run/): product overview
- [Deploy](https://mags.run/deploy.html): deploy Docker/GitHub apps to microVMs
- [Documentation](https://mags.run/docs.html): CLI, SDKs, REST API, and deploy reference
- [Quickstart](https://mags.run/docs.html#quickstart): get running in under a minute
- [Deploy reference](https://mags.run/docs.html#deploy): `mags deploy` flags, heavy images, volumes
- [API authentication](https://mags.run/docs.html#api-auth): REST API tokens and base URL
- [Cookbook](https://mags.run/cookbook.html): copy-paste recipes

## Key commands

- `mags run 'echo hello'` — run a command in a sandbox
- `mags run -n proj -p '...'` — named, persistent workspace
- `mags deploy -i nginx:latest -n web --port 80` — deploy a Docker image
- `mags deploy -i pytorch/pytorch:latest -n ml --heavy` — lazy-load large images
- `mags rollback web --to 3` — roll back a deployment
