-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.envrc
More file actions
45 lines (38 loc) · 1.58 KB
/
.envrc
File metadata and controls
45 lines (38 loc) · 1.58 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# direnv configuration for this project
# This file contains project defaults and is version-controlled
# For personal overrides, create .envrc.local (git-ignored)
# Activate virtual environment (if it exists)
# Run 'uv sync --all-extras --dev' to create the virtual environment
if [ -d .venv ]; then
source .venv/bin/activate
else
echo "⚠️ Virtual environment not found. Run: uv sync --all-extras --dev"
fi
# Cache directories (all point to tmp/)
export UV_CACHE_DIR=${UV_CACHE_DIR:-"$(pwd)/tmp/.uv_cache"}
export RUFF_CACHE_DIR=${RUFF_CACHE_DIR:-"$(pwd)/tmp/.ruff_cache"}
export MYPY_CACHE_DIR=${MYPY_CACHE_DIR:-"$(pwd)/tmp/.mypy_cache"}
export COVERAGE_FILE=${COVERAGE_FILE:-"$(pwd)/tmp/.coverage"}
export PRE_COMMIT_HOME=${PRE_COMMIT_HOME:-"$(pwd)/tmp/.pre-commit"}
# Bastproxy home for settings/data (plugins, etc.)
export BASTPROXY_HOME=${BASTPROXY_HOME:-"$HOME/bastproxy"}
# Add local bin to PATH
export PATH="$PWD/.venv/bin:$PATH"
# Project-specific environment variables
# Uncomment and customize as needed:
# export DEBUG=${DEBUG:-false}
# export LOG_LEVEL=${LOG_LEVEL:-INFO}
# Load user-specific settings from .envrc.local (git-ignored)
# This is where you put personal overrides and credentials
if [ -f .envrc.local ]; then
source_env .envrc.local
fi
watch_file .envrc.local
# Show loaded configuration
echo "🔧 Project environment loaded"
echo " Python: $(python --version 2>&1)"
echo " Caches: tmp/ (UV, Ruff, Mypy, Coverage, Pre-commit)"
# Helpful warnings
if [ ! -f .envrc.local ]; then
echo "💡 Tip: Create .envrc.local for personal settings (API keys, debug flags, etc.)"
fi