# Setup environment

`haniwers`の開発に必要な環境を準備する手順を説明します。

## 必要なツール

**system**

- `git`: for version control system
- `pipx`: for Python package installer
- `poetry`: for Python package manager
- `commitizen`: for semantic versioning
- `VS Code`: for editor (optional)

**project**

- `pre-commit`: for pre-commit hooks
- `sphinx`: for documentation
- `pytest`: for testing
- `ruff`: for formatter and linter

## macOSの場合

macOS（やLinux）は`brew`（Homebrew）で必要なコマンドをインストールできます。

```bash
# Install git
brew install git

# Install pipx and set path
brew install pipx
pipx ensurepath

# Install poetry
pipx install poetry

# Install editor (optional)
brew install --cask visual-studio-code
```

## Raspberry Piの場合

Raspberry Pi（やLinux）は`apt`で必要なコマンドをインストールできます。

```bash
# Install git
sudo apt install git

# Install pipx
sudo apt install pipx
pipx ensurepath

# Install poetry
pipx install poetry
```

## セットアップ経験のある環境

| 機器名 | OS | Chip |
|---|---|---|
| MacBook | macOS 13 Ventura | Intel |
| MacBook Air (M2, 2022) | macOS 14.6.1 Sonoma | Apple M2 |
