rl_cli


Namerl_cli JSON
Version 0.1.8 PyPI version JSON
download
home_pageNone
SummaryRunloop CLI for interacting with the Runloop APIs.
upload_time2024-11-13 19:01:38
maintainerNone
docs_urlNone
authorNone
requires_pythonNone
licenseNone
keywords
VCS
bugtrack_url
requirements annotated-types anyio certifi charset-normalizer distro h11 httpcore httpx idna pydantic pydantic-core requests runloop-api-client sniffio typing-extensions urllib3
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # 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
```commandline
# 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
```commandline
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
```commandline
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
```commandline
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
```commandline
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
```commandline
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
```commandline
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.
```
            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "rl_cli",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": null,
    "author": null,
    "author_email": "Runloop AI <eng+cli@runloop.ai>",
    "download_url": "https://files.pythonhosted.org/packages/b2/26/0a110c4cc95ec77061c45c7ad2f142940fb26adc9ca8aa08319bcf2107cb/rl_cli-0.1.8.tar.gz",
    "platform": null,
    "description": "# rl-cli\nA command line utility for interacting with runloop APIs.\n\n**NOTE: This project is still in early alpha release**\n\n# Setup\n\n## Install using pipx\n\n```\n\u279c  ~  pipx install rl-cli\n  installed package rl-cli 0.0.1, installed using Python 3.12.6\n  These apps are now globally available\n```\n\n## For developers\n```commandline\n# Clone the repo\nmkdir -p ~/source/ && cd ~/source/\ngit clone https://github.com/runloopai/rl-cli.git\ncd rl-cli/\n\n# Setup the venv and dev tools\npython3 -m venv .venv && source .venv/bin/activate && pip install -r dev-requirements.txt\n\n# Install to your venv with flink\n# Use 'which python3' to find your system python\nflit install --symlink --python </path/to/system/python>\n\n# Install to your venv using pip\npip install rl-cli\n```\n\n```\n# In a new terminal\nexport RUNLOOP_API_KEY=<your-api-key>\nrl --help\n```\n\n# Quick reference\n\n## Devbox\n\n### Create a devbox and run a single command\n```commandline\nrl devbox create --env_vars HELLO=world --entrypoint 'echo $HELLO'\n>\ncreate devbox={\n    \"id\": \"dbx_2xMDUOsKMiZBYKsvSRtMA\",\n    \"blueprint_id\": null,\n    \"create_time_ms\": 1723229557715,\n    \"end_time_ms\": null,\n    \"initiator_id\": null,\n    \"initiator_type\": \"invocation\",\n    \"name\": null,\n    \"status\": \"provisioning\"\n}\n```\n\n### Observe logs\n```commandline\nrl devbox logs --id dbx_2xMDUOsKMiZBYKsvSRtMA\n>\n2024-08-09 12:15:01.701  Initializing devbox...\n2024-08-09 12:15:01.734  Devbox setup complete\n2024-08-09 12:15:01.769 [entrypoint] -> echo $HELLO\n2024-08-09 12:15:01.798 [entrypoint]  world\n2024-08-09 12:15:01.798  world\n2024-08-09 12:15:01.800 [entrypoint] -> exit_code=0\n```\n\n### Check the devbox status\n```commandline\nrl devbox get --id dbx_2ws7IOtjxnJgLsBIpU9nn\n>   \n# Note that the devbox status=\"shutdown\" after the entrypoint completes.\ndevbox={\n    \"id\": \"dbx_2xMDUOsKMiZBYKsvSRtMA\",\n    \"blueprint_id\": null,\n    \"create_time_ms\": 1723229557715,\n    \"end_time_ms\": 1723229561620,\n    \"initiator_id\": null,\n    \"initiator_type\": \"invocation\",\n    \"name\": null,\n    \"status\": \"shutdown\"\n}\n```\n\n### Use scp to copy files to/from the devbox\n```commandline\nTo use the SCP command:\n   rl devbox scp local_file.txt :remote_file.txt --id <devbox_id>\n\nTo copy a file from the devbox to your local machine:\n   rl devbox scp :remote_file.txt local_file.txt --id <devbox_id>\n```\n\n### Use rsync to copy files to/from the devbox\n```commandline\nTo use the rsync command:\n   rl devbox rsync local_file.txt :remote_file.txt --id <devbox_id>\n\nTo copy a file from the devbox to your local machine:\n   rl devbox rsync :remote_file.txt local_file.txt --id <devbox_id>\n\nNote that the rsync implementation will recurse by default and copy directory contents.\n\nTo use the rsync command:\n   rl devbox rsync local_dir :remote_dir --id <devbox_id>\n```\n\n### Use port forwarding to create a tunnel to remote devbox\n```commandline\nTo use the tunnel command:\n   rl devbox tunnel --id <devbox_id> <local_port>:<remote_port>\n\nNote that this is a blocking command that will block for duration of tunnel.\n```",
    "bugtrack_url": null,
    "license": null,
    "summary": "Runloop CLI for interacting with the Runloop APIs.",
    "version": "0.1.8",
    "project_urls": {
        "Documentation": "https://docs.runloop.ai",
        "Home": "https://www.runloop.ai",
        "Source": "https://github.com/runloopai/rl-cli"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "3788447ac168aa0c3fba2c1ac2f639c3e5d0992e7d0063c40b4a9eaa4c678015",
                "md5": "331d923c366c3d8ddf61da599868f076",
                "sha256": "c2b0f2dcc0d7b18c270a74af1770f2e0d1da0f39f1b21483d0e9ea81453c7a84"
            },
            "downloads": -1,
            "filename": "rl_cli-0.1.8-py2.py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "331d923c366c3d8ddf61da599868f076",
            "packagetype": "bdist_wheel",
            "python_version": "py2.py3",
            "requires_python": null,
            "size": 9197,
            "upload_time": "2024-11-13T19:01:37",
            "upload_time_iso_8601": "2024-11-13T19:01:37.404184Z",
            "url": "https://files.pythonhosted.org/packages/37/88/447ac168aa0c3fba2c1ac2f639c3e5d0992e7d0063c40b4a9eaa4c678015/rl_cli-0.1.8-py2.py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "b2260a110c4cc95ec77061c45c7ad2f142940fb26adc9ca8aa08319bcf2107cb",
                "md5": "8c23cb98774fed80ae3e01da74315194",
                "sha256": "86f6808b880e2a5df4a6d14f2a6fda090ab26157cc5f1ace869d0bd0ec3633b7"
            },
            "downloads": -1,
            "filename": "rl_cli-0.1.8.tar.gz",
            "has_sig": false,
            "md5_digest": "8c23cb98774fed80ae3e01da74315194",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 12216,
            "upload_time": "2024-11-13T19:01:38",
            "upload_time_iso_8601": "2024-11-13T19:01:38.561327Z",
            "url": "https://files.pythonhosted.org/packages/b2/26/0a110c4cc95ec77061c45c7ad2f142940fb26adc9ca8aa08319bcf2107cb/rl_cli-0.1.8.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-11-13 19:01:38",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "runloopai",
    "github_project": "rl-cli",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [
        {
            "name": "annotated-types",
            "specs": [
                [
                    "==",
                    "0.7.0"
                ]
            ]
        },
        {
            "name": "anyio",
            "specs": [
                [
                    "==",
                    "4.6.2.post1"
                ]
            ]
        },
        {
            "name": "certifi",
            "specs": [
                [
                    "==",
                    "2024.8.30"
                ]
            ]
        },
        {
            "name": "charset-normalizer",
            "specs": [
                [
                    "==",
                    "3.4.0"
                ]
            ]
        },
        {
            "name": "distro",
            "specs": [
                [
                    "==",
                    "1.9.0"
                ]
            ]
        },
        {
            "name": "h11",
            "specs": [
                [
                    "==",
                    "0.14.0"
                ]
            ]
        },
        {
            "name": "httpcore",
            "specs": [
                [
                    "==",
                    "1.0.6"
                ]
            ]
        },
        {
            "name": "httpx",
            "specs": [
                [
                    "==",
                    "0.27.2"
                ]
            ]
        },
        {
            "name": "idna",
            "specs": [
                [
                    "==",
                    "3.10"
                ]
            ]
        },
        {
            "name": "pydantic",
            "specs": [
                [
                    "==",
                    "2.9.2"
                ]
            ]
        },
        {
            "name": "pydantic-core",
            "specs": [
                [
                    "==",
                    "2.23.4"
                ]
            ]
        },
        {
            "name": "requests",
            "specs": [
                [
                    "==",
                    "2.32.3"
                ]
            ]
        },
        {
            "name": "runloop-api-client",
            "specs": [
                [
                    "==",
                    "0.5.0"
                ]
            ]
        },
        {
            "name": "sniffio",
            "specs": [
                [
                    "==",
                    "1.3.1"
                ]
            ]
        },
        {
            "name": "typing-extensions",
            "specs": [
                [
                    "==",
                    "4.12.2"
                ]
            ]
        },
        {
            "name": "urllib3",
            "specs": [
                [
                    "==",
                    "2.2.3"
                ]
            ]
        }
    ],
    "lcname": "rl_cli"
}
        
Elapsed time: 0.80144s