Skip to content
This repository was archived by the owner on Jan 2, 2026. It is now read-only.

Commit ec35840

Browse files
committed
fix: restore --directory flag for uv run commands
The previous fix incorrectly removed --directory, which is needed for uv to find pyproject.toml when running from user project directory rather than the plugin directory. Corrected pattern uses CLAUDE_PLUGIN_ROOT directly without the broken fallback glob.
1 parent 35f54de commit ec35840

14 files changed

Lines changed: 32 additions & 32 deletions

commands/audit-log.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ EVENT_TYPE="${EVENT_TYPE:-}"
9898
JSON_OUTPUT="${JSON_OUTPUT:-false}"
9999
LIMIT="${LIMIT:-50}"
100100

101-
uv run python3 -c "
101+
uv run --directory "${CLAUDE_PLUGIN_ROOT}" python3 -c "
102102
import json
103103
import sys
104104
from datetime import UTC, datetime, timedelta
@@ -204,7 +204,7 @@ else:
204204
**Show overall statistics**:
205205

206206
```bash
207-
uv run python3 -c "
207+
uv run --directory "${CLAUDE_PLUGIN_ROOT}" python3 -c "
208208
from git_notes_memory.security import get_audit_logger
209209
210210
logger = get_audit_logger()

commands/capture.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ If `$ARGUMENTS` is empty or very short (< 10 characters):
8787
Use Bash to invoke the Python library:
8888

8989
```bash
90-
uv run python3 -c "
90+
uv run --directory "${CLAUDE_PLUGIN_ROOT}" python3 -c "
9191
from git_notes_memory import get_capture_service
9292
9393
capture = get_capture_service()
@@ -159,7 +159,7 @@ For structured captures, the library also provides:
159159

160160
If the capture fails:
161161
1. Check if we're in a git repository: `git rev-parse --git-dir`
162-
2. Check if the library is installed: `uv run python3 -c "import git_notes_memory"`
162+
2. Check if the library is installed: `uv run --directory "${CLAUDE_PLUGIN_ROOT}" python3 -c "import git_notes_memory"`
163163
3. Show helpful error message with recovery action
164164

165165
</error_handling>

commands/health.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ Parse the following options:
7373

7474
**Execute the health check**:
7575
```bash
76-
uv run python3 -c "
76+
uv run --directory "${CLAUDE_PLUGIN_ROOT}" python3 -c "
7777
import subprocess
7878
import sys
7979

commands/metrics.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ Parse the following options:
7474

7575
**Execute the metrics collection**:
7676
```bash
77-
uv run python3 -c "
77+
uv run --directory "${CLAUDE_PLUGIN_ROOT}" python3 -c "
7878
from git_notes_memory.observability.metrics import get_metrics
7979
from git_notes_memory.observability.exporters.prometheus import export_prometheus_text
8080
import sys

commands/recall.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ If query is empty:
9595
Use Bash to invoke the Python library:
9696

9797
```bash
98-
uv run python3 -c "
98+
uv run --directory "${CLAUDE_PLUGIN_ROOT}" python3 -c "
9999
from git_notes_memory import get_recall_service
100100
from git_notes_memory.config import Domain
101101

commands/review.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ Determine the action:
8282
First check if subconsciousness is enabled:
8383

8484
```bash
85-
uv run python3 -c "
85+
uv run --directory "${CLAUDE_PLUGIN_ROOT}" python3 -c "
8686
from git_notes_memory.subconsciousness import is_subconsciousness_enabled
8787
8888
if not is_subconsciousness_enabled():
@@ -110,7 +110,7 @@ If not enabled, show the message and stop.
110110
**For --list or no args (list pending captures)**:
111111

112112
```bash
113-
uv run python3 -c "
113+
uv run --directory "${CLAUDE_PLUGIN_ROOT}" python3 -c "
114114
from git_notes_memory.subconsciousness.implicit_capture_service import get_implicit_capture_service
115115
116116
service = get_implicit_capture_service()
@@ -172,7 +172,7 @@ After showing the list, ask the user what they want to do using AskUserQuestion.
172172
CAPTURE_ID="$1" # Extract from arguments
173173
# Pass via environment variable to prevent shell injection
174174
export MEMORY_CAPTURE_ID="$CAPTURE_ID"
175-
uv run python3 -c "
175+
uv run --directory "${CLAUDE_PLUGIN_ROOT}" python3 -c "
176176
import os
177177
import sys
178178
from git_notes_memory.subconsciousness.implicit_capture_service import get_implicit_capture_service
@@ -230,7 +230,7 @@ else:
230230
CAPTURE_ID="$1"
231231
# Pass via environment variable to prevent shell injection
232232
export MEMORY_CAPTURE_ID="$CAPTURE_ID"
233-
uv run python3 -c "
233+
uv run --directory "${CLAUDE_PLUGIN_ROOT}" python3 -c "
234234
import os
235235
import sys
236236
from git_notes_memory.subconsciousness.implicit_capture_service import get_implicit_capture_service
@@ -268,7 +268,7 @@ else:
268268
**For --approve-all**:
269269

270270
```bash
271-
uv run python3 -c "
271+
uv run --directory "${CLAUDE_PLUGIN_ROOT}" python3 -c "
272272
from git_notes_memory.subconsciousness.implicit_capture_service import get_implicit_capture_service
273273
from git_notes_memory import get_capture_service
274274
@@ -313,7 +313,7 @@ print(f'Approved: {approved} | Failed: {failed}')
313313
**For --cleanup**:
314314

