@cdnmn/cli
v0.1.1
Published
The cdnmn CLI — set up and operate a CDN.MN image CDN from your project.
Maintainers
Readme
@cdnmn/cli
The cdnmn command line — set up and operate a CDN.MN image
CDN from your project. Authenticate once, then detect, configure, rewrite, and
verify your image delivery.
Install
npm install -g @cdnmn/cli
# …or run without installing:
npx @cdnmn/cli --helpAuthenticate
cdnmn login # opens the dashboard; approve the device codeThe CLI stores a scoped, 24-hour bearer token at ~/.config/cdnmn/config.json
(mode 0600). It is never printed or logged. In CI, prefer the CDNMN_TOKEN
environment variable over --token (which is visible in the process list).
Commands
| Command | What it does |
| ----------------------------- | ------------------------------------------------------------------------------------------------------------- |
| cdnmn detect <url> | Analyze a site and recommend an integration strategy |
| cdnmn setup <origin> | Create a project and print the domain-verification proof |
| cdnmn verify --site <id> | Run the domain-ownership check |
| cdnmn rewrite [--apply] | Rewrite image URLs in your repo to the CDN host — dry-run by default, and it honors a project AGENTS.md |
| cdnmn test --site <id> | Verify delivery (reachability, format negotiation, same-host integrity, size reduction) |
| cdnmn agents [print \| init]| Print or write the CDN.MN section of your AGENTS.md |
rewrite only touches image formats the CDN can serve, snaps widths up to your
site's configured ladder, and never emits quality/format params (those are chosen
server-side). Every change is backed up to .cdnmn-backup/ and can be undone with
cdnmn rewrite --revert.
Docs
Full reference: https://app.cdn.mn/docs/cli · Auth & scopes: https://app.cdn.mn/auth.md
MIT licensed.
