own-rag-cli 0.0.5-snapshot → 0.0.6-snapshot
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/bin/rag-remove.sh +24 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
Local RAG for codebases with ChromaDB + MCP, focused on practical setup and lower LLM token waste.
|
|
6
6
|
|
|
7
|
-
Language: English (default) | Portuguese: `README.pt-br.md`
|
|
7
|
+
Language: English (default) | Portuguese: `README.pt-br.md` - https://github.com/JocsaPB/own-rag/blob/main/README.pt-br.md
|
|
8
8
|
|
|
9
9
|
## Why use own-rag
|
|
10
10
|
|
package/bin/rag-remove.sh
CHANGED
|
@@ -131,12 +131,14 @@ done
|
|
|
131
131
|
|
|
132
132
|
python3 - <<'PY'
|
|
133
133
|
import json
|
|
134
|
+
import re
|
|
134
135
|
from pathlib import Path
|
|
135
136
|
|
|
136
137
|
home = Path.home()
|
|
137
138
|
config_paths = [
|
|
138
139
|
home / ".claude.json",
|
|
139
140
|
home / ".cursor" / "mcp.json",
|
|
141
|
+
home / ".config" / "Cursor" / "User" / "mcp.json",
|
|
140
142
|
home / "Library" / "Application Support" / "Cursor" / "User" / "mcp.json",
|
|
141
143
|
]
|
|
142
144
|
for path in config_paths:
|
|
@@ -155,6 +157,28 @@ for path in config_paths:
|
|
|
155
157
|
except Exception as exc:
|
|
156
158
|
print(f"[!] Não foi possível atualizar {path}: {exc}")
|
|
157
159
|
|
|
160
|
+
codex_toml = home / ".codex" / "config.toml"
|
|
161
|
+
if codex_toml.exists():
|
|
162
|
+
try:
|
|
163
|
+
text = codex_toml.read_text(encoding="utf-8")
|
|
164
|
+
except Exception:
|
|
165
|
+
text = ""
|
|
166
|
+
|
|
167
|
+
if text:
|
|
168
|
+
# Remove bloco [mcp_servers.rag-codebase] até o próximo cabeçalho TOML.
|
|
169
|
+
pattern = re.compile(
|
|
170
|
+
r"(?ms)^\[mcp_servers\.rag-codebase\]\n.*?(?=^\[mcp_servers\.|^\[[^\]]+\]|$)"
|
|
171
|
+
)
|
|
172
|
+
new_text = pattern.sub("", text)
|
|
173
|
+
# Compacta excesso de linhas em branco para manter o arquivo limpo.
|
|
174
|
+
new_text = re.sub(r"\n{3,}", "\n\n", new_text).rstrip() + "\n"
|
|
175
|
+
if new_text != text:
|
|
176
|
+
try:
|
|
177
|
+
codex_toml.write_text(new_text, encoding="utf-8")
|
|
178
|
+
print(f"[+] MCP removido de: {codex_toml}")
|
|
179
|
+
except Exception as exc:
|
|
180
|
+
print(f"[!] Não foi possível atualizar {codex_toml}: {exc}")
|
|
181
|
+
|
|
158
182
|
rc_files = [
|
|
159
183
|
home / ".bashrc",
|
|
160
184
|
home / ".profile",
|