diff --git a/scripts/dev-setup.sh b/scripts/dev-setup.sh new file mode 100755 index 0000000..7bd5795 --- /dev/null +++ b/scripts/dev-setup.sh @@ -0,0 +1,35 @@ +#!/usr/bin/env bash +set -euo pipefail + +# Netsleuth Development Setup Script +# This script sets up the development environment for netsleuth contributors + +echo "๐Ÿ”ง Setting up netsleuth development environment..." + +# Check if uv is installed +if ! command -v uv &> /dev/null; then + echo "โŒ uv not found. Installing uv..." + curl -LsSf https://astral.sh/uv/install.sh | sh + export PATH="$HOME/.local/bin:$PATH" +fi + +echo "โœ… uv found: $(uv --version)" + +# Install Python dependencies +echo "๐Ÿ“ฆ Installing dependencies..." +uv sync --extra tcptrace --extra ndt7 + +# Install pre-commit hooks +echo "๐Ÿช Installing pre-commit hooks..." +uv run pre-commit install + +# Run initial checks +echo "๐Ÿงช Running initial tests..." +uv run pytest -q + +echo "โœ… Development environment ready!" +echo "" +echo "Next steps:" +echo " 1. Review CONTRIBUTING.md for contribution guidelines" +echo " 2. Run 'uv run pytest' to verify everything works" +echo " 3. Start coding! ๐Ÿš€"