Add a repository
First, make sure Devin has access to your repositories. Repositories can be added at any point by configuring Devin’s access in:- Teams: Settings > Integrations
- Enterprise: Enterprise Settings > Integrations

Setup the Repository and Development Environment
Once in Repo Setup, you will see three panels:- Repository Setup Steps: Displays all 8 setup steps in order, along with the resulting commands that will be saved to your configuration.
- Devin AI Setup Agent: Devin can suggest what to do for each step based on your specific repository and iterate on the setup until it’s ready to be saved.
- VSCode Terminal: Gives you the ability to run any commands or browse the file system directly in the embedded VSCode environment.
AI-Generated Suggestions
When you add a repository, Devin automatically generates setup suggestions for each step based on analysis of your codebase. You can accept or reject each suggestion individually, or iterate on them with the Devin AI Setup Agent.Repository Setup Steps
Git Pull
The command Devin runs at the start of each session to pull the latest changes from the repository. In most cases, you should keep the default command. Make sure that Devin has access to any submodules in the repository.
Configure Secrets
Set up any secrets or environment variables Devin needs to work with your repository. See Configuring Secrets for more details.
Install Dependencies
Commands to install the initial dependencies for your repository. This runs once during setup to prepare Devin’s environment.
Maintain Dependencies
Commands Devin runs after git pull during session startup in case new dependencies were added. This should typically be the same command you use to install dependencies (e.g.
npm install, pip install -r requirements.txt, etc.).Set up Lint
Commands Devin should use to run lint or check for syntax errors. Devin will look at the output of these commands before committing changes.
Set up Tests
Commands Devin should use to run tests. Like with the lint commands, Devin will look at the output of these commands before committing changes.
Run Local App
Let Devin know how to run your code locally. This is useful if Devin needs to run your code to test or debug changes. You can use Devin’s browser to log in to websites you want Devin to use. Add login credentials to secrets if the login times out.
Finish or Save Setup
Once you are satisfied with the setup, click Finish Setup to save the setup. This will then replay all the commands in the setup steps to prepare Devin’s environment. If you are not finished with your changes, click Finish Later to save the setup. This will keep the setup in progress and allow you to come back to it later. However, note that only one setup can be in progress at a time, so we do not suggest using this option unless absolutely necessary.Configure Previously Added Repositories
You can always edit or add a new repo in Settings > Devin’s Machine. To edit an existing repo, click Configure on the top right of the page, Add/Modify/Remove repo, select the repo you want to edit, and click submit

Machine Version History
If during setup you accidentally introduce a breaking change, you can revert to a previous environment snapshot. Go to Settings > Devin’s Machine, switch to the Version History tab, and restore a previous snapshot that you know worked correctly.
Configuring Secrets
Secrets such as API keys, passwords, and tokens can be added in the secrets dashboard. When possible, we recommend using a.env file in Devin’s environment with direnv to manage environment variables automatically. See the configuring environment variables example below for details.
Examples
Below are some examples of how to set up Devin’s environment for different use cases. Since Devin runs all commands using bash, one common pattern is to edit the~/.bashrc file to automatically set up Devin’s shell. You can run devin ~/.bashrc in the terminal to edit the file in VS Code.
Configuring Environments Automatically for Different Repositories
Say you have two repositories that require different versions of Node, and you want Devin to automatically use the right version for each repository. We’ll usenvm 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.
Configuring Environment Variables
direnv is pre-installed on Devin’s machine and can be used to manage environment variables per repository. The direnv hook is already configured in ~/.bashrc.
To set up environment variables for a repository, create a .envrc file in the root of the repository. For example:
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.
Adding Directories to the System PATH
We can edit~/.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.
Logging In to Websites
During environment setup, you can use the Browser tab to log in to any website that you want Devin to interact with. These session cookies will be stored in Devin’s environment and will be available to Devin in future sessions. If you are using a website that times out your login frequently, you will also want to set Devin up with credentials in your Secrets dashboard.Troubleshooting
Why aren’t my commands being verified?
If you run into an error when verifying one of the commands, try to inspect its output and also try to run the command yourself in a fresh terminal.- Check the path of the executable you are running. We strongly recommend either using absolute paths or adding executables to the system PATH.
- Make sure you’ve installed the necessary tools and dependencies to run the command. If you haven’t, use the Setup Agent or VSCode Terminal to install them, then verify again.
- Check that the commands are being run in the right directory. If the commands need to run in a specific directory, you can use
cdlike so:cd <directory> && <command>. - Check that you are using the right language versions (e.g. right versions of Node, Python, etc.).
- You might want to modify your
~/.bashrcto automatically use the right environment. Check out our guide for an example of how to use the right language version for different repositories.
My commands work when I run them manually
Check that you’ve setup your bashrc so that a fresh bash shell has access to the necessary tools. Try running your commands in a fresh terminal. If they don’t work, you will likely need to edit your bashrc, for example by running certain setup commands or editing the system PATH. Check out our guide for an example of how to use the right language version for different repositories. Commands will timeout after 5 minutes. You can induce caching by running the commands in the VS Code terminal before verifying. We do not recommend giving Devin commands that take longer than 5 minutes to run, as it will significantly slow it down.Devin can’t run my lint/test commands in sessions
Take a look at the output of Devin’s terminal to see if you can spot any errors. You can also try running the commands yourself in a fresh terminal to see if they work. If needed, you can revisit the repository setup process to make changes to Devin’s environment.The git pull step isn’t working
Double check that Devin has access to the repository and submodules of the repository. Also check out the GitHub Integration Documentation if you run into any permission issues.All Done!
Congrats! You’ve onboarded Devin and can start building together. It’s time to start your first session. Keep in mind that Devin works best when you:- Tell Devin how to check its progress
- Break down big tasks
- Share detailed requirements upfront
- Run multiple sessions in parallel
