You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-**Token Optimization (TOON)**: Capable of generating "Semantic Skeletons" (class definitions, function signatures, docstrings) instead of full code to save up to 90% of tokens.
12
+
-**Hybrid Focus Mode**: Combine lightweight context for the whole project with full content only for specific files or folders.
11
13
-**Configurable**: Customize ignored directories and included extensions via a `.deepbase.toml` file.
12
-
-**Extension Selection**: Includes only files with relevant code or configuration extensions.
13
14
-**Unified Output**: Combines everything into a single file, easy to copy and paste.
14
15
-**PyPI Ready**: Easy to install via `pip`.
15
16
@@ -19,111 +20,106 @@ You can install DeepBase directly from PyPI:
19
20
20
21
```sh
21
22
pip install deepbase
22
-
23
23
```
24
24
25
25
## How to Use
26
26
27
-
Once installed, you will have the `deepbase` command available in your terminal.
27
+
Once installed, use the `deepbase` command followed by the target (directory or file).
28
28
29
-
**Basic Usage:**
29
+
### 1. Basic Project Analysis
30
30
31
-
Navigate to your project folder (or a parent folder) and run:
31
+
**Structure Only (Default)**
32
+
Quickly generate a tree view of your project folders and files. No code content is included.
32
33
33
34
```sh
34
35
deepbase .
35
36
```
36
-
*The dot `.` indicates the current directory.*
37
37
38
-
This command will create a file called `llm_context.md` in the current directory.
38
+
**Include All Content**
39
+
To generate the full context including the code of all significant files, use the `--all` (or `-a`) flag.
40
+
*Warning: use this only for small projects.*
41
+
42
+
```sh
43
+
deepbase . --all
44
+
```
45
+
46
+
### 2. Smart Token Optimization (TOON)
39
47
40
-
**Specify Directory and Output File:**
48
+
For large projects, sending all code to an LLM is expensive and inefficient. **TOON (Token Oriented Object Notation)** extracts only the semantic "skeleton" of your code (classes, signatures, docstrings), ignoring implementations.
*Result: LLMs understand your architecture using minimal tokens.*
45
56
46
-
### Advanced Configuration
57
+
### 3. Hybrid Mode (Focus)
47
58
48
-
You can customize DeepBase's behavior by creating a `.deepbase.toml` file in the root of the project you are analyzing.
59
+
This is the power user feature. You can provide the TOON skeleton for the entire project (background context) while focusing on specific files (full content).
49
60
50
-
**Example `.deepbase.toml`:**
51
-
```toml
52
-
# Add more directories to ignore.
53
-
# These will be added to the default ones.
54
-
ignore_dirs = [
55
-
"my_assets_folder",
56
-
"experimental"
57
-
]
58
-
59
-
# Add more extensions or filenames to include.
60
-
significant_extensions = [
61
-
".cfg",
62
-
"Makefile"
63
-
]
61
+
**Focus via CLI:**
62
+
Use `-f` or `--focus` with glob patterns (e.g., `*auth*`, `src/utils/*`).
Instead of typing patterns every time, create a text file (e.g., `context_task.txt`) with the list of files/folders you are working on.
70
+
71
+
*content of `context_task.txt`:*
72
+
```text
73
+
server/routes/auth.js
74
+
server/models/User.js
75
+
client/src/components/LoginForm.jsx
64
76
```
65
77
66
-
### Single File Analysis (New!)
78
+
Run deepbase loading the file:
79
+
```sh
80
+
deepbase . --toon --focus-file context_task.txt
81
+
```
82
+
83
+
### 4. Single File Analysis
67
84
68
85
DeepBase supports analyzing a single specific file.
69
86
70
-
**1. Structure Only (Default)**
71
-
By default, providing a single file will extract only its outline/structure (headers). This is useful for quickly understanding the organization of a large document without reading everything.
87
+
**Structure Only (Default)**
88
+
Extracts only the outline/headers. Useful for large documentation files.
72
89
73
90
```sh
74
91
deepbase README.md
75
-
# Generates "llm_context.md" containing only the headers tree.
76
92
```
77
93
78
-
**2. Structure + Content**
79
-
If you want both the structure outline AND the full file content appended at the end, use the `--all` (or `-a`) flag.
94
+
**Structure + Content**
95
+
Appends the full content after the structure.
80
96
81
97
```sh
82
98
deepbase README.md --all
83
-
# Generates "llm_context.md" containing the outline followed by the full text.
84
99
```
85
100
86
-
*Currently optimized for Markdown files.*
101
+
### Configuration (.deepbase.toml)
87
102
103
+
You can customize behavior by creating a `.deepbase.toml` file in your project root:
0 commit comments