Configure your dotfiles repository
Point Ona at a Git repository containing your dotfiles. Every new environment will clone it and run your install script automatically. Via CLI:How dotfiles are installed
When an environment starts, Ona:- Clones your dotfiles repository to
~/dotfiles - Runs the first matching script it finds:
install.shorinstallbootstrap.shorbootstrapsetup.shorsetup
Update dotfiles in a running environment
Changes pushed to your dotfiles repository apply to new environments only. To update a running environment:install.sh with whichever script your repository uses.
Iterate on your dotfiles
To test changes without creating new environments each time:- Start an environment from your dotfiles repository
- Edit files and re-run your install script to validate
- Run
ona environment devcontainer rebuildto reset the environment state if needed
Change the default shell
Add this to your install script to switch tozsh (or any other shell):
/etc/passwd, which persists across terminal sessions within the same environment.
Best practices
- Keep install scripts fast. Every second adds to environment startup time.
- Run non-interactively. The install script runs without a TTY. Commands that prompt for input (e.g.,
read, interactive installers) will hang the environment. - Make scripts self-contained. Check for dependencies before installing them, since Dev Container images vary across projects:
- Do not store secrets in dotfiles. Use Ona secrets instead.
Troubleshooting
Dotfiles failed to clone
Check the environment logs under “Creating Dev Container” for errors. A common cause:Install script failed
Clone errors appear in the environment logs, but install script failures may not. Reproduce the error manually:Environment hangs during startup
The install script runs in a non-interactive shell without a TTY. Commands that expect terminal input will block indefinitely. To diagnose:- Remove your dotfiles repository from Settings > Preferences
- Start a fresh environment
- Clone your dotfiles and run the install script manually to find the blocking command
- Fix the script, push, and re-add the repository URL