agentsbestfriend 0.1.0 → 0.1.2
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 +161 -0
- package/dist/index.js +34819 -21291
- package/dist/index.js.map +1 -1
- package/package.json +34 -10
package/README.md
ADDED
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
# agentsbestfriend
|
|
2
|
+
|
|
3
|
+
Give your AI coding agents superpowers — a local [MCP](https://modelcontextprotocol.io/) server for fast, token-efficient code navigation, search & analysis.
|
|
4
|
+
|
|
5
|
+
Works with **VS Code Copilot**, **Cursor**, **Claude Code/Desktop**, **Codex**, **Cline**, **Zed**, and any other MCP-compatible agent.
|
|
6
|
+
|
|
7
|
+
## What it does
|
|
8
|
+
|
|
9
|
+
AI agents waste tokens re-reading files and searching blindly. ABF gives them purpose-built tools that return exactly what they need:
|
|
10
|
+
|
|
11
|
+
| Tool | Purpose |
|
|
12
|
+
|---|---|
|
|
13
|
+
| `abf_search` | Code search — exact (ripgrep), keyword-ranked, or semantic |
|
|
14
|
+
| `abf_symbols` | Functions, classes, exports in a file (AST-based) |
|
|
15
|
+
| `abf_chunk` | Smart file chunk by symbol name or line range |
|
|
16
|
+
| `abf_project_overview` | Tech stack, structure, dependencies at a glance |
|
|
17
|
+
| `abf_dependencies` | Import graph — who imports what |
|
|
18
|
+
| `abf_impact` | Find all usages of a symbol across the project |
|
|
19
|
+
| `abf_git` | Commits, blame, diff (recent/staged/unstaged) |
|
|
20
|
+
| `abf_file_summary` | Search LLM-generated file summaries |
|
|
21
|
+
| `abf_conventions` | Detected naming & style conventions |
|
|
22
|
+
| `abf_index` | Index status & rebuild |
|
|
23
|
+
| `abf_ping` | Health check |
|
|
24
|
+
|
|
25
|
+
## Install
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
npm install -g agentsbestfriend
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
### Prerequisites
|
|
32
|
+
|
|
33
|
+
- **Node.js** ≥ 20
|
|
34
|
+
- **ripgrep** — `brew install ripgrep` / `apt install ripgrep`
|
|
35
|
+
- **git**
|
|
36
|
+
- **Ollama** (optional, for summaries & semantic search) — [ollama.com](https://ollama.com)
|
|
37
|
+
|
|
38
|
+
## Quick Start
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
# Initialize a project (indexes files, optionally installs MCP for your agents)
|
|
42
|
+
abf init
|
|
43
|
+
|
|
44
|
+
# Or initialize a specific path
|
|
45
|
+
abf init /path/to/project
|
|
46
|
+
|
|
47
|
+
# Check everything is working
|
|
48
|
+
abf doctor
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
During `abf init`, you'll be asked whether to install ABF as an MCP server for your coding agents. Pick the agents you use (Cursor, VS Code, Claude Code, etc.) and ABF handles the rest via [add-mcp](https://github.com/neondatabase/add-mcp).
|
|
52
|
+
|
|
53
|
+
### Manual Agent Setup
|
|
54
|
+
|
|
55
|
+
If you prefer to configure manually, add ABF as a stdio MCP server:
|
|
56
|
+
|
|
57
|
+
**VS Code / GitHub Copilot** (`.vscode/mcp.json`):
|
|
58
|
+
```json
|
|
59
|
+
{
|
|
60
|
+
"servers": {
|
|
61
|
+
"abf": {
|
|
62
|
+
"command": "abf",
|
|
63
|
+
"args": ["start"]
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
**Cursor** (`.cursor/mcp.json`):
|
|
70
|
+
```json
|
|
71
|
+
{
|
|
72
|
+
"mcpServers": {
|
|
73
|
+
"abf": {
|
|
74
|
+
"command": "abf",
|
|
75
|
+
"args": ["start"]
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
**Claude Desktop** (`claude_desktop_config.json`):
|
|
82
|
+
```json
|
|
83
|
+
{
|
|
84
|
+
"mcpServers": {
|
|
85
|
+
"abf": {
|
|
86
|
+
"command": "abf",
|
|
87
|
+
"args": ["start"]
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
## CLI Commands
|
|
94
|
+
|
|
95
|
+
```
|
|
96
|
+
abf start Start MCP server in stdio mode (used by agents)
|
|
97
|
+
abf init [path] Initialize index & optionally install MCP for agents
|
|
98
|
+
abf index [path] Re-index a project
|
|
99
|
+
abf status [path] Show index status
|
|
100
|
+
abf config Interactive configuration editor
|
|
101
|
+
abf doctor System health checks (Node, ripgrep, git, Ollama)
|
|
102
|
+
abf portal Interactive terminal dashboard
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
## How It Works
|
|
106
|
+
|
|
107
|
+
ABF maintains a lightweight SQLite index (`.abf/index.db`) per project containing:
|
|
108
|
+
|
|
109
|
+
- **File metadata** — paths, hashes, languages, line counts
|
|
110
|
+
- **Symbols** — functions, classes, interfaces, types extracted via AST (ts-morph for TS/JS, regex for Python & others)
|
|
111
|
+
- **Imports** — dependency edges between files
|
|
112
|
+
- **Summaries** — LLM-generated file descriptions (optional, via Ollama)
|
|
113
|
+
- **Embeddings** — vectors for semantic search (optional, via Ollama)
|
|
114
|
+
|
|
115
|
+
The index updates incrementally — only changed files are re-processed.
|
|
116
|
+
|
|
117
|
+
## Optional: LLM Enrichment
|
|
118
|
+
|
|
119
|
+
With [Ollama](https://ollama.com) running locally, ABF can generate file summaries and embeddings for semantic search:
|
|
120
|
+
|
|
121
|
+
```bash
|
|
122
|
+
ollama pull qwen2.5-coder:1.5b # summaries
|
|
123
|
+
ollama pull nomic-embed-text # embeddings
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
Without Ollama, all tools work normally — semantic search falls back to keyword mode.
|
|
127
|
+
|
|
128
|
+
## Configuration
|
|
129
|
+
|
|
130
|
+
Global config at `~/.abf/config.json`. Edit with `abf config` or `abf portal`.
|
|
131
|
+
|
|
132
|
+
```json
|
|
133
|
+
{
|
|
134
|
+
"llm": {
|
|
135
|
+
"provider": "ollama",
|
|
136
|
+
"ollama": {
|
|
137
|
+
"baseUrl": "http://localhost:11434",
|
|
138
|
+
"summaryModel": "qwen2.5-coder:1.5b",
|
|
139
|
+
"embeddingModel": "nomic-embed-text"
|
|
140
|
+
}
|
|
141
|
+
},
|
|
142
|
+
"indexing": {
|
|
143
|
+
"autoWatch": true,
|
|
144
|
+
"respectGitignore": true,
|
|
145
|
+
"maxFileSizeKb": 512
|
|
146
|
+
},
|
|
147
|
+
"search": {
|
|
148
|
+
"defaultMaxResults": 20
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
## Links
|
|
154
|
+
|
|
155
|
+
- **GitHub**: [github.com/TheRealFloatDev/AgentsBestFriend](https://github.com/TheRealFloatDev/AgentsBestFriend)
|
|
156
|
+
- **Issues**: [github.com/TheRealFloatDev/AgentsBestFriend/issues](https://github.com/TheRealFloatDev/AgentsBestFriend/issues)
|
|
157
|
+
- **MCP Spec**: [modelcontextprotocol.io](https://modelcontextprotocol.io)
|
|
158
|
+
|
|
159
|
+
## License
|
|
160
|
+
|
|
161
|
+
MIT
|