Skip to main content

CLI tool for Lambda Labs Cloud

Project description

Lambda Labs Cloud CLI

A simple command-line interface for managing Lambda Labs Cloud GPU instances.

Installation

  1. Clone this repository and navigate to the directory:
cd lambda-cli
  1. Install the package:
pip install -e .

or use uv tool:

uv tool install lambda-labs-cli

or pipx:

pipx install lambda-labs-cli
  1. (Optional) If the lambda command is not in your PATH, add this to your shell configuration:
# Add to ~/.bashrc or ~/.zshrc
export PATH="$HOME/Library/Python/3.11/bin:$PATH"

Or use the full path: /Users/<username>/Library/Python/3.11/bin/lambda

note: if you used pipx or something similar, then you should be fine to move on with quick start.

Quick Start

  1. Configure your API key:
lambda config set-key YOUR_API_KEY

You can get your API key from the Lambda Cloud Console.

  1. List available instance types:
lambda instances look
  1. List your running instances:
lambda instances ls

Commands

Configuration

Set API Key

lambda config set-key <api-key>

Save your Lambda Labs Cloud API key to ~/.lambda/config.json.

Show Configuration

lambda config show

Display your current configuration (API key will be masked).

Clear Configuration

lambda config clear

Remove the configuration file.

Instances

List Instances (ls)

lambda instances ls

List all your running instances with their details (ID, name, instance type, region, status, IP).

Look at Instance Types (look)

lambda instances look

Display all available instance types with specs and available regions.

Options:

  • --available / -a: Show only instance types with available capacity

Example:

lambda instances look --available

Get Instance Details (get)

lambda instances get <instance-id>

Get detailed information about a specific instance.

Example:

lambda instances get 0920582c7ff041399e34823a0be62549

Launch Instances (launch)

lambda instances launch \
  --type <instance-type> \
  --region <region> \
  --ssh-key <ssh-key-name> \
  [--file-system <fs-name>] \
  [--quantity <number>] \
  [--name <instance-name>]

Launch new GPU instances.

Required Options:

  • --type / -t: Instance type (e.g., gpu_1x_a10)
  • --region / -r: Region (e.g., us-west-1)
  • --ssh-key / -k: SSH key name (can be specified multiple times)

Optional Options:

  • --file-system / -f: File system name to attach (can be specified multiple times)
  • --quantity / -q: Number of instances to launch (default: 1)
  • --name / -n: Name for the instance

Example:

lambda instances launch \
  --type gpu_1x_a10 \
  --region us-west-1 \
  --ssh-key my-ssh-key \
  --quantity 1 \
  --name my-gpu-instance

Terminate Instances (terminate)

lambda instances terminate <instance-id> [<instance-id> ...]

Terminate one or more instances. You'll be prompted for confirmation unless you use --yes.

Options:

  • --yes / -y: Skip confirmation prompt

Example:

lambda instances terminate 0920582c7ff041399e34823a0be62549 --yes

Restart Instances (restart)

lambda instances restart <instance-id> [<instance-id> ...]

Restart one or more instances.

Example:

lambda instances restart 0920582c7ff041399e34823a0be62549

API Documentation

This CLI uses the Lambda Labs Cloud API. For more information, see:

Configuration File

The CLI stores your API key in ~/.lambda/config.json. This file has restricted permissions (600) for security.

Requirements

  • Python >= 3.11
  • httpx >= 0.27.0
  • typer >= 0.12.0
  • rich >= 13.7.0

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

lambda_labs_cli-0.2.0.tar.gz (10.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

lambda_labs_cli-0.2.0-py3-none-any.whl (10.4 kB view details)

Uploaded Python 3

File details

Details for the file lambda_labs_cli-0.2.0.tar.gz.

File metadata

  • Download URL: lambda_labs_cli-0.2.0.tar.gz
  • Upload date:
  • Size: 10.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.18 {"installer":{"name":"uv","version":"0.9.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for lambda_labs_cli-0.2.0.tar.gz
Algorithm Hash digest
SHA256 8081a26c64cc78a0401a48cc6e51b371c7a7c88339588b472719b2e7277984b0
MD5 cadce3eae2c4f3d7cb01a24c9967f69b
BLAKE2b-256 316350bc7006e5acadab48c94e669dcc9793b96effc7e8a09c82cef3723252b2

See more details on using hashes here.

File details

Details for the file lambda_labs_cli-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: lambda_labs_cli-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 10.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.18 {"installer":{"name":"uv","version":"0.9.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for lambda_labs_cli-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0d74c43c267e1eb1491c3992ee7b841eaf93d91dea1eecf9bec56cf5e4800c75
MD5 3a651072dc2ca77e0d12dcb67215cf39
BLAKE2b-256 04530e932a76ba5582381f76857cc54adc7be0862c32614351ba92cc65942b4d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page