--- name: m1nt-deploy description: >- Deploy static sites and Next.js apps to m1nt hosting. Use when deploying a website, getting a live URL, updating an existing deployment, rolling back to a previous version, or enabling x402 payment gating. Covers m1nt deploy, m1nt rollback, m1nt gate, m1nt ungate, and m1nt login. skill_url: https://m1nt.xyz/skill.md --- # m1nt deploy Skill published at: https://m1nt.xyz/skill.md ## Overview m1nt is a hosting platform for static sites and Next.js static export apps. The CLI deploys a directory and returns a live `https://*.m1nt.xyz` URL. ## Prerequisites Check these before attempting a deploy: ```bash # 1. CLI installed? m1nt --version # If missing: npm install -g m1nt # 2. Authenticated? m1nt whoami # If not logged in: m1nt login (opens browser — requires human interaction) ``` **Important**: `m1nt login` always requires a human to complete in the browser. Never attempt to automate login. If auth is needed, surface it to the user. ## Supported site types ### Static HTML Any directory with an `index.html`. No build step required. ### Next.js (static export) Requires `next.config.js` with `output: 'export'`. The CLI runs `next build` automatically. If the config is missing the export setting, add it: ```js const nextConfig = { output: 'export' }; module.exports = nextConfig; ``` ## CLI reference | Command | Description | |---|---| | `m1nt login` | Log in or create an account (opens browser) | | `m1nt logout` | Log out and clear saved token | | `m1nt whoami` | Show logged-in email | | `m1nt deploy [dir]` | Deploy directory to production | | `m1nt deploy [dir] --name ` | Deploy with a specific subdomain | | `m1nt deploy [dir] --gate --price ` | Deploy and enable x402 gating | | `m1nt rollback` | Revert to previous deployment | | `m1nt domains add ` | Attach a custom domain | | `m1nt gate --price ` | Enable gating on current project | | `m1nt ungate` | Disable gating on current project | ## Deploy commands ### First deploy (new site) ```bash # Auto-generated subdomain m1nt deploy ./path/to/site # Specific subdomain m1nt deploy ./path/to/site --name my-site # → https://my-site.m1nt.xyz (if available) # → error if taken — try a different name ``` ### Redeploy (update existing site) If `m1nt.json` exists in the project directory, deploy updates the same URL: ```bash m1nt deploy ./path/to/site # → updates existing domain, no new subdomain created ``` `--name` is ignored on redeploys. ### Deploy with x402 gating ```bash m1nt deploy ./path/to/site --gate --price 0.01 # → deploys and enables gating at $0.01 USDC per visit ``` Requires a wallet address set in the dashboard first. ### Rollback ```bash cd ./path/to/site # must contain m1nt.json echo 'y' | m1nt rollback # → reverts to previous deployment ``` The confirmation prompt requires `y` — pipe it via stdin for non-interactive use. ## Output parsing First deploy: ``` Live at: https://my-site.m1nt.xyz ``` Redeploy: ``` Updated: https://my-site.m1nt.xyz ``` Extract the URL programmatically: ```bash url=$(m1nt deploy ./site 2>&1 | grep -oE 'https://[^ ]+') ``` ## Gating commands ### Enable gating on an existing site ```bash cd ./path/to/site # must contain m1nt.json m1nt gate --price 0.10 # → enables x402 gating at $0.10 USDC per visit ``` ### Disable gating ```bash cd ./path/to/site m1nt ungate # → disables gating, site is publicly accessible again ``` ### Requirements for gating - The project must be deployed (`m1nt.json` must exist) - The user must have a wallet address set at https://dashboard.m1nt.xyz - Price must be between 0.001 and 1000 USDC ## Error reference | Error | Cause | Fix | |---|---|---| | `command not found: m1nt` | CLI not installed | `npm install -g m1nt` | | `Not logged in` | No auth token | `m1nt login` (needs human) | | `output: 'export' not set` | Next.js missing export mode | Add `output: 'export'` to `next.config.js` | | `{name}.m1nt.xyz is already taken` | Subdomain unavailable | Use `--name` with a different value | | `Deploy failed: Unauthorized` | Token expired | `m1nt login` to refresh | | `Nothing to roll back to` | Only one deployment exists | No action possible | | `No m1nt.json found` | Not in a deployed project dir | Run `m1nt deploy` first | | `No wallet address set` | Gating needs a wallet | Add wallet at dashboard.m1nt.xyz | | `--gate requires --price` | Missing price flag | Add `--price ` | ## m1nt.json Created automatically on first deploy. Contains: ```json { "domain": "my-site.m1nt.xyz", "projectId": "..." } ``` - Do not delete — it links the directory to the live deployment - Automatically added to `.gitignore` if one exists - If missing, the next deploy creates a new subdomain ## Agent workflows ### Deploy a new static site 1. Verify auth: `m1nt whoami` 2. Ensure `index.html` exists in the target directory 3. Run: `m1nt deploy ./site --name descriptive-name` 4. Parse output for the `https://` URL 5. Return the URL to the user ### Deploy a Next.js app 1. Verify auth: `m1nt whoami` 2. Verify `next.config.js` has `output: 'export'` — add it if missing 3. Run: `m1nt deploy ./app --name descriptive-name` 4. Parse output for the `https://` URL 5. Return the URL to the user ### Update an existing site 1. Verify auth: `m1nt whoami` 2. Confirm `m1nt.json` exists in the project directory 3. Run: `m1nt deploy ./site` 4. Parse output for the `https://` URL ### Roll back 1. Confirm `m1nt.json` exists in the project directory 2. Run: `echo 'y' | m1nt rollback` 3. Confirm output says "Rolled back" ### Deploy with x402 gating 1. Verify auth: `m1nt whoami` 2. Run: `m1nt deploy ./site --name my-site --gate --price 0.10` 3. Parse output for the `https://` URL and gating confirmation 4. Return the URL to the user ### Enable gating on an existing site 1. Verify auth: `m1nt whoami` 2. Confirm `m1nt.json` exists in the project directory 3. Run: `m1nt gate --price 0.10` 4. Confirm output says "Gating enabled" ### Disable gating 1. Confirm `m1nt.json` exists in the project directory 2. Run: `m1nt ungate` 3. Confirm output says "Gating disabled" ## MCP server (for agents) m1nt exposes an MCP server at `mcp.m1nt.xyz` for direct agent integration. No CLI needed — just structured tool calls over HTTP+SSE. Connect in Claude desktop (`claude_desktop_config.json`): ```json { "mcpServers": { "m1nt": { "url": "https://mcp.m1nt.xyz/sse", "headers": { "Authorization": "Bearer YOUR_MINT_TOKEN" } } } } ``` Get your token: ```bash cat ~/.mint/config.json ``` Available tools: `deploy`, `list_domains`, `rollback`, `gate`, `ungate`, `whoami` The `deploy` tool accepts a base64-encoded zip of the site directory. All other tools mirror the CLI commands and accept the same parameters.