Skip to content

SDK & CLI Overview

Install the Meshive Python package, authenticate with an API key, and read your account, workspaces, pods, storage, assets, GPUs, templates, serverless deployments, and host machines from the command line or from Python.

The meshive Python package ships a command-line tool and a Python SDK from a single install. Use the CLI to inspect your account, workspaces, pods, and host machines from a terminal; use the SDK to do the same programmatically — both synchronously and with asyncio.

The read surface mirrors what you see in the console:

  • Accountme (who the key belongs to), api-keys (your keys, prefixes only), credit and credit-history (balance, top-ups, refunds)
  • Workspacesworkspaces, workspace (cost and resource summary), members
  • Podspods / pod, plus pod-metrics for live CPU/RAM/GPU/disk usage
  • Storagestorages / storage (the volumes in a workspace)
  • Assetsassets / asset (datasets, models, outputs and their versions) and asset-storage (managed usage, cost, credit status)
  • Cataloggpus (what you can rent right now, with prices) and templates / template
  • Serverlessservings / serving and tasks / task
  • Hostmachines / machine, machine-metrics, and earnings for the machines you contribute as a host

Every command has a Python SDK counterpart (client.list_gpus(), client.get_credit(), …) — see the SDK reference.

Requires Python 3.10+. The only runtime dependency is httpx.

Terminal window
pip install meshive

Verify the install:

Terminal window
meshive --version

The SDK and CLI authenticate with a Meshive API Key (READ scope). Issue one from the console. Keys look like meshive_ followed by a 64-character token.

The recommended flow is meshive login, which verifies the key against the API and stores it locally so later commands need no flags:

  1. Terminal window
    meshive login # prompts for the key (hidden input)

    The key is verified before it is saved. On success it’s written to ~/.meshive/credentials.json with file mode 0600 (owner read/write only).

  2. Terminal window
    meshive me # works with no --api-key
  3. Terminal window
    meshive logout # removes the saved credentials

meshive login is optional. You can also pass the key per-command or via the environment. The resolution order is --api-key flag › MESHIVE_API_KEY env › meshive login file:

Terminal window
export MESHIVE_API_KEY=meshive_xxxxxxxx
meshive me

By default credentials live in ~/.meshive/ (directory mode 0700). Set MESHIVE_CONFIG_DIR to relocate it — useful for test isolation or juggling multiple accounts:

Terminal window
export MESHIVE_CONFIG_DIR=/path/to/alt-config
  • CLI Reference — every command, flag, and filter
  • Python SDK — sync and async clients, models, and error handling