Metadata-Version: 2.4
Name: monarch-cloud
Version: 0.1.0
Summary: Public developer CLI for Monarch Cloud
Author: Africa Compute Fund
Project-URL: Homepage, https://app.africacomputefund.com
Project-URL: Documentation, https://app.africacomputefund.com/docs
Keywords: monarch,cloud,compute,developer-tools,cli
Classifier: Programming Language :: Python :: 3
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Requires-Dist: httpx<1,>=0.24

# Monarch Cloud CLI

A lightweight public developer client for the existing Monarch REST Platform API.

```bash
python -m pip install monarch-cloud
monarch login
monarch whoami
monarch catalog
monarch gpus
monarch models --scope catalog
monarch jobs
monarch wallet
monarch init "My app" --blueprint backend
monarch status
monarch dev
monarch deploy hello ./hello.js
```

**Authentication:** `monarch login` prompts for an existing Monarch REST API key
without echoing it, validates it against `GET /v1/account/identity`, then saves
it in a mode-0600 file under your user configuration directory. For ephemeral
environments set `MONARCH_API_KEY` instead; this takes precedence. This is REST
API-key login, **not** the OAuth browser flow used by the MCP connector. Key
creation and account access are provided through Monarch Cloud.

`monarch mcp` prints the public OAuth MCP endpoint for compatible AI clients;
it does not bundle an MCP server or impersonate an OAuth token.

## Command surfaces

- Discovery: `catalog`, `gpus`, `models`, `datasets`, `jobs`, `job ID`,
  `wallet`, `inference-models`, `whoami`.
- Projects: `init`, `status`, `dev`, `deploy NAME SOURCE_JS`.
- Migration: `migrate`, `migrate-storage`, `migrate-postgres`,
  `migrate-gcs`, `import-documents`.
- Account: `login`, `logout`, `mcp`.

`deploy` deploys one JavaScript **Project Function**, not arbitrary whole-app
infrastructure. Some public REST APIs and the MCP's purpose-built tools are
not yet wrapped as CLI commands; Cloud, REST and MCP remain the source of truth.

Project selection is stored in `.monarch/project.json`. The one-time Project
server key is saved in `.monarch/server-key` and must never be committed.
Source migration secrets are only read from environment variables or named
credential files, not CLI arguments. The server enforces the same account,
scope, billing, quotas, and approvals as its other public clients.

## For maintainers

The public release is built from the **canonical** implementation at
`scripts/monarch_platform.py` using
`python scripts/package_monarch_cloud.py --build`. The staging tool copies
only this public module, the package metadata, and this README into an isolated
temporary build directory. The private `./monarch` operator CLI, admin scripts,
deployment infrastructure, and internal MCP server are not packaged.

There is no CI publisher and no GitHub Actions workflow. The owner publishes
the reviewed files to PyPI explicitly after checking the build. See
`docs/operations/MONARCH_CLOUD_PYPI.md` for release instructions.
