@bluemachine/machine
v0.1.4
Published
BlueMachine — cloud sandboxes for ML/AI engineers
Downloads
67
Maintainers
Readme
@bluemachine/machine
BlueMachine Command Line Interface — Instant, serverless cloud VM sandboxes with zero-overhead directory syncing and second-precision billing.
BlueMachine is a high-performance developer platform that lets you provision a dedicated, isolated cloud VM in under 3 seconds, automatically syncs your local workspace, runs any command or script over a fast SSH channel, streams logs back in real-time, and destroys the VM the moment your job finishes. You only pay for the exact seconds your VM runs.
🚀 Quick Start
1. Install CLI
Install the command-line client globally using npm:
npm install -g @bluemachine/machine2. Login to Your Account
Authenticate your CLI tool with your BlueMachine profile:
machine loginThis will open the BlueMachine dashboard in your web browser. Once authorized, secure API credentials will be saved in your home directory.
3. Verify Account
Check your active profile state:
machine whoami4. Run your first sandbox task
machine run "echo 'Hello from BlueMachine!'" --class spark-micro💻 CLI Commands
The machine command-line tool is interactive, colorful, and fully customizable. Below is the complete API command surface:
| Command | Description | Arguments / Options | Example |
| :--- | :--- | :--- | :--- |
| login | Authenticates your CLI with your dashboard account via browser oauth redirects. | None | machine login |
| logout | Clears the locally stored API tokens and session files. | None | machine logout |
| whoami | Displays currently authenticated email, plan, run history statistics, and aggregate spend. | None | machine whoami |
| run <cmd> | Core Command. Provisions a VM, syncs local files, executes your shell command, streams logs, and destroys the VM. | command (required)-c, --class <slug>: VM tier slug-t, --ttl <minutes>: VM max lifetime (default: 10)--dir <path>: Directory to sync (default: CWD)--no-sync: Skips uploading local workspace files | machine run "npm run test" --class spark-micromachine run "python train.py" -t 30 |
| ls | Lists all of your currently active VMs, showing IDs, status (provisioning, ready, error), machine class, IPs, and expiry timers. | None | machine ls |
| status <run-id> | Shows execution status, exit code, runtime duration, and total cost charged for a past command run. | <run-id> (required) | machine status #5a8e24c1 |
| logs <run-id> | Fetches the full console logs of a past run or streams active logs in real-time. | <run-id> (required)-f, --follow: Polls for logs until run completes | machine logs #5a8e24c1machine logs #5a8e24c1 -f |
| stop <lease-id> | Manually terminates an active VM lease early, destroying the underlying virtual machine. | <lease-id> (required) | machine stop #f2a893cb |
| station | Launches the interactive manager menu to create, connect, or delete persistent VM workstations. | None | machine station |
🧠 Python Runtime & Environment
BlueMachine VMs spin up using a standard Ubuntu 24.04 LTS cloud template.
- Pre-installed Python: Python 3 (Python 3.12) is installed by default on all sandboxes.
- Root Sudo Privileges: Because you get root access on the VM, you can install any libraries using
pip:machine run "pip install numpy pandas && python3 train.py" - File Syncing: Running
machine runcompiles and mirrors your current local folder to the remote VM under/home/bluemachine/workspacein under a second using delta compression. - Persistence: If you need dependencies to persist across runs (so you don't have to
pip installthem every time), use persistent Developer Stations viamachine station.
⚡ Machine Tiers & Specs
BlueMachine supports a wide range of virtual hardware classes. If --class is omitted from machine run, you will be prompted with a beautiful interactive selector.
- Spark Tiers (Low): Starting at
Spark Nano(0.2 vCPU, 0.6 GB RAM) up toSpark Dedicated(1.0 vCPU, 4.0 GB RAM). - Flex Tiers (Balanced): General application test suites, compilers, and Docker builds. E.g.,
Flex Standard(2 vCPU, 8.0 GB RAM). - Prime Tiers (High-Core): Multi-threaded compilation and batch jobs. E.g.,
Prime Octa(8 vCPU, 32.0 GB RAM) up toPrime Mega(32 vCPU, 128.0 GB RAM). - Tensor Tiers (GPUs): Machine learning training and LLM inference. E.g.,
Tensor T4(15.0 GB RAM + NVIDIA T4 GPU) up toTensor A100(85.0 GB RAM + NVIDIA A100 GPU).
