@moniiapp/cli
v0.1.0
Published
MONII command-line interface — auto-detect Vercel + Netlify tokens, pair your phone via QR, run status + kill switch from the terminal
Maintainers
Readme
@moniiapp/cli
The MONII command-line interface. Detects existing Vercel/Netlify logins on your laptop, generates a QR your phone can scan to pair, and exposes operational commands (status, kill, whoami) for working from a terminal.
The CLI never sends your tokens anywhere — they stay in ~/.monii/auth.json (0600 perms) on your laptop, and the QR contains a monii:// deep link that only the MONII app can interpret.
Install
npm install -g @moniiapp/cliVerify:
monii --helpWithout a global install
If you don't want to install globally, npx works too:
npx @moniiapp/cli login
npx @moniiapp/cli statusFrom source (contributors)
git clone https://github.com/randomershenans/MONII.git
cd MONII
npm install
npm --workspace @moniiapp/shared run build
npm --workspace @moniiapp/cli run build
npm --workspace @moniiapp/cli link # `monii` is now on your PATHTo unlink later: npm --workspace @moniiapp/cli unlink.
Commands
monii login
Walks you through connecting Vercel + Netlify. For each platform:
- Auto-detect any existing CLI login on this machine
- Offer to install the provider CLI if missing (
npm i -g vercelornpm i -g netlify-cli) - Spawn the provider's own browser auth if you accept
- Render a per-platform QR scoped to that token (e.g.
monii://auth?n=…) - Wait for you to scan with the MONII app on your phone
The QR encodes a monii:// deep link with the access token. Your phone catches the link, saves the token to its Keychain, and you're connected.
Flags:
| Flag | Effect |
|---|---|
| --manual | Skip auto-detect + CLI launching; only prompt for a manually-pasted PAT |
| --no-qr | Save tokens to ~/.monii/auth.json without rendering a QR (useful when only the MCP needs to read them) |
| --skip-vercel | Don't ask about Vercel |
| --skip-netlify | Don't ask about Netlify |
monii whoami
Shows which tokens MONII has on this machine + where they came from.
MONII · whoami
──────────────
auth file ~/.monii/auth.json
saved at 2026-05-20T18:47:30.119Z
● Vercel token ver•••• ••••aBcD
● Netlify token nfp_•••• ••••xYz9
Detected on disk:
Vercel: found at ~/Library/Application Support/com.vercel.cli/auth.json
Netlify: found at ~/.netlify/config.jsonmonii status [-l N]
Combined deployment table across both providers. Default 10 per provider.
┌──────────┬─────────────────┬───────────┬────────┬─────┬──────────────────────────────┐
│ provider │ project │ state │ branch │ age │ url │
├──────────┼─────────────────┼───────────┼────────┼─────┼──────────────────────────────┤
│ vercel │ aurora-api │ ● building│ main │ 2m │ aurora-api-h74.vercel.app │
│ netlify │ mosaic-blog │ ● live │ main │ 1h │ mosaic-blog.netlify.app │
│ vercel │ studio-3d │ ● failed │ staging│ 6m │ studio-3d-g4q.vercel.app │
└──────────┴─────────────────┴───────────┴────────┴─────┴──────────────────────────────┘monii kill <project> --provider <vercel|netlify>
Take a deployed project offline. Confirms first unless you pass -y.
monii kill aurora-api --provider vercel
# DANGER: This will take "aurora-api" OFFLINE on vercel.
# Live traffic stops immediately. Reversible from the provider dashboard.
# ? Kill aurora-api? (Y/n)Token file format
~/.monii/auth.json looks like:
{
"vercel": { "token": "Bearer-style-token", "teamId": "optional" },
"netlify": { "token": "long-string" },
"generatedAt": 1779281365307
}This file is also read by the @moniiapp/mcp server so AI agents can use the same credentials. Don't commit it — both .gitignore and the saved file's 0600 permissions protect you, but watch what you cat.
Local dev (for contributors)
npm --workspace @moniiapp/cli run dev # tsc --watchThen in another terminal:
node packages/cli/dist/index.js loginArchitecture
The CLI is intentionally tiny:
packages/cli/src/
├── index.ts commander setup + program entry
├── auth/
│ ├── extract.ts reads ~/.local/share/vercel/auth.json etc.
│ ├── store.ts writes ~/.monii/auth.json (mode 0600)
│ ├── spawn.ts cross-platform child_process helpers
│ └── spinner.ts inline braille spinner (no extra dep)
├── api/
│ ├── vercel.ts /v6/deployments + /v1/projects/.../pause
│ └── netlify.ts /sites + /sites/:id (password lock)
└── commands/
├── login.ts the walkthrough — auto-detect + CLI launch + QR
├── status.ts combined deploy table via cli-table3
├── kill.ts pause project / lock site
└── whoami.ts inspect ~/.monii/auth.json + detected credsNo backend involved at any step. The CLI talks directly to Vercel/Netlify APIs.
License
MIT. See LICENSE.
Links
- App + docs: getmonii.com
- iOS app: on the App Store
- Sibling MCP server:
@moniiapp/mcp - Source: github.com/randomershenans/MONII
