Set up Devin’s workspace to start building
~/repos
. Do not move or delete those directories. The repository you’re currently setting up has already been cloned, and the machine also contains any other repositories you’ve set up in the past.
After you finish the repository set up, a snapshot of the virtual machine will be saved. Future Devin sessions will start from this snapshot and will include any tools or dependencies you’ve installed during the setup process.
Follow the below steps and the instructions on screen to set up the repository. You can always come back and edit the repository setup after saving. You can also follow along our video guide below.
Git Pull
Configure Secrets
.env
file to Devin’s workspace. This example shows how to do this with direnv
.Other secrets, such as passwords, can be added in the secrets dashboard.Install Dependencies
npm install
, pip install -r requirements.txt
, etc.)Maintain Dependencies
npm install
, pip install -r requirements.txt
, etc.).The purpose of this is to ensure that Devin can update his local dependencies if they get added to the git repository.Setup Lint
cd
like so: cd <directory> && <lint command>
.Setup Tests
cd
like so: cd <directory> && <test command>
.Setup Local App
Additional Notes
~/.bashrc
file to automatically set up Devin’s shell. You can run devin ~/.bashrc
in the terminal to edit the file in VS Code.
custom_cd
section already in their ~/.bashrc
. You will then just need to update the
section for your own repos.nvm
to install and manage the Node versions. nvm
should already be installed in Devin’s machine.
First, we’ll install the two versions of Node by running the following commands in the VS Code terminal:
~/.bashrc
by running devin ~/.bashrc
in the terminal. Append the following to ~/.bashrc
.
nvm use 18
whenever Devin is in the node18
repo and nvm use 20
whenever Devin is in the node20
repo.
direnv
to manage environment variables. First, we’ll follow direnv’s installation instructions to install it on Devin’s machine. After April 24 2025, direnv should automatically be installed on new teams’ machines.
We’ll first install direnv
by running the following command in the VS Code terminal:
~/.bashrc
to set up the direnv hook. You can open up ~/.bashrc
by running devin ~/.bashrc
in the terminal.
.envrc
file in the root of our repository that might look something like this.
direnv allow
in the terminal to load the environment variables.
Devin will now have the environment variables in our .envrc
file added to his environment when working in our repository in future sessions.
.envrc
to your .gitignore
file so that Devin doesn’t
accidentally commit it to the repository.~/.bashrc
to add directories to the system PATH. This will make it easier for Devin to run the executables in those directories. For example, we can append the following to ~/.bashrc
which will add the ~/bin
directory to the system PATH.
~/bin
directory without having to specify the full path.
cd
like so: cd <directory> && <command>
.~/.bashrc
to automatically use the right environment.
Check out our guide for an example of how to use the right language version for different repositories.CI=1 brew install <package>
instead.