Skip to content

Project Initialization

Initializing Rover in a repository is the first step and a prerequisite to use it. This guide walks you through setting up Rover in both new and existing projects.

Rover uses two different sets of configuration and state files, all stored under your project repository:

  • .rover: This directory contains settings related to user preferences, such as your preferred agent. Not meant to be checked into git.
  • rover.json: This file contains project settings, such as the languages in your repository, the package manager it uses, and whether commits should include agent attribution. Meant to be checked into git.

There are two types of initialization: from scratch, and when a repository was cloned with a pre-initialized rover.json, in which case only the .rover directory needs to be populated.

Use this approach when setting up Rover in a project for the first time.

Initializing Rover from scratch

  1. 1

    Navigate to a project in which you want to enable Rover. This project needs to have git initialized, and at least one commit has to exist in its history.

    Terminal window
    mkdir -p ~/rover-quickstart && cd ~/rover-quickstart && git init && \
    touch README.md && git add README.md && git commit -a -m 'Initial commit'
  2. 2

    Initialize Rover

    Terminal window
    rover init -y

    Rover will detect all supported installed agents in your system. You can init Rover in as many projects as you wish.

  3. 3

    Rover is fully initialized! You can now start creating tasks.

If you cloned a repository that already has a rover.json file, you only need to initialize Rover locally.

Initializing Rover on a pre-initialized repository

  1. 1

    Clone your project that has already been initialized by Rover:

    Terminal window
    git clone [email protected]:myorg/myrepo.git && cd myrepo
  2. 2

    Initialize Rover

    Terminal window
    rover init -y

    Rover will detect all supported installed agents in your system.

  3. 3

    Rover is fully initialized! The .rover directory is now created with your local preferences.

After initialization, you’re ready to create your first task. Check out the guides below to learn how to work with Rover.