breadcrumb-cli 0.1.0__py3-none-any.whl

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.
@@ -0,0 +1,342 @@
1
+ Metadata-Version: 2.4
2
+ Name: breadcrumb-cli
3
+ Version: 0.1.0
4
+ Summary: Chat with your codebase. Understand everything.
5
+ Project-URL: Homepage, https://github.com/yourusername/breadcrumb
6
+ Project-URL: Repository, https://github.com/yourusername/breadcrumb
7
+ Project-URL: Changelog, https://github.com/yourusername/breadcrumb/blob/main/CHANGELOG.md
8
+ License: MIT
9
+ License-File: LICENSE
10
+ Keywords: ai,cli,codebase,developer-tools,llm
11
+ Classifier: Development Status :: 4 - Beta
12
+ Classifier: Environment :: Console
13
+ Classifier: Intended Audience :: Developers
14
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
15
+ Requires-Python: >=3.11
16
+ Requires-Dist: anthropic>=0.28
17
+ Requires-Dist: click>=8.1
18
+ Requires-Dist: gitpython>=3.1
19
+ Requires-Dist: google-generativeai>=0.7
20
+ Requires-Dist: ollama>=0.2
21
+ Requires-Dist: openai>=1.30
22
+ Requires-Dist: pathspec>=0.12
23
+ Requires-Dist: pydantic>=2.7
24
+ Requires-Dist: rich>=13.7
25
+ Description-Content-Type: text/markdown
26
+
27
+ # 🍞 Bread Crumb
28
+
29
+ **Chat with your codebase from the terminal.**
30
+
31
+ Bread Crumb lets you ask questions about any code repository, get security audits, review diffs, and understand your codebase in seconds. Supports Anthropic, OpenAI, Gemini, and Ollama — bring your own API key.
32
+
33
+ [Demo Recording](https://asciinema.org/a/XXXXX) • [Features](#features) • [Installation](#installation) • [Documentation](#docs) • [Contributing](CONTRIBUTING.md)
34
+
35
+ ---
36
+
37
+ ## ⚡ Quick Start
38
+
39
+ ```bash
40
+ # 1. Install
41
+ pip install breadcrumb-cli
42
+
43
+ # 2. Set your AI provider
44
+ breadcrumb config set-key --provider anthropic
45
+ breadcrumb config set-key --key anthropic_key --value "sk-ant-..."
46
+
47
+ # 3. Ask questions
48
+ breadcrumb ask "What does the auth module do?"
49
+ breadcrumb ask "Are there any security issues?" --format markdown
50
+
51
+ # 4. Start interactive chat
52
+ breadcrumb chat .
53
+
54
+ # 5. Get a security audit
55
+ breadcrumb audit .
56
+
57
+ # 6. Review a PR
58
+ breadcrumb diff HEAD~1
59
+ ```
60
+
61
+ ---
62
+
63
+ ## 🎯 Features
64
+
65
+ ### 🔴 Critical Features
66
+
67
+ - **Multi-provider AI support** — Anthropic, OpenAI, Gemini, Ollama
68
+ - **One-shot mode** (`breadcrumb ask`) — Perfect for CI/CD pipelines
69
+ - **Pipe mode** — Use in shell scripts and tools: `echo "question" | breadcrumb ask --pipe`
70
+ - **.breadcrumbignore support** — Skip generated files, vendor directories, etc.
71
+ - **Token usage tracking** — See exactly what you're spending
72
+ - **Session management** — Named conversations per repository
73
+
74
+ ### 🟠 High-Value Features
75
+
76
+ - **`breadcrumb diff`** — AI-powered code review of PRs and commits
77
+ - **`breadcrumb audit`** — Security and architecture audits
78
+ - **`breadcrumb init`** — Generate `.breadcrumb.yaml` for repo-level config
79
+ - **Smart context compression** — Large files get AI summaries instead of truncation
80
+ - **`breadcrumb commit`** — Auto-generate conventional commit messages
81
+ - **Multi-session chat** — Multiple independent conversations per repo
82
+
83
+ ### 🟡 Viral Features
84
+
85
+ - **`breadcrumb explain-error`** — Pipe any error and get a fix: `npm run build 2>&1 | breadcrumb explain-error`
86
+ - **`breadcrumb share`** — Export chat as beautiful shareable HTML
87
+ - **`breadcrumb digest`** — Daily summary of git commits
88
+
89
+ ---
90
+
91
+ ## 📦 Installation
92
+
93
+ ### Option A: pip (Recommended for developers)
94
+ ```bash
95
+ pip install breadcrumb-cli
96
+ breadcrumb ask "How does this work?"
97
+ ```
98
+
99
+ ### Option B: pipx (Isolated, recommended for CLI tools)
100
+ ```bash
101
+ pipx install breadcrumb-cli
102
+ breadcrumb ask "How does this work?"
103
+ ```
104
+
105
+ ### Option C: Download Binary (No Python needed)
106
+ Download the standalone executable from [GitHub Releases](https://github.com/yourusername/breadcrumb/releases):
107
+ - `breadcrumb-linux` for Linux
108
+ - `breadcrumb-macos` for macOS
109
+ - `breadcrumb-windows.exe` for Windows
110
+
111
+ Then run:
112
+ ```bash
113
+ ./breadcrumb ask "How does this work?"
114
+ ```
115
+
116
+ ### TestPyPI Publishing
117
+
118
+ Use TestPyPI when you want to validate packaging before a real release.
119
+
120
+ 1. Create a `TEST_PYPI_API_TOKEN` on [TestPyPI](https://test.pypi.org).
121
+ 2. Add it to GitHub as a repository secret named `TEST_PYPI_API_TOKEN`.
122
+ 3. Run the **Publish to TestPyPI** workflow from the Actions tab, or push a tag like `testpypi-v0.1.0`.
123
+
124
+ This publishes to `https://test.pypi.org/legacy/` and does not create a GitHub Release.
125
+
126
+ ### Option D: Docker
127
+ ```bash
128
+ docker run --rm \
129
+ -v $(pwd):/repo \
130
+ -e ANTHROPIC_API_KEY=$ANTHROPIC_API_KEY \
131
+ breadcrumb/breadcrumb audit
132
+ ```
133
+
134
+ ---
135
+
136
+ ## 🔑 Configuration
137
+
138
+ ### Set Your API Key
139
+
140
+ ```bash
141
+ # Anthropic (Claude)
142
+ breadcrumb config set-key --provider anthropic
143
+ breadcrumb config set-key --key anthropic_key --value "sk-ant-..."
144
+
145
+ # OpenAI
146
+ breadcrumb config set-key --provider openai
147
+ breadcrumb config set-key --key openai_key --value "sk-..."
148
+
149
+ # Google Gemini
150
+ breadcrumb config set-key --provider gemini
151
+ breadcrumb config set-key --key gemini_key --value "..."
152
+
153
+ # Ollama (local)
154
+ breadcrumb config set-key --provider ollama
155
+ breadcrumb config set-key --key ollama_url --value "http://localhost:11434"
156
+ ```
157
+
158
+ ### Repository Config
159
+
160
+ Create `.breadcrumb.yaml` in your repo:
161
+
162
+ ```yaml
163
+ # AI Provider to use for this repo
164
+ provider: anthropic
165
+ model: claude-3-5-sonnet-20241022
166
+
167
+ # Files to ignore (like .gitignore)
168
+ ignore_patterns:
169
+ - "*.min.js"
170
+ - "node_modules/"
171
+ - "vendor/"
172
+
173
+ # Custom system prompt for this project
174
+ system_prompt: |
175
+ This is a fintech application. Always flag PCI-DSS compliance issues.
176
+ The main database is PostgreSQL. Never suggest breaking changes.
177
+
178
+ temperature: 0.7
179
+ max_tokens: 4096
180
+ ```
181
+
182
+ Then generate this file automatically:
183
+ ```bash
184
+ breadcrumb init
185
+ ```
186
+
187
+ ---
188
+
189
+ ## 📖 Commands
190
+
191
+ ### Interactive Chat
192
+ ```bash
193
+ breadcrumb chat . # Start interactive session
194
+ breadcrumb chat . --session "security-review" # Named session
195
+ ```
196
+
197
+ ### One-Shot Queries
198
+ ```bash
199
+ breadcrumb ask "What does auth.ts do?"
200
+ breadcrumb ask "Security issues?" --format markdown
201
+ ```
202
+
203
+ ### Code Review
204
+ ```bash
205
+ breadcrumb diff HEAD~1 # Review last commit
206
+ breadcrumb diff main..feature/new-auth # Review PR branch
207
+ ```
208
+
209
+ ### Security & Architecture Audit
210
+ ```bash
211
+ breadcrumb audit . # Full audit
212
+ breadcrumb audit . --model gpt-4o # Use different model
213
+ ```
214
+
215
+ ### Generate Commit Messages
216
+ ```bash
217
+ git add .
218
+ breadcrumb commit # Suggests: "feat(auth): add JWT refresh"
219
+
220
+ # Or use in scripts:
221
+ git commit -m "$(breadcrumb commit --silent)"
222
+ ```
223
+
224
+ ### Explain Errors
225
+ ```bash
226
+ npm run build 2>&1 | breadcrumb explain-error
227
+ python script.py 2>&1 | breadcrumb explain-error
228
+ cat error.log | breadcrumb explain-error
229
+ ```
230
+
231
+ ### Daily Digest
232
+ ```bash
233
+ breadcrumb digest # Summary of today's commits
234
+ breadcrumb digest --hours 48 # Last 48 hours
235
+ ```
236
+
237
+ ### Export & Share
238
+ ```bash
239
+ breadcrumb share session.json # Export as HTML
240
+ ```
241
+
242
+ ---
243
+
244
+ ## 🚀 Use Cases
245
+
246
+ ### For Teams
247
+ ```bash
248
+ # Security review before merge
249
+ breadcrumb diff feature-branch --format json > audit.json
250
+
251
+ # Onboarding: new dev understands the codebase
252
+ breadcrumb ask "Give me a 5-minute overview of this project"
253
+
254
+ # Daily standup digest
255
+ breadcrumb digest | pbcopy # Copy to Slack
256
+ ```
257
+
258
+ ### In CI/CD Pipelines
259
+ ```bash
260
+ # .github/workflows/security.yml
261
+ - name: Bread Crumb Audit
262
+ run: |
263
+ breadcrumb audit . --format json > audit-report.json
264
+ if grep -q "critical" audit-report.json; then exit 1; fi
265
+
266
+ # Pre-commit hook
267
+ breadcrumb commit --silent # Auto-generate commit message
268
+ ```
269
+
270
+ ### Local Development
271
+ ```bash
272
+ # Ask questions while coding
273
+ breadcrumb ask "How do I add error handling to this module?"
274
+
275
+ # Quick error debugging
276
+ npm run test 2>&1 | breadcrumb explain-error
277
+
278
+ # Understand what you changed
279
+ breadcrumb diff
280
+ ```
281
+
282
+ ---
283
+
284
+ ## 🏗️ Architecture
285
+
286
+ ```
287
+ breadcrumb/
288
+ ├── cli.py # Click entry point
289
+ ├── config.py # Configuration management
290
+ ├── ingest.py # File walking & .breadcrumbignore
291
+ ├── history.py # Session management
292
+ ├── ai/
293
+ │ ├── router.py # Provider routing (Anthropic/OpenAI/Gemini/Ollama)
294
+ │ └── prompts.py # System prompts
295
+ ├── commands/
296
+ │ ├── chat.py # Interactive TUI
297
+ │ ├── ask.py # One-shot queries
298
+ │ ├── audit.py # Security audit
299
+ │ ├── diff.py # Diff review
300
+ │ ├── commit.py # Commit generation
301
+ │ ├── explain_error.py
302
+ │ ├── digest.py # Commit digest
303
+ │ ├── init.py # Config initialization
304
+ │ └── share.py # HTML export
305
+ ```
306
+
307
+ ---
308
+
309
+ ## 🤝 Contributing
310
+
311
+ We welcome contributions! Please see [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.
312
+
313
+ ### Development Setup
314
+ ```bash
315
+ git clone https://github.com/yourusername/breadcrumb
316
+ cd breadcrumb
317
+ pip install -e .
318
+
319
+ # Run tests
320
+ pytest tests/
321
+
322
+ # Run linting
323
+ ruff check .
324
+ ```
325
+
326
+ ---
327
+
328
+ ## 📝 License
329
+
330
+ MIT License — see [LICENSE](LICENSE) for details.
331
+
332
+ ---
333
+
334
+ ## 🌟 Show Your Support
335
+
336
+ If Bread Crumb helps you, please give it a star on GitHub! It helps us reach more developers.
337
+
338
+ Questions? Issues? [Create an issue](https://github.com/yourusername/breadcrumb/issues) or start a [discussion](https://github.com/yourusername/breadcrumb/discussions).
339
+
340
+ ---
341
+
342
+ **Made with 🍞 by developers who love their codebases**
@@ -0,0 +1,23 @@
1
+ breadcrumb/__init__.py,sha256=UI0sLdMavIdlY9vrjEtk03HMQbZAMSl1ZjHqzaJwbKI,136
2
+ breadcrumb/cli.py,sha256=npov60XTzIyd48UM3wQtv_gIph5C5ibUJSUSfYzWddQ,4285
3
+ breadcrumb/config.py,sha256=YnK1SV6xE4QqPP6V6cwa9g54KFUePqphl0qCxY8DaiE,2719
4
+ breadcrumb/history.py,sha256=KsIQ09b7IAEKcbFneoCSCzYwK7HRhKMJ9bl7D6jnryk,3717
5
+ breadcrumb/ingest.py,sha256=i54Cs5p0QyUyZHGQshPIP1bSV42CtmHkmKa1nU62zlM,4326
6
+ breadcrumb/ai/__init__.py,sha256=JRodfLUx39p-YMxjCzHUN9NujP0qu0kFQOEu-qVmcIU,33
7
+ breadcrumb/ai/prompts.py,sha256=JPrY_KR4pFaL6NOQkmBI0Y8SRi2sVbsbRx9ifEeQvBs,2105
8
+ breadcrumb/ai/router.py,sha256=nLu17fCJ7DZF2hNeElBaFDZcXnbLu8oxvc_7KYkvqwU,8269
9
+ breadcrumb/commands/__init__.py,sha256=SZm8l7LPsmbWw7NISn910pm05iNimY1IjlrzrWhFj58,39
10
+ breadcrumb/commands/ask.py,sha256=GkBC5YuNcix8NZwbBOMmwB9M4zJNFb8sUsGZpQeNHMk,2509
11
+ breadcrumb/commands/audit.py,sha256=73ndAzmUmSuBASo1D8x09AtEsHmQE1P8HzxJpUQEamY,2070
12
+ breadcrumb/commands/chat.py,sha256=AgeUTGBgOONfAQH6Mq6lNKFOQxs9wJ_JFS4wwNzarlA,3689
13
+ breadcrumb/commands/commit.py,sha256=AGVf16soZTdR3xeYPKZMrwGPjxJSaYPkkIdTPACSnUs,2241
14
+ breadcrumb/commands/diff.py,sha256=KcA3dEYUu2Yf8w9B6JCIODF9s3KPcX2B4ZIig39VGWw,2244
15
+ breadcrumb/commands/digest.py,sha256=rTSEoMeFZAHImaJqPSJod_--DfsGMfokxwxSuw3dF8w,2069
16
+ breadcrumb/commands/explain_error.py,sha256=Qvn9nYHPsxzohAOayFLimBuYfCXs9eiCvdVkrrqGxc4,1449
17
+ breadcrumb/commands/init.py,sha256=VcXr0Cyp6l7ndFxzLQfsGoNUneHL_ePnl46NGsWP7oU,1655
18
+ breadcrumb/commands/share.py,sha256=8X48xjVuJtdGkeOHrfCmtLPtA_OMm0O3vzfugksc-LM,5326
19
+ breadcrumb_cli-0.1.0.dist-info/METADATA,sha256=L1Ap7JcXz2KOAQw4D5aZt8n83uSQ-KxFqYjDeZryADA,9084
20
+ breadcrumb_cli-0.1.0.dist-info/WHEEL,sha256=QccIxa26bgl1E6uMy58deGWi-0aeIkkangHcxk2kWfw,87
21
+ breadcrumb_cli-0.1.0.dist-info/entry_points.txt,sha256=Jd4w4jxX0rx6xEJ5NpHbrNFtx3xsWEHeRYL0wb5zzz8,51
22
+ breadcrumb_cli-0.1.0.dist-info/licenses/LICENSE,sha256=-AK-cTA2DYHGRwxJhKPPFKCxY7XrNe_NmJRY1vk1rXI,1099
23
+ breadcrumb_cli-0.1.0.dist-info/RECORD,,
@@ -0,0 +1,4 @@
1
+ Wheel-Version: 1.0
2
+ Generator: hatchling 1.29.0
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ breadcrumb = breadcrumb.cli:main
@@ -0,0 +1,23 @@
1
+ """
2
+ LICENSE - MIT License
3
+
4
+ Copyright (c) 2024 Bread Crumb Contributors
5
+
6
+ Permission is hereby granted, free of charge, to any person obtaining a copy
7
+ of this software and associated documentation files (the "Software"), to deal
8
+ in the Software without restriction, including without limitation the rights
9
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ copies of the Software, and to permit persons to whom the Software is
11
+ furnished to do so, subject to the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be included in all
14
+ copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
+ SOFTWARE.
23
+ """