Development Setup
Set up a development environment for contributing to Ash.
Prerequisites
- Python 3.12+
- uv package manager
- Docker
- Git
Setup
-
Clone the repository
Terminal window git clone https://github.com/dcramer/ash.gitcd ash -
Install dependencies
Terminal window uv sync --all-groupsThis installs all dependencies including dev tools.
-
Install prek hooks
Terminal window # Install prek (if not already installed)curl --proto '=https' --tlsv1.2 -LsSf https://github.com/j178/prek/releases/download/v0.2.28/prek-installer.sh | sh# Install hooksprek install -
Create config file
Terminal window uv run ash initThis creates
~/.ash/config.toml. Edit it to add your API keys (Anthropic + OpenAI). -
Run database migrations
Terminal window uv run ash upgrade -
Build the sandbox
Terminal window uv run ash sandbox build
Development Tools
| Tool | Purpose | Command |
|---|---|---|
| ruff | Linting + formatting | uv run ruff check --fix . |
| pytest | Testing | uv run pytest |
| prek | Git hooks | prek run --all-files |
Running Locally
Interactive chat:
uv run ash chatStart server:
uv run ash serveCode Quality
Run linter:
uv run ruff check --fix .Format code:
uv run ruff format .Both run automatically via prek hooks.
Adding Dependencies
Add runtime dependency:
uv add <package>Add dev dependency:
uv add --dev <package>IDE Setup
VS Code
Recommended extensions:
- Python
- Ruff
- Even Better TOML
Settings:
{ "python.defaultInterpreterPath": ".venv/bin/python", "editor.formatOnSave": true, "[python]": { "editor.defaultFormatter": "charliermarsh.ruff" }}