Runloop CLI for interacting with the Runloop APIs.
Project description
rl-cli
A command line utility for interacting with runloop APIs.
NOTE: This project is still in early alpha release
Setup
Install using pipx
➜ ~ pipx install rl-cli
installed package rl-cli 0.0.1, installed using Python 3.12.6
These apps are now globally available
For developers
# Clone the repo
mkdir -p ~/source/ && cd ~/source/
git clone https://github.com/runloopai/rl-cli.git
cd rl-cli/
# Setup the venv and dev tools
python3 -m venv .venv && source .venv/bin/activate && pip install -r dev-requirements.txt
# Install to your venv with flink
# Use 'which python3' to find your system python
flit install --symlink --python </path/to/system/python>
# Install to your venv using pip
pip install rl-cli
# In a new terminal
export RUNLOOP_API_KEY=<your-api-key>
rl --help
Quick reference
Devbox
Create a devbox and run a single command
rl devbox create --env_vars HELLO=world --entrypoint 'echo $HELLO'
>
create devbox={
"id": "dbx_2xMDUOsKMiZBYKsvSRtMA",
"blueprint_id": null,
"create_time_ms": 1723229557715,
"end_time_ms": null,
"initiator_id": null,
"initiator_type": "invocation",
"name": null,
"status": "provisioning"
}
Observe logs
rl devbox logs --id dbx_2xMDUOsKMiZBYKsvSRtMA
>
2024-08-09 12:15:01.701 Initializing devbox...
2024-08-09 12:15:01.734 Devbox setup complete
2024-08-09 12:15:01.769 [entrypoint] -> echo $HELLO
2024-08-09 12:15:01.798 [entrypoint] world
2024-08-09 12:15:01.798 world
2024-08-09 12:15:01.800 [entrypoint] -> exit_code=0
Check the devbox status
rl devbox get --id dbx_2ws7IOtjxnJgLsBIpU9nn
>
# Note that the devbox status="shutdown" after the entrypoint completes.
devbox={
"id": "dbx_2xMDUOsKMiZBYKsvSRtMA",
"blueprint_id": null,
"create_time_ms": 1723229557715,
"end_time_ms": 1723229561620,
"initiator_id": null,
"initiator_type": "invocation",
"name": null,
"status": "shutdown"
}
Use scp to copy files to/from the devbox
To use the SCP command:
rl devbox scp local_file.txt :remote_file.txt --id <devbox_id>
To copy a file from the devbox to your local machine:
rl devbox scp :remote_file.txt local_file.txt --id <devbox_id>
Use rsync to copy files to/from the devbox
To use the rsync command:
rl devbox rsync local_file.txt :remote_file.txt --id <devbox_id>
To copy a file from the devbox to your local machine:
rl devbox rsync :remote_file.txt local_file.txt --id <devbox_id>
Note that the rsync implementation will recurse by default and copy directory contents.
To use the rsync command:
rl devbox rsync local_dir :remote_dir --id <devbox_id>
Use port forwarding to create a tunnel to remote devbox
To use the tunnel command:
rl devbox tunnel --id <devbox_id> <local_port>:<remote_port>
Note that this is a blocking command that will block for duration of tunnel.
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
rl_cli-0.2.5.tar.gz
(12.3 kB
view details)
Built Distributions
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 rl_cli-0.2.5.tar.gz.
File metadata
- Download URL: rl_cli-0.2.5.tar.gz
- Upload date:
- Size: 12.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: python-requests/2.32.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
de29a3935642e724e80f34db30c5eca49be59aacef0016cf37778cbd39cfbabd
|
|
| MD5 |
e93a7a10a286df7d087b6a9a3e71a2cb
|
|
| BLAKE2b-256 |
8f1b88229ccbcd4b36ae43af63893e5d2c3eeb4febc671ffc647e88c274533de
|
File details
Details for the file rl_cli-0.2.5-py3-none-any.whl.
File metadata
- Download URL: rl_cli-0.2.5-py3-none-any.whl
- Upload date:
- Size: 9.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: python-requests/2.32.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1bcdeebf7e95fecf832526820c6ded5c24436e94626723bf4587f5eafae86872
|
|
| MD5 |
79b2e67177f3e4ab7b621c2d8264cb13
|
|
| BLAKE2b-256 |
08aacf163647dfe38ba44383aa40171a56b0a23ff80b855d2b476fcd07e0db50
|
File details
Details for the file rl_cli-0.2.5-py2.py3-none-any.whl.
File metadata
- Download URL: rl_cli-0.2.5-py2.py3-none-any.whl
- Upload date:
- Size: 9.3 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: python-requests/2.32.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
563185bc87d1fe0fd5838a00c8602dc00416f6e677a3f39acf7add67617c5cb5
|
|
| MD5 |
a37489a14c8f171655c091e303ffc45e
|
|
| BLAKE2b-256 |
5236c35834accb59756c99c146e7232526ce065236ec6bd3a351dc0e3aea64ca
|