@getmagical/cli
v0.1.13
Published
Magical CLI for shared MCP operations
Readme
@getmagical/cli
Magical CLI for the shared MCP operation surface.
Rules
- Shared operational commands come from
packages/mcp-registry. - Do not add shared commands directly in this package or in
services/mcp/operations.
Usage
mgcl --version
mgcl update
mgcl auth login
mgcl settings env base-url http://main.localhost:1355
mgcl org list
mgcl automations list --limit 10
mgcl automations update --id ... --input-json ...
mgcl automation-runs list --automation-id ...
mgcl automations run-draft --draft-automation-id ... --agent-id ... --idempotency-key ...Local Development
Run the CLI from source without building:
npm run cli -- --helpProduction installs use the bundled WorkOS client ID by default. To persist a local or staging API target, set:
mgcl settings env base-url http://main.localhost:1355
mgcl auth loginWhen a persisted base URL override is present, mgcl auth login uses the
bundled staging/dev WorkOS client ID automatically. Changing or resetting the
override clears saved auth so you can log into the correct environment again.
To remove the override and return to defaults:
mgcl settings env base-url --resetInstall Script
Host install-mgcl.sh in the S3 bucket for CLI install, then users can install with a single command:
curl -fsSL https://cli.getmagical.io/install.sh | bash
curl -fsSL https://cli.getmagical.io/install.sh | bash -s -- --uninstallThe installer uses a user-local npm prefix, so it does not require sudo.
It installs a managed Node.js runtime, then installs @getmagical/cli from
npm into a user-local prefix. It creates mgcl and magical wrappers and
defaults to the npm latest tag. If the requested version is already present,
the installer skips the reinstall.
Once installed, users can update from the same channel with:
mgcl --updateInstalled CLIs also check the configured npm dist-tag before running
subcommands. If the local version is behind, mgcl blocks the command and
asks the user to run mgcl update before rerunning it.
To remove the managed install:
curl -fsSL https://cli.getmagical.io/install.sh | bash -s -- --uninstall