Workspaces
Overview
Workspaces are disposable, fully-configured development environments powered by VMs. They are created from prebuilds and configured using a hocus.yml file at the root of your project.
Workspace Tasks
Workspace tasks are defined in the tasks
section of your hocus.yml
file. They run every time a workspace is opened. The Hocus VSCode extension will automatically open a terminal for each task. You can also use tmux to interact with the workspace tasks.
$ tmux ls
hocus-task-0: 1 windows (created Thu Mar 30 11:05:42 2023)
hocus-task-1: 1 windows (created Thu Mar 30 11:05:42 2023)
hocus-task-2: 1 windows (created Thu Mar 30 11:05:42 2023)
$ tmux attach -t hocus-task-0
Accessing a Workspace
Workspaces are accessible over SSH and you set up their authorized_keys
on the User Settings page. Your local SSH config is modified by the Hocus VSCode extension when you open a workspace through the dashboard, and workspace connection details are added.
How to Add Persistent Environment Variables
You can add persistent environment variables to your workspaces by using the Environment tab in your project settings.
Git Username and Email
You can set up persistent Git username and email by going to user settings in the Hocus web dashboard.
Git Authentication
Git authentication is handled by SSH Agent forwarding, which is set up automatically by the Hocus VSCode extension. This means your existing local SSH keys are used to access private Git repositories.