315315
```bash
316-
uv run python3 -c "
316+
uv run --directory "${CLAUDE_PLUGIN_ROOT}" python3 -c "
317317
from git_notes_memory.subconsciousness.implicit_capture_service import get_implicit_capture_service
318318
319319
service = get_implicit_capture_service()

commands/scan-secrets.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ Parse the following flags:
8484
```bash
8585
NAMESPACE="${NAMESPACE:-}" # Set from parsed arguments or empty
8686

87-
uv run python3 -c "
87+
uv run --directory "${CLAUDE_PLUGIN_ROOT}" python3 -c "
8888
import sys
8989
from git_notes_memory import get_recall_service
9090
from git_notes_memory.security import get_secrets_filtering_service
@@ -159,7 +159,7 @@ print(f'<!-- FINDINGS_COUNT={len(findings)} -->')
159159
NAMESPACE="${NAMESPACE:-}"
160160
DRY_RUN="${DRY_RUN:-false}" # Set from --dry-run flag
161161

162-
uv run python3 -c "
162+
uv run --directory "${CLAUDE_PLUGIN_ROOT}" python3 -c "
163163
import sys
164164
from git_notes_memory import get_recall_service, get_capture_service
165165
from git_notes_memory.security import get_secrets_filtering_service, get_audit_logger

commands/search.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ Use Bash to invoke the Python library:
9494

9595
**Semantic Search** (default - vector similarity):
9696
```bash
97-
uv run python3 -c "
97+
uv run --directory "${CLAUDE_PLUGIN_ROOT}" python3 -c "
9898
from git_notes_memory import get_recall_service
9999
from git_notes_memory.config import Domain
100100
@@ -134,7 +134,7 @@ else:
134134

135135
**Text Search** (keyword/FTS matching):
136136
```bash
137-
uv run python3 -c "
137+
uv run --directory "${CLAUDE_PLUGIN_ROOT}" python3 -c "
138138
from git_notes_memory import get_recall_service
139139
from git_notes_memory.config import Domain
140140

commands/secrets-allowlist.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ Parse the subcommand and flags:
8888
**Show all allowlisted entries**:
8989

9090
```bash
91-
uv run python3 -c "
91+
uv run --directory "${CLAUDE_PLUGIN_ROOT}" python3 -c "
9292
from git_notes_memory.security import get_allowlist_manager
9393
9494
manager = get_allowlist_manager()
@@ -124,7 +124,7 @@ HASH="${HASH}" # From --hash argument
124124
NAMESPACE="${NAMESPACE:-}" # From --namespace argument or empty
125125
REASON="${REASON}" # From --reason argument
126126

127-
uv run python3 -c "
127+
uv run --directory "${CLAUDE_PLUGIN_ROOT}" python3 -c "
128128
import sys
129129
from git_notes_memory.security import get_allowlist_manager, get_audit_logger
130130
@@ -183,7 +183,7 @@ except Exception as e:
183183
```bash
184184
HASH="${HASH}" # From --hash argument
185185

186-
uv run python3 -c "
186+
uv run --directory "${CLAUDE_PLUGIN_ROOT}" python3 -c "
187187
import sys
188188
from git_notes_memory.security import get_allowlist_manager, get_audit_logger
189189

commands/status.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ Check if `--verbose` flag is present.
6464

6565
**Basic Status**:
6666
```bash
67-
uv run python3 -c "
67+
uv run --directory "${CLAUDE_PLUGIN_ROOT}" python3 -c "
6868
from git_notes_memory import get_sync_service
6969
from git_notes_memory.index import IndexService
7070
from git_notes_memory.config import (
@@ -148,7 +148,7 @@ print(f'| Data Directory | {get_data_path()} |')
148148

149149
**Verbose Status**:
150150
```bash
151-
uv run python3 -c "
151+
uv run --directory "${CLAUDE_PLUGIN_ROOT}" python3 -c "
152152
import subprocess
153153
from git_notes_memory import get_sync_service
154154
from git_notes_memory.index import IndexService

0 commit comments

Comments
 (0)