-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path.mise.toml
More file actions
271 lines (227 loc) · 6.61 KB
/
Copy path.mise.toml
File metadata and controls
271 lines (227 loc) · 6.61 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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
# mise configuration for eyelet development
# https://mise.jdx.dev/
[env]
PYTHONPATH = "${PWD}/src"
# Development mode
EYELET_DEV = "1"
[tools]
python = "3.11"
uv = "latest"
ruff = "latest"
pre-commit = "latest"
node = "20"
bun = "latest"
"npm:@anthropic-ai/claude-code" = "latest"
[tasks.test]
description = "Run all tests"
run = "uv run pytest -v"
[tasks.lint]
description = "Run linting"
run = "uv run ruff check ."
[tasks.format]
description = "Format code"
run = "uv run ruff format ."
[tasks.typecheck]
description = "Run type checking"
run = "uv run mypy src/"
[tasks.test-hooks]
description = "Test Claude Code hook integration"
run = """
echo "🪝 Testing Claude Code hook integration..."
uv run python test_all_hooks.py
"""
[tasks.test-hooks-verify]
description = "Verify hook test results"
run = """
if [ -z "$1" ]; then
echo "Usage: mise run test-hooks-verify <test-id>"
echo "Example: mise run test-hooks-verify zebra-1234-flamingo-5678"
exit 1
fi
uv run python test_all_hooks.py --verify $1
"""
[tasks.recall]
description = "Run recall command locally"
run = """
# Pass all arguments to the recall command
uv run python -m eyelet.cli.recall "$@"
"""
[tasks.recall-debug]
description = "Run recall with debugging"
run = "PYTHONPATH=src python -m pdb -m eyelet.cli.recall"
[tasks.recall-no-tui]
description = "Run recall in CLI mode (no TUI)"
run = """
uv run python -m eyelet.cli.recall --no-tui "$@"
"""
[tasks.eyelet-dev]
description = "Run eyelet CLI in development mode"
run = """
# Run any eyelet command in development
uv run python -m eyelet.cli.main "$@"
"""
[tasks.hook-coverage]
description = "Generate hook coverage report"
run = """
echo "📊 Generating hook coverage report..."
TEST_ID=$(python -c "import random; print(f'coverage-{random.randint(1000,9999)}-test-{random.randint(1000,9999)}')")
echo "Test ID: $TEST_ID"
# Create test files
echo "Creating test files..."
echo "Test content $TEST_ID" > /tmp/hook_coverage_test.txt
# Execute tools with coverage ID
echo "Testing Bash tool..."
echo "Coverage test $TEST_ID" > /dev/null
echo "Testing Read tool..."
cat /tmp/hook_coverage_test.txt > /dev/null
echo "Testing Write tool..."
echo "Coverage $TEST_ID" > /tmp/hook_coverage_write.txt
# Wait a moment for hooks to complete
sleep 2
# Count hooks
echo ""
echo "Hook Coverage Summary:"
echo "====================="
HOOK_COUNT=$(find eyelet-hooks -name "*.json" -mmin -2 | wc -l)
echo "Hooks triggered in last 2 minutes: $HOOK_COUNT"
# Clean up
rm -f /tmp/hook_coverage_*.txt
"""
[tasks.hook-stats]
description = "Show hook statistics"
run = """
echo "📈 Hook Statistics"
echo "=================="
echo ""
echo "Hooks by Type:"
for hook_type in PreToolUse PostToolUse UserPromptSubmit Notification Stop SubagentStop PreCompact; do
count=$(find eyelet-hooks -path "*/$hook_type/*" -name "*.json" 2>/dev/null | wc -l)
printf "%-20s %s\n" "$hook_type:" "$count"
done
echo ""
echo "Hooks by Tool (Top 10):"
find eyelet-hooks -name "*.json" -print0 | xargs -0 grep '"tool_name"' 2>/dev/null | \\
awk -F'"' '{print $4}' | grep -v '^$' | sort | uniq -c | sort -rn | head -10
echo ""
echo "Recent Activity (Last 24 hours):"
recent=$(find eyelet-hooks -name "*.json" -mtime -1 | wc -l)
echo "Hooks logged: $recent"
"""
[tasks.hook-clean]
description = "Clean old hook logs (older than 7 days)"
run = """
echo "🧹 Cleaning old hook logs..."
OLD_COUNT=$(find eyelet-hooks -name "*.json" -mtime +7 | wc -l)
if [ $OLD_COUNT -gt 0 ]; then
echo "Found $OLD_COUNT logs older than 7 days"
read -p "Delete them? (y/N) " -n 1 -r
echo
if [[ $REPLY =~ ^[Yy]$ ]]; then
find eyelet-hooks -name "*.json" -mtime +7 -delete
echo "Deleted $OLD_COUNT old log files"
else
echo "Cancelled"
fi
else
echo "No logs older than 7 days found"
fi
"""
[tasks.validate]
description = "Validate Claude settings.json"
run = "uv run eyelet validate"
[tasks.configure]
description = "Configure eyelet hooks"
run = "uv run eyelet configure"
[tasks.check]
description = "Run all checks (lint, typecheck, test)"
depends = ["lint", "typecheck", "test"]
[tasks.ci]
description = "Run all CI checks"
depends = ["lint", "typecheck", "test", "validate"]
[tasks.clean]
description = "Clean build artifacts and caches"
run = """
rm -rf dist/ build/ *.egg-info
find . -type d -name __pycache__ -exec rm -rf {} + 2>/dev/null || true
find . -type f -name "*.pyc" -delete
"""
[tasks.doctor]
description = "Run eyelet doctor to check configuration"
run = "uv run eyelet doctor"
[tasks.tui]
description = "Launch TUI interface"
run = "uv run eyelet tui"
[tasks.dev]
description = "Run development server"
run = "uv run eyelet"
[tasks.install]
description = "Install project dependencies"
run = "uv sync"
[tasks.install-dev]
description = "Install development dependencies"
run = "uv sync --all-extras"
[tasks.update]
description = "Update all dependencies to latest versions"
run = """
uv lock --upgrade
uv sync
"""
[tasks.update-minimal]
description = "Update dependencies respecting version constraints"
run = """
uv lock
uv sync
"""
[tasks.build]
description = "Build distribution packages"
run = """
echo "🔨 Building distribution packages..."
rm -rf dist/ build/
uv build
echo "✅ Built packages in dist/"
ls -la dist/
"""
[tasks.check-package]
description = "Check package with twine"
run = """
echo "🔍 Checking package integrity..."
pip install --quiet twine
twine check dist/*
"""
[tasks.publish-test]
description = "Publish to TestPyPI for testing"
run = """
echo "📤 Publishing to TestPyPI..."
echo " Make sure TWINE_TEST_PASSWORD is set"
pip install --quiet twine
TWINE_USERNAME=__token__ TWINE_PASSWORD=$TWINE_TEST_PASSWORD \
twine upload --repository-url https://test.pypi.org/legacy/ dist/*
"""
[tasks.publish]
description = "Publish to PyPI (use GitHub releases instead!)"
run = """
echo "⚠️ Warning: It's recommended to use GitHub releases for publishing"
echo " This will trigger the automated workflow"
read -p "Continue with manual publish? (y/N) " -n 1 -r
echo
if [[ $REPLY =~ ^[Yy]$ ]]; then
./scripts/publish_to_pypi.sh
fi
"""
[tasks.release]
description = "Prepare a new release"
run = """
echo "🚀 Preparing new release..."
echo "1. Update version in pyproject.toml"
echo "2. Update CHANGELOG.md"
echo "3. Run: git add -A && git commit -m 'Release vX.Y.Z'"
echo "4. Run: git tag -a vX.Y.Z -m 'Release vX.Y.Z'"
echo "5. Run: git push origin main --tags"
echo "6. Run: gh release create vX.Y.Z"
"""
[tasks.claude]
run = "bunx @anthropic-ai/claude-code --dangerously-skip-permissions"
description = "Run Claude Code with bun (faster startup)"
[tasks.claude-npm]
run = "claude"
description = "Run Claude Code with npm (standard)"