> ## Documentation Index
> Fetch the complete documentation index at: https://mintlify.com/huggingface/lerobot/llms.txt
> Use this file to discover all available pages before exploring further.

# Contributing to LeRobot

> Learn how to contribute to the LeRobot project

Everyone is welcome to contribute, and we value everybody's contribution. Code is not the only way to help the community. Answering questions, helping others, reaching out, and improving the documentation are immensely valuable.

Whichever way you choose to contribute, please be mindful to respect our [code of conduct](https://github.com/huggingface/lerobot/blob/main/CODE_OF_CONDUCT.md) and our [AI policy](https://github.com/huggingface/lerobot/blob/main/AI_POLICY.md).

## Ways to Contribute

You can contribute in many ways:

* **Fixing issues:** Resolve bugs or improve existing code.
* **New features:** Develop new features.
* **Extend:** Implement new models/policies, robots, or simulation environments and upload datasets to the Hugging Face Hub.
* **Documentation:** Improve examples, guides, and docstrings.
* **Feedback:** Submit tickets related to bugs or desired new features.

If you are unsure where to start, join our [Discord Channel](https://discord.gg/q8Dzzpym3f).

## Development Setup

To contribute code, you need to set up a development environment.

### 1. Fork and Clone

Fork the repository on GitHub, then clone your fork:

```bash theme={null}
git clone https://github.com/<your-handle>/lerobot.git
cd lerobot
git remote add upstream https://github.com/huggingface/lerobot.git
```

### 2. Environment Installation

Please follow our [Installation Guide](/installation) for the environment setup and installation from source.

## Running Tests & Quality Checks

### Code Style (Pre-commit)

Install `pre-commit` hooks to run checks automatically before you commit:

```bash theme={null}
pre-commit install
```

To run checks manually on all files:

```bash theme={null}
pre-commit run --all-files
```

### Running Tests

We use `pytest`. First, ensure you have test artifacts by installing **git-lfs**:

```bash theme={null}
git lfs install
git lfs pull
```

Run the full suite (this may require extras installed):

```bash theme={null}
pytest -sv ./tests
```

Or run a specific test file during development:

```bash theme={null}
pytest -sv tests/test_specific_feature.py
```

## Submitting Issues & Pull Requests

Use the templates for required fields and examples.

* **Issues:** Follow the [ticket template](https://github.com/huggingface/lerobot/blob/main/.github/ISSUE_TEMPLATE/bug-report.yml).
* **Pull requests:** Rebase on `upstream/main`, use a descriptive branch (don't work on `main`), run `pre-commit` and tests locally, and follow the [PR template](https://github.com/huggingface/lerobot/blob/main/.github/PULL_REQUEST_TEMPLATE.md).

One member of the LeRobot team will then review your contribution.

## Community Guidelines

<CardGroup cols={2}>
  <Card title="Code of Conduct" icon="shield-halved" href="https://github.com/huggingface/lerobot/blob/main/CODE_OF_CONDUCT.md">
    Be respectful and inclusive in all interactions
  </Card>

  <Card title="AI Policy" icon="robot" href="https://github.com/huggingface/lerobot/blob/main/AI_POLICY.md">
    Guidelines for AI-assisted contributions
  </Card>

  <Card title="Discord Community" icon="discord" href="https://discord.gg/q8Dzzpym3f">
    Join discussions and get help from the community
  </Card>

  <Card title="GitHub Repository" icon="github" href="https://github.com/huggingface/lerobot">
    View source code and submit issues
  </Card>
</CardGroup>

Thank you for contributing to LeRobot!
