codebase-brief 0.1.0__tar.gz → 0.1.2__tar.gz

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,29 @@
1
+ # Changelog
2
+
3
+ ## 0.1.2
4
+
5
+ - Add `brief --demo`, which generates a real example brief from temporary sample files without reading or modifying the user's project.
6
+ - Clarify how to try the demo and install the CLI when pipx is not already available.
7
+ - Show the menu's actual `0` exit key correctly in the README.
8
+
9
+ ## 0.1.1
10
+
11
+ - Clarify the product's best-fit use case as browser-based coding chats that cannot inspect a local working tree.
12
+ - Add a structured GitHub tester-feedback form for install results, file-selection changes, and task outcomes.
13
+ - Add a clear instruction for the receiving assistant to answer the task using the brief as context.
14
+ - Prioritize task-relevant source excerpts ahead of stack details and Git history when the requested budget is small.
15
+ - Let users add a safe repository file by path and print a copyable summary of reviewed file selections.
16
+ - Print review feedback after the generated brief, and prioritize direct local importers of files changed since `--base`.
17
+ - Resolve literal Python dynamic imports and simple JS/TS path aliases when tracing imports.
18
+
19
+ ## 0.1.0
20
+
21
+ - Generate bounded, local Markdown context briefs from project documentation, manifests, Git history, and selected source files.
22
+ - Add an interactive terminal menu with ranked file selection, output choices, and overwrite confirmation.
23
+ - Explain first-run usage in the menu and CLI help; show why each source file was selected.
24
+ - Follow one level of local Python and JavaScript/TypeScript imports; allow approximate token budgets and clipboard handoff to any coding assistant.
25
+ - Format generated briefs with plain-language section titles, readable documentation excerpts, and code fences only for source/configuration where useful.
26
+ - Exclude common credential files and Git-ignored untracked files, reject credential-named or external symlinks, redact common secret formats, and keep source excerpts within fixed limits.
27
+ - Preserve normal typed password parameters and conditions in source excerpts while redacting quoted credential assignments.
28
+ - Package the CLI as `codebase-brief`, retaining `context-inject` as a compatibility command.
29
+
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: codebase-brief
3
- Version: 0.1.0
3
+ Version: 0.1.2
4
4
  Summary: Local-first CLI that builds task-focused context briefs from code repositories
5
5
  Author: Mohamed Maggy
6
6
  License-Expression: MIT
@@ -25,13 +25,19 @@ Dynamic: license-file
25
25
 
26
26
  # Codebase Brief
27
27
 
