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
- Clone this repository and navigate to the directory:
cd lambda-cli
- Install the package:
pip install -e .
or use uv tool:
uv tool install lambda-labs-cli
or pipx:
pipx install lambda-labs-cli
- (Optional) If the
lambdacommand 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
- Configure your API key:
lambda config set-key YOUR_API_KEY
You can get your API key from the Lambda Cloud Console.
- List available instance types:
lambda instances look
- 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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8081a26c64cc78a0401a48cc6e51b371c7a7c88339588b472719b2e7277984b0
|
|
| MD5 |
cadce3eae2c4f3d7cb01a24c9967f69b
|
|
| BLAKE2b-256 |
316350bc7006e5acadab48c94e669dcc9793b96effc7e8a09c82cef3723252b2
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0d74c43c267e1eb1491c3992ee7b841eaf93d91dea1eecf9bec56cf5e4800c75
|
|
| MD5 |
3a651072dc2ca77e0d12dcb67215cf39
|
|
| BLAKE2b-256 |
04530e932a76ba5582381f76857cc54adc7be0862c32614351ba92cc65942b4d
|