MultiConnect.CLI
2.0.2
See the version list below for details.
dotnet tool install --global MultiConnect.CLI --version 2.0.2
dotnet new tool-manifest
dotnet tool install --local MultiConnect.CLI --version 2.0.2
#tool dotnet:?package=MultiConnect.CLI&version=2.0.2
nuke :add-package MultiConnect.CLI --version 2.0.2
MultiConnect CLI 2.0
Deploy servers, APIs and websites from a terminal or a CI pipeline, and check on any deployment, databases included.
dotnet tool install --global MultiConnect.CLI # requires the .NET 8 SDK or later
multiconnect init # once per project folder
multiconnect deploy # every release after that
Before you start: a deploy key
The CLI signs in with an access key that has "Allow deploys (CLI)" turned on. It can only reach the deployments the key is attached to. Create the key in the dashboard, then attach it from each deployment's Access keys tab. A key can be attached to several deployments. Each project folder is linked to exactly one of them.
A deploy key can upload builds, redeploy, and read status, connection details, usage and the account balance. It cannot create, delete or stop deployments, and it cannot change plans. Those stay in the dashboard. It can never be a client-distributable key.
Commands
| Command | What it does |
|---|---|
multiconnect init |
Choose which of the key's deployments this folder is for, and how to build it. Writes multiconnect.json. |
multiconnect deploy |
Run the build command, package the build (a folder is zipped; a .zip is used as-is), upload it and roll it out with the deployment's existing settings. Waits until it is live. |
multiconnect deploy --config |
Same, but first lets you change settings interactively: environment variables, start command, container counts, autoscaling, website options and the local build settings. The new settings and the new build go live in the same rollout. |
multiconnect status |
State, build version, any rollout in progress, and the containers. |
multiconnect info |
Connection details. |
multiconnect balance |
Credits, what the account spends per hour, and how long the balance lasts. |
multiconnect analytics |
Cost per hour, usage against the plan, and CPU / RAM / storage per container. |
In deploy --config, each prompt shows the current value: press Enter to keep it, or type - to clear it.
deploy options: --tag, --skip-build, --no-rollback, --no-wait, --timeout <minutes>, --yes.
Rollouts are zero-downtime. The current build keeps serving until every new container is healthy, and it is restored automatically if they never become healthy. On a server with a grace period, the old containers keep running for that period so connected players are not dropped. The CLI reports success as soon as the new build is live. The grace period does not hold up your pipeline.
A database has no build, so deploy does not apply to it. status, info, balance and
analytics all work.
Master-worker servers take two builds, master and worker, which always deploy together. init
asks for both.
multiconnect.json
It records the linked deployment and the build settings, and it is safe to commit. The key is
stored in it encrypted for the machine and user that ran init, so a committed copy is useless
anywhere else. The deployment's settings are not stored here. They live on the platform, so the
dashboard and the CLI never disagree.
CI/CD
Commit multiconnect.json, store the key as pipeline secrets, and run deploy. With the
environment variables set, the stored key is not used. Nothing prompts in CI (CI is set, or input
is not a terminal). The exit code is non-zero if the build, the upload or the rollout fails.
# GitHub Actions
- uses: actions/setup-dotnet@v4
with: { dotnet-version: '8.0.x' }
- run: dotnet tool install --global MultiConnect.CLI
- run: multiconnect deploy --tag ${{ github.sha }}
env:
MC_ACCESS_KEY: ${{ secrets.MC_ACCESS_KEY }}
MC_ACCESS_SECRET: ${{ secrets.MC_ACCESS_SECRET }}
Exit codes: 0 live, 1 failed or refused, 2 still rolling out when --timeout ran out.
How requests are signed
Every call is a POST to /api/PublicNew/Cli/<Action> with these headers:
X-MC-KeyX-MC-Timestamp(ISO 8601 UTC, within five minutes)X-MC-Nonce(new for every request)X-MC-Signature = hex(HMAC-SHA256(secret, "key:timestamp:nonce:path:sha256hex(body)"))
The body is part of the signature, so a captured request cannot be altered to deploy a different build. The nonce stops it from being replayed.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
This package has no dependencies.