28
+ **Project site:** [codebase-brief](https://mohamed1111111m.github.io/codebase-brief/)
29
+
28
30
  [![Tests](https://github.com/mohamed1111111m/codebase-brief/actions/workflows/test.yml/badge.svg?branch=main)](https://github.com/mohamed1111111m/codebase-brief/actions/workflows/test.yml)
31
+ [![Install from PyPI](https://img.shields.io/badge/Install%20from-PyPI-3775A9?logo=pypi&logoColor=white)](https://pypi.org/project/codebase-brief/)
32
+ [![PyPI version](https://img.shields.io/pypi/v/codebase-brief.svg)](https://pypi.org/project/codebase-brief/)
29
33
  [![Python 3.10+](https://img.shields.io/badge/python-3.10%2B-3776AB?logo=python&logoColor=white)](https://www.python.org/)
30
34
  [![MIT License](https://img.shields.io/badge/license-MIT-8A63D2.svg)](LICENSE)
31
35
 
32
- **Give a coding assistant a clear map of a repository before it starts a task.** Codebase Brief reads a local project and creates a compact Markdown brief with relevant files, recent Git changes, and source paths you can check.
36
+ **Browser-based coding chats cannot see your local repo.** Codebase Brief turns one coding task into a short, reviewable file shortlist—with excerpts, reasons, and source paths—so you can give ChatGPT, Claude, or another chat the project context it cannot inspect itself.
37
+
38
+ It works locally, without an AI service or account. Review the brief, save it, or paste it into ChatGPT, Claude, or another assistant that cannot inspect your local working tree.
33
39
 
34
- It works locally, without an AI service or account. You choose what to do with the brief: review it, save it, or paste it into Claude Code, Cursor, OpenCode, Codex, or another coding assistant.
40
+ **Best fit:** a browser chat that cannot inspect your local files, or a task where you want to choose exactly what context to share. If your coding agent already reads and indexes the working tree, its built-in repo tools may be enough.
35
41
 
36
42
  ## See it in action
37
43
 
@@ -43,25 +49,29 @@ The first image is a terminal-style rendering of the app's actual numbered menu.
43
49
 
44
50
  [Watch the 12-second product walkthrough](https://raw.githubusercontent.com/mohamed1111111m/codebase-brief/main/docs/images/product-hunt-demo.mp4).
45
51
 
46
- ## Get started
52
+ ## Install the latest build
47
53
 
48
- You need Python 3.10 or newer. Git is optional, but it enables recent-history and base-diff details.
54
+ You need Python 3.10 or newer. Git is optional, but required for recent-history and base-diff details.
49
55
 
50
- Once the first PyPI release is available, install it in a virtual environment and launch the menu:
56
+ The current PyPI release is `0.1.2` and includes the review-feedback summary, importer-aware `--base` selection, and a sample demo. Install it with `pipx`:
51
57
 
52
58
  ```powershell
53
- python -m venv .venv
54
- .venv\Scripts\Activate.ps1
55
- python -m pip install --upgrade codebase-brief
56
- codebase-brief
59
+ pipx install codebase-brief
60
+ brief "C:\work\my-app" --task "Trace the login flow" --copy
57
61
  ```
58
62
 
59
- Until then, install the current version directly from GitHub:
63
+ The brief is copied to your clipboard for pasting into your assistant. Replace the example path and task with yours. To use the numbered menu, run `brief` with no arguments.
64
+
65
+ Want to see a real example before choosing your project? Run `brief --demo`. It uses a tiny temporary example project and does not read or change your files.
66
+
67
+ If you do not have `pipx` installed, skip the command above and use the virtual-environment steps below instead; they work with the project's minimum Python version. To install `pipx` first, follow its [official installation guide](https://pipx.pypa.io/latest/how-to/install-pipx.html). The current pipx installer requires Python 3.11 or newer, while Codebase Brief itself supports Python 3.10 and newer.
68
+
69
+ Or use a virtual environment:
60
70
 
61
71
  ```powershell
62
72
  python -m venv .venv
63
73
  .venv\Scripts\Activate.ps1
64
- python -m pip install git+https://github.com/mohamed1111111m/codebase-brief.git
74
+ python -m pip install --upgrade codebase-brief
65
75
  codebase-brief
66
76
  ```
67
77
 
@@ -73,12 +83,14 @@ If the `brief` command is not available, use `python -m context_inject` while th
73
83
 
74
84
  When the menu opens, it uses the folder you launched it from as the starting project. Type a number and press Enter:
75
85
 
76
- 1. **Build a context brief** — describe the coding task, optionally enter a Git base ref, then accept or change the approximate size limit.
77
- 2. **Choose a different project** — point the tool at another local repository or source folder.
78
- 3. **Help and examples** — see the workflow and an example command.
79
- 0. **Exit** — close the menu.
86
+ - **1 — Build a context brief:** Describe the coding task, optionally enter a Git base ref, then accept or change the approximate size limit.
87
+ - **2 — Choose a different project:** Point the tool at another local repository or source folder.
88
+ - **3 — Help and examples:** See the workflow and an example command.
89
+ - **0 — Exit:** Close the menu.
90
+
91
+ In plain terms, Codebase Brief makes a small guide to a project so an AI coding assistant can get oriented before helping with a task. It does not write or fix code. It reads project information locally and prepares a guide for you to review and share.
80
92
 
81
- Before generating the brief, the tool shows suggested files and why they were selected. Press Enter to keep the checked files, type file numbers to toggle selections, or type `none` for an overview without source excerpts. Then choose whether to show the result, save it, choose another output path, or copy it to your clipboard. The menu's save-here choice writes `context.md` in the folder where you launched the menu; if that is the target repository, the file will be created there. Choose the show or copy option to avoid writing a file into that folder.
93
+ Before generating the brief, the tool shows suggested files and why they were selected. Press Enter to keep the checked files, type file numbers to toggle selections, or use `add path/to/file.py` to include another safe text file from the repository. Type `none` for an overview without source excerpts. After the brief is shown, saved, or copied, Codebase Brief prints a copyable summary of files kept, removed, added from suggestions, and manually added. To help improve file selection, paste that summary into the [tester feedback form](https://github.com/mohamed1111111m/codebase-brief/issues/new?template=tester-feedback.yml) along with your task and whether the brief helped. Do not include private source code or secrets. The menu's save-here choice writes `context.md` in the folder where you launched the menu; if that is the target repository, the file will be created there. Choose the show or copy option to avoid writing a file into that folder.
82
94
 
83
95
  For your first try, choose a project you know and a task you understand. Check whether the suggested files are the ones you would have shown a coding assistant yourself.
84
96
 
@@ -98,7 +110,7 @@ To copy the result directly to your clipboard, use `--copy` instead of `--output
98
110
  codebase-brief "C:\work\my-app" --task "Find the login flow" --copy
99
111
  ```
100
112
 
101
- The generated Markdown is a starting map for your assistant, not a complete copy or analysis of the repository. Review it, then paste it into the coding assistant where you want to work.
113
+ The generated Markdown is a starting map for your assistant, not a complete copy or analysis of the repository. Review it, then paste the whole brief into the coding assistant where you want to work. It tells the assistant to answer the **Task** at the top using the brief as context. Codebase Brief prepares the handoff; the AI chat does the analysis or coding.
102
114
 
103
115
  ## What it includes
104
116
 
@@ -108,7 +120,7 @@ The generated Markdown is a starting map for your assistant, not a complete copy
108
120
  - Small excerpts from selected files, within the requested size budget.
109
121
  - Source paths throughout the brief so you can open and verify the material.
110
122
 
111
- The file picker uses task words, recent changes, selected Git diffs, common entry points, and direct local Python or JavaScript/TypeScript imports. These are simple heuristics, not semantic code analysis. It traces at most one direct import hop for supported languages, so it can miss relevant files.
123
+ The file picker uses task words, recent changes, selected Git diffs, common entry points, and direct local Python or JavaScript/TypeScript imports. With `--base`, it also scans supported source files for direct imports of changed files. It understands literal dynamic imports, Python `importlib` calls with literal module names, and simple `paths` aliases in `tsconfig.json` or `jsconfig.json`. This is still static analysis: imports assembled from runtime values, complex config inheritance, generated modules, and unsupported languages may be missed.
112
124
 
113
125
  ## Privacy and limitations
114
126
 
@@ -134,5 +146,5 @@ See [CONTRIBUTING.md](CONTRIBUTING.md) for contribution notes, [CHANGELOG.md](CH
134
146
 
135
147
  ## Help shape Codebase Brief
136
148
 
137
- This is an early open-source project. If you try it, feedback about which suggested files were useful or missing is especially helpful. Use [GitHub Issues](https://github.com/mohamed1111111m/codebase-brief/issues) for reproducible bugs and concrete feature requests. The [launch kit](docs/launch-kit.md) has a short demo plan, the [Product Hunt draft](docs/product-hunt-launch.md) contains prepared listing copy, and PyPI setup is in [PYPI_PUBLISHING.md](docs/PYPI_PUBLISHING.md).
149
+ This is an early open-source project. If you try it, the most useful feedback is which suggested files you kept, removed, or added—and whether the resulting brief gave your assistant enough context. Use the [tester feedback form](https://github.com/mohamed1111111m/codebase-brief/issues/new?template=tester-feedback.yml); use [GitHub Issues](https://github.com/mohamed1111111m/codebase-brief/issues) for reproducible bugs and concrete feature requests. The [launch kit](docs/launch-kit.md) has a short demo plan, the [Product Hunt draft](docs/product-hunt-launch.md) contains prepared listing copy, and PyPI setup is in [PYPI_PUBLISHING.md](docs/PYPI_PUBLISHING.md).
138
150
 
@@ -0,0 +1,125 @@
1
+ # Codebase Brief
2
+
3
+ **Project site:** [codebase-brief](https://mohamed1111111m.github.io/codebase-brief/)
4
+
5
+ [![Tests](https://github.com/mohamed1111111m/codebase-brief/actions/workflows/test.yml/badge.svg?branch=main)](https://github.com/mohamed1111111m/codebase-brief/actions/workflows/test.yml)
6
+ [![Install from PyPI](https://img.shields.io/badge/Install%20from-PyPI-3775A9?logo=pypi&logoColor=white)](https://pypi.org/project/codebase-brief/)
7
+ [![PyPI version](https://img.shields.io/pypi/v/codebase-brief.svg)](https://pypi.org/project/codebase-brief/)
8
+ [![Python 3.10+](https://img.shields.io/badge/python-3.10%2B-3776AB?logo=python&logoColor=white)](https://www.python.org/)
9
+ [![MIT License](https://img.shields.io/badge/license-MIT-8A63D2.svg)](LICENSE)
10
+
11
+ **Browser-based coding chats cannot see your local repo.** Codebase Brief turns one coding task into a short, reviewable file shortlist—with excerpts, reasons, and source paths—so you can give ChatGPT, Claude, or another chat the project context it cannot inspect itself.
12
+
13
+ It works locally, without an AI service or account. Review the brief, save it, or paste it into ChatGPT, Claude, or another assistant that cannot inspect your local working tree.
14
+
15
+ **Best fit:** a browser chat that cannot inspect your local files, or a task where you want to choose exactly what context to share. If your coding agent already reads and indexes the working tree, its built-in repo tools may be enough.
16
+
17
+ ## See it in action
18
+
19
+ The first image is a terminal-style rendering of the app's actual numbered menu. The sample brief was generated by running Codebase Brief on a small example repository with a Git base ref.
20
+
21
+ ![Codebase Brief's colorful guided menu](https://raw.githubusercontent.com/mohamed1111111m/codebase-brief/main/docs/images/guided-menu.png)
22
+
23
+ ![Example context brief showing task, repository details, recent changes, and cited files](https://raw.githubusercontent.com/mohamed1111111m/codebase-brief/main/docs/images/sample-context-brief.png)
24
+
25
+ [Watch the 12-second product walkthrough](https://raw.githubusercontent.com/mohamed1111111m/codebase-brief/main/docs/images/product-hunt-demo.mp4).
26
+
27
+ ## Install the latest build
28
+
29
+ You need Python 3.10 or newer. Git is optional, but required for recent-history and base-diff details.
30
+
31
+ The current PyPI release is `0.1.2` and includes the review-feedback summary, importer-aware `--base` selection, and a sample demo. Install it with `pipx`:
32
+
33
+ ```powershell
34
+ pipx install codebase-brief
35
+ brief "C:\work\my-app" --task "Trace the login flow" --copy
36
+ ```
37
+
38
+ The brief is copied to your clipboard for pasting into your assistant. Replace the example path and task with yours. To use the numbered menu, run `brief` with no arguments.
39
+
40
+ Want to see a real example before choosing your project? Run `brief --demo`. It uses a tiny temporary example project and does not read or change your files.
41
+
42
+ If you do not have `pipx` installed, skip the command above and use the virtual-environment steps below instead; they work with the project's minimum Python version. To install `pipx` first, follow its [official installation guide](https://pipx.pypa.io/latest/how-to/install-pipx.html). The current pipx installer requires Python 3.11 or newer, while Codebase Brief itself supports Python 3.10 and newer.
43
+
44
+ Or use a virtual environment:
45
+
46
+ ```powershell
47
+ python -m venv .venv
48
+ .venv\Scripts\Activate.ps1
49
+ python -m pip install --upgrade codebase-brief
50
+ codebase-brief
51
+ ```
52
+
53
+ On macOS or Linux, activate the environment with `source .venv/bin/activate` after creating it with `python3 -m venv .venv`.
54
+
55
+ If the `brief` command is not available, use `python -m context_inject` while that same virtual environment is active.
56
+
57
+ ## Use the menu
58
+
59
+ When the menu opens, it uses the folder you launched it from as the starting project. Type a number and press Enter:
60
+
61
+ - **1 — Build a context brief:** Describe the coding task, optionally enter a Git base ref, then accept or change the approximate size limit.
62
+ - **2 — Choose a different project:** Point the tool at another local repository or source folder.
63
+ - **3 — Help and examples:** See the workflow and an example command.
64
+ - **0 — Exit:** Close the menu.
65
+
66
+ In plain terms, Codebase Brief makes a small guide to a project so an AI coding assistant can get oriented before helping with a task. It does not write or fix code. It reads project information locally and prepares a guide for you to review and share.
67
+
68
+ Before generating the brief, the tool shows suggested files and why they were selected. Press Enter to keep the checked files, type file numbers to toggle selections, or use `add path/to/file.py` to include another safe text file from the repository. Type `none` for an overview without source excerpts. After the brief is shown, saved, or copied, Codebase Brief prints a copyable summary of files kept, removed, added from suggestions, and manually added. To help improve file selection, paste that summary into the [tester feedback form](https://github.com/mohamed1111111m/codebase-brief/issues/new?template=tester-feedback.yml) along with your task and whether the brief helped. Do not include private source code or secrets. The menu's save-here choice writes `context.md` in the folder where you launched the menu; if that is the target repository, the file will be created there. Choose the show or copy option to avoid writing a file into that folder.
69
+
70
+ For your first try, choose a project you know and a task you understand. Check whether the suggested files are the ones you would have shown a coding assistant yourself.
71
+
72
+ ## Run it with a command
73
+
74
+ You can skip the menu and generate a brief directly:
75
+
76
+ ```powershell
77
+ codebase-brief "C:\work\my-app" --task "Add authentication middleware" --base main --budget 2400 --output context.md
78
+ ```
79
+
80
+ Replace the example folder and task with your own. `--base main` prioritizes files changed between `main` and the current `HEAD`; omit it if you do not want a Git diff. `--output context.md` saves the result to that path. Without `--output`, the brief is printed in the terminal.
81
+
82
+ To copy the result directly to your clipboard, use `--copy` instead of `--output`:
83
+
84
+ ```powershell
85
+ codebase-brief "C:\work\my-app" --task "Find the login flow" --copy
86
+ ```
87
+
88
+ The generated Markdown is a starting map for your assistant, not a complete copy or analysis of the repository. Review it, then paste the whole brief into the coding assistant where you want to work. It tells the assistant to answer the **Task** at the top using the brief as context. Codebase Brief prepares the handoff; the AI chat does the analysis or coding.
89
+
90
+ ## What it includes
91
+
92
+ - Project documentation and common stack manifests, such as `package.json` and `pyproject.toml`.
93
+ - Recent Git commit subjects and changed paths when Git is available.
94
+ - A short list of task-related files with a note explaining each suggestion.
95
+ - Small excerpts from selected files, within the requested size budget.
96
+ - Source paths throughout the brief so you can open and verify the material.
97
+
98
+ The file picker uses task words, recent changes, selected Git diffs, common entry points, and direct local Python or JavaScript/TypeScript imports. With `--base`, it also scans supported source files for direct imports of changed files. It understands literal dynamic imports, Python `importlib` calls with literal module names, and simple `paths` aliases in `tsconfig.json` or `jsconfig.json`. This is still static analysis: imports assembled from runtime values, complex config inheritance, generated modules, and unsupported languages may be missed.
99
+
100
+ ## Privacy and limitations
101
+
102
+ - Repository reading and brief generation happen on your computer. The application has no AI calls, telemetry, or hosted service.
103
+ - The tool does not write to the target repository just to read it or generate a brief. It writes a file only when you choose a save option; menu option 2 saves `context.md` in the current working folder, which may be the target repository.
104
+ - Common credential files, ignored files, generated files, and private-key files are excluded. Some recognizable secret formats and assignments are redacted.
105
+ - Filtering is best-effort, not a security guarantee or full secret scan. Review the brief before sharing it, especially when working with private code.
106
+ - The size budget is approximate: it estimates tokens from character count and is not tied to a particular model tokenizer.
107
+ - Without Git, the tool still reads supported documentation and manifests, but cannot include Git history or diff details.
108
+
109
+ ## Development
110
+
111
+ Clone the repository, create a virtual environment, and install the project in editable mode:
112
+
113
+ ```powershell
114
+ python -m venv .venv
115
+ .venv\Scripts\Activate.ps1
116
+ python -m pip install --editable .
117
+ python -m unittest discover -s tests -v
118
+ ```
119
+
120
+ See [CONTRIBUTING.md](CONTRIBUTING.md) for contribution notes, [CHANGELOG.md](CHANGELOG.md) for project changes, and [LICENSE](LICENSE) for the MIT terms.
121
+
122
+ ## Help shape Codebase Brief
123
+
124
+ This is an early open-source project. If you try it, the most useful feedback is which suggested files you kept, removed, or added—and whether the resulting brief gave your assistant enough context. Use the [tester feedback form](https://github.com/mohamed1111111m/codebase-brief/issues/new?template=tester-feedback.yml); use [GitHub Issues](https://github.com/mohamed1111111m/codebase-brief/issues) for reproducible bugs and concrete feature requests. The [launch kit](docs/launch-kit.md) has a short demo plan, the [Product Hunt draft](docs/product-hunt-launch.md) contains prepared listing copy, and PyPI setup is in [PYPI_PUBLISHING.md](docs/PYPI_PUBLISHING.md).
125
+
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: codebase-brief
3
- Version: 0.1.0
3
+ Version: 0.1.2
4
4
  Summary: Local-first CLI that builds task-focused context briefs from code repositories
5
5
  Author: Mohamed Maggy
6
6
  License-Expression: MIT
@@ -25,13 +25,19 @@ Dynamic: license-file
25
25
 
26
26
  # Codebase Brief
27
27
 
28
+ **Project site:** [codebase-brief](https://mohamed1111111m.github.io/codebase-brief/)
29
+
28
30
  [![Tests](https://github.com/mohamed1111111m/codebase-brief/actions/workflows/test.yml/badge.svg?branch=main)](https://github.com/mohamed1111111m/codebase-brief/actions/workflows/test.yml)
31
+ [![Install from PyPI](https://img.shields.io/badge/Install%20from-PyPI-3775A9?logo=pypi&logoColor=white)](https://pypi.org/project/codebase-brief/)
32
+ [![PyPI version](https://img.shields.io/pypi/v/codebase-brief.svg)](https://pypi.org/project/codebase-brief/)
29
33
  [![Python 3.10+](https://img.shields.io/badge/python-3.10%2B-3776AB?logo=python&logoColor=white)](https://www.python.org/)
30
34
  [![MIT License](https://img.shields.io/badge/license-MIT-8A63D2.svg)](LICENSE)
31
35
 
32
- **Give a coding assistant a clear map of a repository before it starts a task.** Codebase Brief reads a local project and creates a compact Markdown brief with relevant files, recent Git changes, and source paths you can check.
36
+ **Browser-based coding chats cannot see your local repo.** Codebase Brief turns one coding task into a short, reviewable file shortlist—with excerpts, reasons, and source paths—so you can give ChatGPT, Claude, or another chat the project context it cannot inspect itself.
37
+
38
+ It works locally, without an AI service or account. Review the brief, save it, or paste it into ChatGPT, Claude, or another assistant that cannot inspect your local working tree.
33
39
 
34
- It works locally, without an AI service or account. You choose what to do with the brief: review it, save it, or paste it into Claude Code, Cursor, OpenCode, Codex, or another coding assistant.
40
+ **Best fit:** a browser chat that cannot inspect your local files, or a task where you want to choose exactly what context to share. If your coding agent already reads and indexes the working tree, its built-in repo tools may be enough.
35
41
 
36
42
  ## See it in action
37
43
 
@@ -43,25 +49,29 @@ The first image is a terminal-style rendering of the app's actual numbered menu.
43
49
 
44
50
  [Watch the 12-second product walkthrough](https://raw.githubusercontent.com/mohamed1111111m/codebase-brief/main/docs/images/product-hunt-demo.mp4).
45
51
 
46
- ## Get started
52
+ ## Install the latest build
47
53
 
48
- You need Python 3.10 or newer. Git is optional, but it enables recent-history and base-diff details.
54
+ You need Python 3.10 or newer. Git is optional, but required for recent-history and base-diff details.
49
55
 
50
- Once the first PyPI release is available, install it in a virtual environment and launch the menu:
56
+ The current PyPI release is `0.1.2` and includes the review-feedback summary, importer-aware `--base` selection, and a sample demo. Install it with `pipx`:
51
57
 
52
58
  ```powershell
53
- python -m venv .venv
54
- .venv\Scripts\Activate.ps1
55
- python -m pip install --upgrade codebase-brief
56
- codebase-brief
59
+ pipx install codebase-brief
60
+ brief "C:\work\my-app" --task "Trace the login flow" --copy
57
61
  ```
58
62
 
59
- Until then, install the current version directly from GitHub:
63
+ The brief is copied to your clipboard for pasting into your assistant. Replace the example path and task with yours. To use the numbered menu, run `brief` with no arguments.
64
+
65
+ Want to see a real example before choosing your project? Run `brief --demo`. It uses a tiny temporary example project and does not read or change your files.
66
+
67
+ If you do not have `pipx` installed, skip the command above and use the virtual-environment steps below instead; they work with the project's minimum Python version. To install `pipx` first, follow its [official installation guide](https://pipx.pypa.io/latest/how-to/install-pipx.html). The current pipx installer requires Python 3.11 or newer, while Codebase Brief itself supports Python 3.10 and newer.
68
+
69
+ Or use a virtual environment:
60
70
 
61
71
  ```powershell
62
72
  python -m venv .venv
63
73
  .venv\Scripts\Activate.ps1
64
- python -m pip install git+https://github.com/mohamed1111111m/codebase-brief.git
74
+ python -m pip install --upgrade codebase-brief
65
75
  codebase-brief
66
76
  ```
67
77
 
@@ -73,12 +83,14 @@ If the `brief` command is not available, use `python -m context_inject` while th
73
83
 
74
84
  When the menu opens, it uses the folder you launched it from as the starting project. Type a number and press Enter:
75
85
 
76
- 1. **Build a context brief** — describe the coding task, optionally enter a Git base ref, then accept or change the approximate size limit.
77
- 2. **Choose a different project** — point the tool at another local repository or source folder.
78
- 3. **Help and examples** — see the workflow and an example command.
79
- 0. **Exit** — close the menu.
86
+ - **1 — Build a context brief:** Describe the coding task, optionally enter a Git base ref, then accept or change the approximate size limit.
87
+ - **2 — Choose a different project:** Point the tool at another local repository or source folder.
88
+ - **3 — Help and examples:** See the workflow and an example command.
89
+ - **0 — Exit:** Close the menu.
90
+
91
+ In plain terms, Codebase Brief makes a small guide to a project so an AI coding assistant can get oriented before helping with a task. It does not write or fix code. It reads project information locally and prepares a guide for you to review and share.
80
92
 
81
- Before generating the brief, the tool shows suggested files and why they were selected. Press Enter to keep the checked files, type file numbers to toggle selections, or type `none` for an overview without source excerpts. Then choose whether to show the result, save it, choose another output path, or copy it to your clipboard. The menu's save-here choice writes `context.md` in the folder where you launched the menu; if that is the target repository, the file will be created there. Choose the show or copy option to avoid writing a file into that folder.
93
+ Before generating the brief, the tool shows suggested files and why they were selected. Press Enter to keep the checked files, type file numbers to toggle selections, or use `add path/to/file.py` to include another safe text file from the repository. Type `none` for an overview without source excerpts. After the brief is shown, saved, or copied, Codebase Brief prints a copyable summary of files kept, removed, added from suggestions, and manually added. To help improve file selection, paste that summary into the [tester feedback form](https://github.com/mohamed1111111m/codebase-brief/issues/new?template=tester-feedback.yml) along with your task and whether the brief helped. Do not include private source code or secrets. The menu's save-here choice writes `context.md` in the folder where you launched the menu; if that is the target repository, the file will be created there. Choose the show or copy option to avoid writing a file into that folder.
82
94
 
83
95
  For your first try, choose a project you know and a task you understand. Check whether the suggested files are the ones you would have shown a coding assistant yourself.
84
96
 
@@ -98,7 +110,7 @@ To copy the result directly to your clipboard, use `--copy` instead of `--output
98
110
  codebase-brief "C:\work\my-app" --task "Find the login flow" --copy
99
111
  ```
100
112
 
101
- The generated Markdown is a starting map for your assistant, not a complete copy or analysis of the repository. Review it, then paste it into the coding assistant where you want to work.
113
+ The generated Markdown is a starting map for your assistant, not a complete copy or analysis of the repository. Review it, then paste the whole brief into the coding assistant where you want to work. It tells the assistant to answer the **Task** at the top using the brief as context. Codebase Brief prepares the handoff; the AI chat does the analysis or coding.
102
114
 
103
115
  ## What it includes
104
116
 
@@ -108,7 +120,7 @@ The generated Markdown is a starting map for your assistant, not a complete copy
108
120
  - Small excerpts from selected files, within the requested size budget.
109
121
  - Source paths throughout the brief so you can open and verify the material.
110
122
 
111
- The file picker uses task words, recent changes, selected Git diffs, common entry points, and direct local Python or JavaScript/TypeScript imports. These are simple heuristics, not semantic code analysis. It traces at most one direct import hop for supported languages, so it can miss relevant files.
123
+ The file picker uses task words, recent changes, selected Git diffs, common entry points, and direct local Python or JavaScript/TypeScript imports. With `--base`, it also scans supported source files for direct imports of changed files. It understands literal dynamic imports, Python `importlib` calls with literal module names, and simple `paths` aliases in `tsconfig.json` or `jsconfig.json`. This is still static analysis: imports assembled from runtime values, complex config inheritance, generated modules, and unsupported languages may be missed.
112
124
 
113
125
  ## Privacy and limitations
114
126
 
@@ -134,5 +146,5 @@ See [CONTRIBUTING.md](CONTRIBUTING.md) for contribution notes, [CHANGELOG.md](CH
134
146
 
135
147
  ## Help shape Codebase Brief
136
148
 
137
- This is an early open-source project. If you try it, feedback about which suggested files were useful or missing is especially helpful. Use [GitHub Issues](https://github.com/mohamed1111111m/codebase-brief/issues) for reproducible bugs and concrete feature requests. The [launch kit](docs/launch-kit.md) has a short demo plan, the [Product Hunt draft](docs/product-hunt-launch.md) contains prepared listing copy, and PyPI setup is in [PYPI_PUBLISHING.md](docs/PYPI_PUBLISHING.md).
149
+ This is an early open-source project. If you try it, the most useful feedback is which suggested files you kept, removed, or added—and whether the resulting brief gave your assistant enough context. Use the [tester feedback form](https://github.com/mohamed1111111m/codebase-brief/issues/new?template=tester-feedback.yml); use [GitHub Issues](https://github.com/mohamed1111111m/codebase-brief/issues) for reproducible bugs and concrete feature requests. The [launch kit](docs/launch-kit.md) has a short demo plan, the [Product Hunt draft](docs/product-hunt-launch.md) contains prepared listing copy, and PyPI setup is in [PYPI_PUBLISHING.md](docs/PYPI_PUBLISHING.md).
138
150