Yolo
Live environments for any repository. Running in your cloud provider account.
Currently available on Amazon Web Services and Hetzner.
... use it to deploy your app, as a remote development environment or even as a code sandbox. Honestly, it's up to you!
yolo aws init yolo-sh/api --instance-type t2.medium
... now that this environment is created, you can connect to it with your preferred editor using the edit
command:
yolo aws edit yolo-sh/api
Table of contents
Requirements
The Yolo binary has been tested on Linux and MacOS. Support for Windows is theoretical (testers needed 💙).
Before using Yolo, the following dependencies need to be installed:
Before running the edit
command, one of the following editors need to be installed:
Installation
The easiest way to install Yolo is by running the following command in your terminal:
curl -sf https://raw.githubusercontent.com/yolo-sh/cli/main/install.sh | sh -s -- -b /usr/local/bin latest
This command could be run as-is or by changing:
Once done, you could confirm that Yolo is installed by running the yolo
command:
yolo --help
Usage
Yolo - Live environments for any repository in any cloud provider
To begin, run the command "yolo login" to connect your GitHub account.
From there, the most common workflow is:
- yolo <cloud_provider> init <repository> : to initialize an environment for a specific GitHub repository
- yolo <cloud_provider> edit <repository> : to connect your preferred editor to an environment
- yolo <cloud_provider> remove <repository> : to remove an unused environment
<repository> may be relative to your personal GitHub account (eg: cli) or fully qualified (eg: my-organization/api).
Usage:
yolo [command]
Available Commands:
aws Use Yolo on Amazon Web Services
completion Generate the autocompletion script for the specified shell
help Help about any command
hetzner Use Yolo on Hetzner
login Connect a GitHub account to use with Yolo
Flags:
-h, --help help for yolo
-v, --version version for yolo
Use "yolo [command] --help" for more information about a command.
Login
yolo login
To begin, you need to run the login
command to connect your GitHub account.
Yolo requires the following permissions:
All your data (including the OAuth access token) are only stored locally in ~/.config/yolo/yolo.yml
(or in XDG_CONFIG_HOME
if set).
The source code that implements the GitHub OAuth flow is located in the yolo-sh/api repository.
Init
yolo <cloud_provider> init <repository> [--instance-type=<instance_type>]
The init
command initializes an environment for a specific GitHub repository.
An --instance-type
flag can be passed to specify the instance type that will power your environment. (See the corresponding cloud provider repository for default / valid values).
Examples
yolo aws init yolo-sh/api
yolo hetzner init yolo-sh/api --instance-type cx11
Edit
yolo <cloud_provider> edit <repository>
The edit
command connects your preferred editor to an environment.
Example
yolo aws edit yolo-sh/api
Open port
yolo <cloud_provider> open-port <repository> <port>
The open-port
command makes the specified port reachable from any IP address using the TCP
protocol.
Example
yolo aws open-port yolo-sh/api 8000
Close port
yolo <cloud_provider> close-port <repository> <port>
The close-port
command makes the specified port unreachable from all IP addresses.
Example
yolo aws close-port yolo-sh/api 8000
Remove
yolo <cloud_provider> remove <repository>
The remove
command removes an existing environment.
Removing means that the underlying instance and all your data will be permanently removed.
Example
yolo aws remove yolo-sh/api
Uninstall
yolo <cloud_provider> uninstall
The uninstall
command removes all the infrastructure components used by Yolo from your cloud provider account. (See the corresponding cloud provider repository for details).
Before running this command, all environments need to be removed.
Example
yolo aws uninstall
Environments configuration
All environments run in Docker containers built from the ghcr.io/yolo-sh/workspace-full
image. You could see the source of this image in the yolo-sh/workspace-full repository.
In summary, Yolo is built on ubuntu 22.04
with systemd
and most popular runtimes pre-installed. An user yolo
is created and configured to be used as the default user. Root privileges are managed via sudo
.
Your repositories will be cloned in /home/yolo/workspace
.
Yolo uses the sysbox runtime to improve isolation and to enable containers to run the same workloads than VMs.
Runtimes
The following runtimes are pre-installed in all environments:
-
docker (latest)
-
docker compose (latest)
-
php (latest)
-
java 17.0 / maven 3.8
-
node 18.7 (via nvm)
-
python 3.10 (via pyenv)
-
ruby 3.1 (via rvm)
-
rust (latest)
-
go (latest)
License
Yolo is available as open source under the terms of the MIT License.