Migrate task runner from Makefile to mise

Remove the Makefile and move all tasks into mise.toml (setup-dev, check-all,
dev, format/lint/type-check/security, pre-commit, clean, docs). Update the
release workflow to use jdx/mise-action and refresh contributor/install docs
to use mise commands.
This commit is contained in:
Mads Hvelplund 2026-06-19 07:08:19 +02:00
parent 11e5d1c2b3
commit 0fd17f8c4e
No known key found for this signature in database
GPG key ID: 08208EA18E154F00
8 changed files with 128 additions and 93 deletions

View file

@ -26,11 +26,10 @@ jobs:
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- uses: jdx/mise-action@v4
with:
python-version: '3.12'
- uses: astral-sh/setup-uv@v5
install: true
cache: true
- name: Build
shell: bash

View file

@ -6,9 +6,9 @@ Thank you for your interest in contributing to Strix! This guide will help you g
### Prerequisites
- Python 3.12+
- Docker (running)
- [uv](https://docs.astral.sh/uv/) (for dependency management)
- [mise](https://mise.jdx.dev/getting-started.html) — provisions the toolchain (Python 3.12,
[uv](https://docs.astral.sh/uv/), Node + the docs CLI) and runs project tasks
- Docker (running) — install separately; mise manages CLIs/runtimes, not the Docker daemon
- Git
### Local Development
@ -19,22 +19,29 @@ Thank you for your interest in contributing to Strix! This guide will help you g
cd strix
```
2. **Install development dependencies**
2. **Install the toolchain** (Python + uv, as pinned in `mise.toml`)
```bash
make setup-dev
# The first time you use mise in this repo, trust the config first:
mise trust
mise install
```
3. **Install development dependencies**
```bash
mise setup-dev
# or manually:
uv sync
uv run pre-commit install
```
3. **Configure your LLM provider**
4. **Configure your LLM provider**
```bash
export STRIX_LLM="openai/gpt-5.4"
export LLM_API_KEY="your-api-key"
```
4. **Run Strix in development mode**
5. **Run Strix in development mode**
```bash
uv run strix --target https://example.com
```
@ -59,7 +66,7 @@ Skills are specialized knowledge packages that enhance agent capabilities. See [
2. **Fork and branch** - Work from the `main` branch
3. **Make your changes** - Follow existing code style
4. **Write/update tests** - Ensure coverage for new features
5. **Run quality checks** - `make check-all` should pass
5. **Run quality checks** - `mise check-all` should pass
6. **Submit PR** - Link to issue and provide context
### PR Guidelines

View file

@ -1,70 +0,0 @@
.PHONY: help install dev-install format lint type-check security check-all clean pre-commit setup-dev dev
help:
@echo "Available commands:"
@echo " setup-dev - Install all development dependencies and setup pre-commit"
@echo " install - Install production dependencies"
@echo " dev-install - Install development dependencies"
@echo ""
@echo "Code Quality:"
@echo " format - Format code with ruff"
@echo " lint - Lint code with ruff"
@echo " type-check - Run type checking with mypy and pyright"
@echo " security - Run security checks with bandit"
@echo " check-all - Run all code quality checks"
@echo ""
@echo "Development:"
@echo " pre-commit - Run pre-commit hooks on all files"
@echo " clean - Clean up cache files and artifacts"
install:
uv sync --no-dev
dev-install:
uv sync
setup-dev: dev-install
uv run pre-commit install
@echo "✅ Development environment setup complete!"
@echo "Run 'make check-all' to verify everything works correctly."
format:
@echo "🎨 Formatting code with ruff..."
uv run ruff format .
@echo "✅ Code formatting complete!"
lint:
@echo "🔍 Linting code with ruff..."
uv run ruff check . --fix
@echo "✅ Linting complete!"
type-check:
@echo "🔍 Type checking with mypy..."
uv run mypy strix/
@echo "🔍 Type checking with pyright..."
uv run pyright strix/
@echo "✅ Type checking complete!"
security:
@echo "🔒 Running security checks with bandit..."
uv run bandit -r strix/ -c pyproject.toml
@echo "✅ Security checks complete!"
check-all: format lint type-check security
@echo "✅ All code quality checks passed!"
pre-commit:
@echo "🔧 Running pre-commit hooks..."
uv run pre-commit run --all-files
@echo "✅ Pre-commit hooks complete!"
clean:
@echo "🧹 Cleaning up cache files..."
find . -type d -name "__pycache__" -exec rm -rf {} + 2>/dev/null || true
find . -type d -name ".mypy_cache" -exec rm -rf {} + 2>/dev/null || true
find . -type d -name ".ruff_cache" -exec rm -rf {} + 2>/dev/null || true
find . -name "*.pyc" -delete 2>/dev/null || true
@echo "✅ Cleanup complete!"
dev: format lint type-check
@echo "✅ Development cycle complete!"

View file

@ -80,6 +80,9 @@ Strix are autonomous AI agents that act just like real hackers - they run your c
# Install Strix
curl -sSL https://strix.ai/install | bash
# Or, with mise (installs the released binary from the GitHub repo):
mise use -g "github:usestrix/strix"
# Configure your AI provider
export STRIX_LLM="openai/gpt-5.4"
export LLM_API_KEY="your-api-key"

View file

@ -4,7 +4,10 @@ Documentation source files for Strix, powered by [Mintlify](https://mintlify.com
## Local Preview
Node and the Mintlify CLI are provisioned by [mise](https://mise.jdx.dev/getting-started.html) (see `mise.toml`). The
first time you use mise in this repo, run `mise trust` before `mise install`.
```bash
npm i -g mintlify
cd docs && mintlify dev
mise install # provisions Node + the Mintlify CLI
mise docs # serves the docs site locally
```

View file

@ -7,9 +7,8 @@ description: "Contribute to Strix development"
### Prerequisites
- Python 3.12+
- Docker (running)
- [uv](https://docs.astral.sh/uv/)
- [mise](https://mise.jdx.dev/getting-started.html) — provisions the toolchain (Python 3.12, [uv](https://docs.astral.sh/uv/), Node + the docs CLI) and runs project tasks
- Docker (running) — install separately; mise manages CLIs/runtimes, not the Docker daemon
- Git
### Local Development
@ -21,14 +20,22 @@ description: "Contribute to Strix development"
cd strix
```
</Step>
<Step title="Install the toolchain">
Installs Python and uv as pinned in `mise.toml`. The first time you use mise in this repo, run `mise trust` before `mise install`.
```bash
mise trust
mise install
```
</Step>
<Step title="Install dependencies">
```bash
make setup-dev
mise setup-dev
# or manually:
uv sync
uv run pre-commit install
pre-commit install
```
</Step>
<Step title="Configure LLM">
```bash
@ -63,7 +70,7 @@ Skills are specialized knowledge packages that enhance agent capabilities. They
2. **Fork and branch** — Work from `main`
3. **Make changes** — Follow existing code style
4. **Write tests** — Ensure coverage for new features
5. **Run checks** — `make check-all` should pass
5. **Run checks** — `mise check-all` should pass
6. **Submit PR** — Link to issue and provide context
### Code Style
@ -90,7 +97,11 @@ Include:
<Card title="Discord" icon="discord" href="https://discord.gg/strix-ai">
Join the community for help and discussion.
</Card>
<Card title="GitHub Issues" icon="github" href="https://github.com/usestrix/strix/issues">
<Card
title="GitHub Issues"
icon="github"
href="https://github.com/usestrix/strix/issues"
>
Report bugs and request features.
</Card>
</CardGroup>

View file

@ -16,9 +16,14 @@ description: "Install Strix and run your first security scan"
curl -sSL https://strix.ai/install | bash
```
</Tab>
<Tab title="pipx">
<Tab title="mise (pipx)">
```bash
pipx install strix-agent
mise use -g "pipx:strix-agent"
```
</Tab>
<Tab title="mise (github)">
```bash
mise use -g "github:usestrix/strix"
```
</Tab>
</Tabs>

77
mise.toml Normal file
View file

@ -0,0 +1,77 @@
[tools]
"npm:mintlify" = "latest"
node = "lts"
pre-commit = "latest"
python = "3.12"
uv = "latest"
[tasks.prod-install]
description = "Install production dependencies"
run = "uv sync --no-dev"
[tasks.dev-install]
description = "Install development dependencies"
run = "uv sync"
[tasks.setup-dev]
description = "Install all dev dependencies and set up pre-commit hooks"
depends = ["dev-install"]
run = [
"pre-commit install",
"echo '✅ Development environment setup complete!'",
"echo \"Run 'mise check-all' to verify everything works correctly.\"",
]
[tasks.format]
description = "Format code with ruff"
run = "uv run ruff format ."
[tasks.lint]
description = "Lint code with ruff"
run = "uv run ruff check . --fix"
[tasks.type-check]
description = "Run type checking with mypy and pyright"
run = ["uv run mypy strix/", "uv run pyright strix/"]
[tasks.security]
description = "Run security checks with bandit"
run = "uv run bandit -r strix/ -c pyproject.toml"
[tasks.check-all]
description = "Run all code quality checks (format, lint, type-check, security)"
run = [
"mise format",
"mise lint",
"mise type-check",
"mise security",
"echo '✅ All code quality checks passed!'",
]
[tasks.pre-commit]
description = "Run pre-commit hooks on all files"
run = "uv run pre-commit run --all-files"
[tasks.clean]
description = "Clean up cache files and artifacts"
run = """
find . -type d -name "__pycache__" -exec rm -rf {} + 2>/dev/null || true
find . -type d -name ".mypy_cache" -exec rm -rf {} + 2>/dev/null || true
find . -type d -name ".ruff_cache" -exec rm -rf {} + 2>/dev/null || true
find . -name "*.pyc" -delete 2>/dev/null || true
echo '✅ Cleanup complete!'
"""
[tasks.dev]
description = "Quick dev loop: format, lint, type-check"
run = [
"mise format",
"mise lint",
"mise type-check",
"echo '✅ Development cycle complete!'",
]
[tasks.docs]
description = "Preview the documentation site locally (Mintlify)"
dir = "docs"
run = "mintlify dev"