project-scriber 1.0.0__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,5 @@
1
+ # Default ignored files
2
+ /shelf/
3
+ /workspace.xml
4
+ # Editor-based HTTP Client requests
5
+ /httpRequests/
@@ -0,0 +1,13 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <module type="PYTHON_MODULE" version="4">
3
+ <component name="NewModuleRootManager">
4
+ <content url="file://$MODULE_DIR$">
5
+ <sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
6
+ </content>
7
+ <orderEntry type="jdk" jdkName="Python 3.12 virtualenv at D:\Projects\ProjectScriber\.venv" jdkType="Python SDK" />
8
+ <orderEntry type="sourceFolder" forTests="false" />
9
+ </component>
10
+ <component name="TestRunnerService">
11
+ <option name="PROJECT_TEST_RUNNER" value="py.test" />
12
+ </component>
13
+ </module>
@@ -0,0 +1,6 @@
1
+ <component name="InspectionProjectProfileManager">
2
+ <settings>
3
+ <option name="USE_PROJECT_PROFILE" value="false" />
4
+ <version value="1.0" />
5
+ </settings>
6
+ </component>
@@ -0,0 +1,7 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="Black">
4
+ <option name="sdkName" value="Python 3.12 virtualenv at D:\Projects\ProjectScriber\.venv" />
5
+ </component>
6
+ <component name="ProjectRootManager" version="2" project-jdk-name="Python 3.12 virtualenv at D:\Projects\ProjectScriber\.venv" project-jdk-type="Python SDK" />
7
+ </project>
@@ -0,0 +1,8 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="ProjectModuleManager">
4
+ <modules>
5
+ <module fileurl="file://$PROJECT_DIR$/.idea/ProjectScriber.iml" filepath="$PROJECT_DIR$/.idea/ProjectScriber.iml" />
6
+ </modules>
7
+ </component>
8
+ </project>
@@ -0,0 +1,6 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="VcsDirectoryMappings">
4
+ <mapping directory="" vcs="Git" />
5
+ </component>
6
+ </project>
@@ -0,0 +1,187 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="AutoImportSettings">
4
+ <option name="autoReloadType" value="SELECTIVE" />
5
+ </component>
6
+ <component name="ChangeListManager">
7
+ <list default="true" id="09762ee6-9485-49bb-a710-9afbb60e51eb" name="Changes" comment="Initial commit of ProjectScriber">
8
+ <change afterPath="$PROJECT_DIR$/README.md" afterDir="false" />
9
+ <change afterPath="$PROJECT_DIR$/assets/scriber_icon.svg" afterDir="false" />
10
+ <change afterPath="$PROJECT_DIR$/assets/scriber_logo.svg" afterDir="false" />
11
+ <change afterPath="$PROJECT_DIR$/assets/scriber_name.svg" afterDir="false" />
12
+ <change afterPath="$PROJECT_DIR$/pyproject.toml" afterDir="false" />
13
+ <change afterPath="$PROJECT_DIR$/src/run.py" afterDir="false" />
14
+ <change afterPath="$PROJECT_DIR$/src/scriber/__init__.py" afterDir="false" />
15
+ <change afterPath="$PROJECT_DIR$/src/scriber/cli.py" afterDir="false" />
16
+ <change afterPath="$PROJECT_DIR$/src/scriber/core.py" afterDir="false" />
17
+ <change afterPath="$PROJECT_DIR$/tests/test_suite.py" afterDir="false" />
18
+ <change beforePath="$PROJECT_DIR$/LICENSE" beforeDir="false" afterPath="$PROJECT_DIR$/LICENSE" afterDir="false" />
19
+ </list>
20
+ <option name="SHOW_DIALOG" value="false" />
21
+ <option name="HIGHLIGHT_CONFLICTS" value="true" />
22
+ <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
23
+ <option name="LAST_RESOLUTION" value="IGNORE" />
24
+ </component>
25
+ <component name="Git.Settings">
26
+ <option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
27
+ </component>
28
+ <component name="GitHubPullRequestSearchHistory">{
29
+ &quot;lastFilter&quot;: {
30
+ &quot;state&quot;: &quot;OPEN&quot;,
31
+ &quot;assignee&quot;: &quot;SunneV&quot;
32
+ }
33
+ }</component>
34
+ <component name="GithubPullRequestsUISettings">{
35
+ &quot;selectedUrlAndAccountId&quot;: {
36
+ &quot;url&quot;: &quot;https://github.com/SunneV/ProjectScriber.git&quot;,
37
+ &quot;accountId&quot;: &quot;305303c5-3fbb-49d5-b80a-c51603759d28&quot;
38
+ }
39
+ }</component>
40
+ <component name="ProjectColorInfo">{
41
+ &quot;associatedIndex&quot;: 0
42
+ }</component>
43
+ <component name="ProjectId" id="31sejKMEdz9kwnIuwqy6DAVCK45" />
44
+ <component name="ProjectViewState">
45
+ <option name="hideEmptyMiddlePackages" value="true" />
46
+ <option name="showLibraryContents" value="true" />
47
+ </component>
48
+ <component name="PropertiesComponent">{
49
+ &quot;keyToString&quot;: {
50
+ &quot;Python tests.Python tests in tests.executor&quot;: &quot;Run&quot;,
51
+ &quot;Python tests.pytest in test_suite.py.executor&quot;: &quot;Run&quot;,
52
+ &quot;Python.run.executor&quot;: &quot;Run&quot;,
53
+ &quot;Python.test_suite.executor&quot;: &quot;Run&quot;,
54
+ &quot;RunOnceActivity.ShowReadmeOnStart&quot;: &quot;true&quot;,
55
+ &quot;RunOnceActivity.TerminalTabsStorage.copyFrom.TerminalArrangementManager.252&quot;: &quot;true&quot;,
56
+ &quot;RunOnceActivity.git.unshallow&quot;: &quot;true&quot;,
57
+ &quot;git-widget-placeholder&quot;: &quot;main&quot;,
58
+ &quot;last_opened_file_path&quot;: &quot;D:/Projects/ProjectScriber/assets&quot;,
59
+ &quot;settings.editor.selected.configurable&quot;: &quot;com.jetbrains.python.configuration.PyActiveSdkModuleConfigurable&quot;
60
+ }
61
+ }</component>
62
+ <component name="RecentsManager">
63
+ <key name="CopyFile.RECENT_KEYS">
64
+ <recent name="D:\Projects\ProjectScriber\assets" />
65
+ <recent name="D:\Projects\ProjectScriber" />
66
+ </key>
67
+ </component>
68
+ <component name="RunManager" selected="Python.run">
69
+ <configuration name="run" type="PythonConfigurationType" factoryName="Python" temporary="true" nameIsGenerated="true">
70
+ <module name="ProjectScriber" />
71
+ <option name="ENV_FILES" value="" />
72
+ <option name="INTERPRETER_OPTIONS" value="" />
73
+ <option name="PARENT_ENVS" value="true" />
74
+ <envs>
75
+ <env name="PYTHONUNBUFFERED" value="1" />
76
+ </envs>
77
+ <option name="SDK_HOME" value="" />
78
+ <option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/src" />
79
+ <option name="IS_MODULE_SDK" value="true" />
80
+ <option name="ADD_CONTENT_ROOTS" value="true" />
81
+ <option name="ADD_SOURCE_ROOTS" value="true" />
82
+ <option name="SCRIPT_NAME" value="$PROJECT_DIR$/src/run.py" />
83
+ <option name="PARAMETERS" value="" />
84
+ <option name="SHOW_COMMAND_LINE" value="false" />
85
+ <option name="EMULATE_TERMINAL" value="false" />
86
+ <option name="MODULE_MODE" value="false" />
87
+ <option name="REDIRECT_INPUT" value="false" />
88
+ <option name="INPUT_FILE" value="" />
89
+ <method v="2" />
90
+ </configuration>
91
+ <configuration name="test_suite" type="PythonConfigurationType" factoryName="Python" temporary="true" nameIsGenerated="true">
92
+ <module name="ProjectScriber" />
93
+ <option name="ENV_FILES" value="" />
94
+ <option name="INTERPRETER_OPTIONS" value="" />
95
+ <option name="PARENT_ENVS" value="true" />
96
+ <envs>
97
+ <env name="PYTHONUNBUFFERED" value="1" />
98
+ </envs>
99
+ <option name="SDK_HOME" value="" />
100
+ <option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/tests" />
101
+ <option name="IS_MODULE_SDK" value="true" />
102
+ <option name="ADD_CONTENT_ROOTS" value="true" />
103
+ <option name="ADD_SOURCE_ROOTS" value="true" />
104
+ <option name="SCRIPT_NAME" value="$PROJECT_DIR$/tests/test_suite.py" />
105
+ <option name="PARAMETERS" value="" />
106
+ <option name="SHOW_COMMAND_LINE" value="false" />
107
+ <option name="EMULATE_TERMINAL" value="false" />
108
+ <option name="MODULE_MODE" value="false" />
109
+ <option name="REDIRECT_INPUT" value="false" />
110
+ <option name="INPUT_FILE" value="" />
111
+ <method v="2" />
112
+ </configuration>
113
+ <configuration name="Python tests in tests" type="tests" factoryName="Autodetect" temporary="true" nameIsGenerated="true">
114
+ <module name="ProjectScriber" />
115
+ <option name="ENV_FILES" value="" />
116
+ <option name="INTERPRETER_OPTIONS" value="" />
117
+ <option name="PARENT_ENVS" value="true" />
118
+ <option name="SDK_HOME" value="" />
119
+ <option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/tests" />
120
+ <option name="IS_MODULE_SDK" value="true" />
121
+ <option name="ADD_CONTENT_ROOTS" value="true" />
122
+ <option name="ADD_SOURCE_ROOTS" value="true" />
123
+ <option name="_new_additionalArguments" value="&quot;&quot;" />
124
+ <option name="_new_target" value="&quot;$PROJECT_DIR$/tests&quot;" />
125
+ <option name="_new_targetType" value="&quot;PATH&quot;" />
126
+ <method v="2" />
127
+ </configuration>
128
+ <configuration name="pytest in test_suite.py" type="tests" factoryName="py.test" temporary="true" nameIsGenerated="true">
129
+ <module name="ProjectScriber" />
130
+ <option name="ENV_FILES" value="" />
131
+ <option name="INTERPRETER_OPTIONS" value="" />
132
+ <option name="PARENT_ENVS" value="true" />
133
+ <option name="SDK_HOME" value="" />
134
+ <option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
135
+ <option name="IS_MODULE_SDK" value="true" />
136
+ <option name="ADD_CONTENT_ROOTS" value="true" />
137
+ <option name="ADD_SOURCE_ROOTS" value="true" />
138
+ <option name="_new_keywords" value="&quot;&quot;" />
139
+ <option name="_new_parameters" value="&quot;&quot;" />
140
+ <option name="_new_additionalArguments" value="&quot;&quot;" />
141
+ <option name="_new_target" value="&quot;$PROJECT_DIR$/tests/test_suite.py&quot;" />
142
+ <option name="_new_targetType" value="&quot;PATH&quot;" />
143
+ <method v="2" />
144
+ </configuration>
145
+ <recent_temporary>
146
+ <list>
147
+ <item itemvalue="Python.run" />
148
+ <item itemvalue="Python tests.pytest in test_suite.py" />
149
+ <item itemvalue="Python.test_suite" />
150
+ <item itemvalue="Python tests.Python tests in tests" />
151
+ </list>
152
+ </recent_temporary>
153
+ </component>
154
+ <component name="SharedIndexes">
155
+ <attachedChunks>
156
+ <set>
157
+ <option value="bundled-python-sdk-7e47963ff851-f0eec537fc84-com.jetbrains.pycharm.pro.sharedIndexes.bundled-PY-252.23892.515" />
158
+ </set>
159
+ </attachedChunks>
160
+ </component>
161
+ <component name="TaskManager">
162
+ <task active="true" id="Default" summary="Default task">
163
+ <changelist id="09762ee6-9485-49bb-a710-9afbb60e51eb" name="Changes" comment="" />
164
+ <created>1754140469066</created>
165
+ <option name="number" value="Default" />
166
+ <option name="presentableId" value="Default" />
167
+ <updated>1754140469066</updated>
168
+ </task>
169
+ <servers />
170
+ </component>
171
+ <component name="Vcs.Log.Tabs.Properties">
172
+ <option name="TAB_STATES">
173
+ <map>
174
+ <entry key="MAIN">
175
+ <value>
176
+ <State />
177
+ </value>
178
+ </entry>
179
+ </map>
180
+ </option>
181
+ </component>
182
+ <component name="VcsManagerConfiguration">
183
+ <MESSAGE value="Initial commit" />
184
+ <MESSAGE value="Initial commit of ProjectScriber" />
185
+ <option name="LAST_COMMIT_MESSAGE" value="Initial commit of ProjectScriber" />
186
+ </component>
187
+ </project>
@@ -0,0 +1,41 @@
1
+ {
2
+ "use_gitignore": true,
3
+ "exclude": [
4
+ ".git",
5
+ ".idea",
6
+ ".vscode",
7
+ ".project",
8
+ ".settings",
9
+ ".classpath",
10
+ "__pycache__",
11
+ "*.pyc",
12
+ ".venv",
13
+ "venv",
14
+ ".pytest_cache",
15
+ "uv.lock",
16
+ "node_modules",
17
+ "npm-debug.log*",
18
+ "yarn-error.log",
19
+ "build",
20
+ "dist",
21
+ "target",
22
+ "bin",
23
+ "obj",
24
+ "out",
25
+ "vendor",
26
+ "bower_components",
27
+ "*.log",
28
+ "*.lock",
29
+ "*.tmp",
30
+ "temp",
31
+ "tmp",
32
+ ".DS_Store",
33
+ "Thumbs.db",
34
+ "*~",
35
+ "*.swp",
36
+ "*.swo",
37
+ "scriber_output.txt",
38
+ ".scriber.json"
39
+ ],
40
+ "include": []
41
+ }
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 SunneV (Wojciech Mariusz Cichoń)
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,197 @@
1
+ Metadata-Version: 2.4
2
+ Name: project-scriber
3
+ Version: 1.0.0
4
+ Summary: An intelligent tool to map, analyze, and compile project source code for LLM context.
5
+ Project-URL: Homepage, https://github.com/SunneV/ProjectScriber
6
+ Project-URL: Issues, https://github.com/SunneV/ProjectScriber/issues
7
+ Author-email: "SunneV (Wojciech Mariusz Cichoń)" <wojciech.m.cichon@gmail.com>
8
+ License: MIT License
9
+
10
+ Copyright (c) 2025 SunneV (Wojciech Mariusz Cichoń)
11
+
12
+ Permission is hereby granted, free of charge, to any person obtaining a copy
13
+ of this software and associated documentation files (the "Software"), to deal
14
+ in the Software without restriction, including without limitation the rights
15
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
16
+ copies of the Software, and to permit persons to whom the Software is
17
+ furnished to do so, subject to the following conditions:
18
+
19
+ The above copyright notice and this permission notice shall be included in all
20
+ copies or substantial portions of the Software.
21
+
22
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
23
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
24
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
25
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
26
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
27
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
28
+ SOFTWARE.
29
+ License-File: LICENSE
30
+ Keywords: code-analysis,context-builder,developer-tools,llm,source-code
31
+ Classifier: License :: OSI Approved :: MIT License
32
+ Classifier: Operating System :: OS Independent
33
+ Classifier: Programming Language :: Python :: 3
34
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
35
+ Classifier: Topic :: Utilities
36
+ Requires-Python: >=3.10
37
+ Requires-Dist: pathspec
38
+ Requires-Dist: pyperclip
39
+ Requires-Dist: python-dotenv
40
+ Requires-Dist: rich
41
+ Requires-Dist: tiktoken
42
+ Requires-Dist: tomli; python_version < '3.11'
43
+ Requires-Dist: tomlkit
44
+ Provides-Extra: dev
45
+ Requires-Dist: pytest; extra == 'dev'
46
+ Requires-Dist: pytest-mock; extra == 'dev'
47
+ Description-Content-Type: text/markdown
48
+
49
+ # Introduction
50
+
51
+ <p align="center">
52
+ <img src="https://raw.githubusercontent.com/SunneV/ProjectScriber/main/assets/scriber_logo.svg" alt="ProjectScriber Logo" width="420">
53
+ </p>
54
+ <p align="center">
55
+ <img src="https://raw.githubusercontent.com/SunneV/ProjectScriber/main/assets/scriber_name.svg" alt="ProjectScriber Name" width="300">
56
+ </p>
57
+
58
+ A command-line tool to intelligently map and compile your entire project's source code into a single, context-optimized
59
+ text file for Large Language Models (LLMs).
60
+
61
+ ProjectScriber scans your project directory, respects `.gitignore` rules, applies custom filters, and bundles all
62
+ relevant code into a clean, readable format. It's the perfect way to provide a complete codebase to an AI for analysis,
63
+ documentation, or refactoring.
64
+
65
+ -----
66
+
67
+ ## Key Features
68
+
69
+ - **🌳 Smart Project Mapping:** Generates a clear and intuitive tree view of your project's structure.
70
+ - **⚙️ Intelligent Filtering:** Automatically respects `.gitignore` rules and supports custom `include` and `exclude`
71
+ patterns via a `.scriber.json` file for fine-grained control.
72
+ - **📊 In-depth Code Analysis:** Provides a summary with total file size, estimated token count (using `cl100k_base`),
73
+ and a language breakdown for a quick overview of your codebase.
74
+ - **✨ Interactive Setup:** A simple `scriber init` command walks you through creating a configuration file tailored to
75
+ your project.
76
+ - **📋 Clipboard Integration:** Use the `--copy` flag to automatically copy the entire consolidated output to your
77
+ clipboard, ready to be pasted into any application.
78
+ - **🔧 Flexible Configuration:** Manage your settings globally in a `pyproject.toml` file or per-project with a
79
+ `.scriber.json` file.
80
+
81
+ -----
82
+
83
+ ## Getting Started
84
+
85
+ ### Prerequisites
86
+
87
+ - Python 3.10 or higher.
88
+
89
+ ### Installation
90
+
91
+ Install the package from the source using pip. For development, include the optional dependencies.
92
+
93
+ ```shell
94
+ # Navigate to the project root directory
95
+ pip install .[dev]
96
+ ```
97
+
98
+ This will install `ProjectScriber` and make the `scriber` command available in your terminal.
99
+
100
+ -----
101
+
102
+ ## Usage
103
+
104
+ ### 1\. Basic Scan
105
+
106
+ To run ProjectScriber on the current directory, simply execute the `scriber` command. This will generate a
107
+ `scriber_output.txt` file in the same directory.
108
+
109
+ ```shell
110
+ scriber
111
+ ```
112
+
113
+ To target a different project directory:
114
+
115
+ ```shell
116
+ scriber /path/to/your/project
117
+ ```
118
+
119
+ ### 2\. First-Time Configuration
120
+
121
+ For a new project, run the interactive `init` command to create a `.scriber.json` configuration file. This will guide
122
+ you through setting up rules for ignoring files and respecting `.gitignore`.
123
+
124
+ ```shell
125
+ scriber init
126
+ ```
127
+
128
+ ### 3\. Advanced Example
129
+
130
+ Scan a different project, specify a custom output file, and copy the result to the clipboard all in one command.
131
+
132
+ ```shell
133
+ scriber ../my-other-project --output custom_map.txt --copy
134
+ ```
135
+
136
+ -----
137
+
138
+ ## Commands and Options
139
+
140
+ You can customize ProjectScriber's behavior with the following commands and options.
141
+
142
+ | Command/Option | Alias | Description |
143
+ |:----------------------|:-----:|:-------------------------------------------------------------------------------|
144
+ | `scriber [path]` | | Targets a specific directory. Defaults to the current working directory. |
145
+ | `init` | | Starts the interactive process to create a `.scriber.json` configuration file. |
146
+ | `--output [filename]` | `-o` | Specifies a custom name for the output file. |
147
+ | `--copy` | `-c` | Copies the final output directly to the clipboard. |
148
+ | `--tree-only` | | Generates only the folder structure map, excluding all file contents. |
149
+ | `--config [path]` | | Specifies the path to a custom configuration file. |
150
+
151
+ -----
152
+
153
+ ## Configuration
154
+
155
+ You can control ProjectScriber's behavior by placing a `.scriber.json` file in your project's root, which can be easily
156
+ created with the `scriber init` command.
157
+
158
+ **Example `.scriber.json`:**
159
+
160
+ ```json
161
+ {
162
+ "use_gitignore": true,
163
+ "exclude": [
164
+ "__pycache__",
165
+ "node_modules",
166
+ "*.log"
167
+ ],
168
+ "include": [
169
+ "*.py",
170
+ "*.js"
171
+ ]
172
+ }
173
+ ```
174
+
175
+ **Example `pyproject.toml`:**
176
+
177
+ ```toml
178
+ [tool.scriber]
179
+ use_gitignore = true
180
+ exclude = [
181
+ "__pycache__",
182
+ "node_modules",
183
+ "*.log",
184
+ ]
185
+ include = [
186
+ "*.py",
187
+ "*.js",
188
+ ]
189
+ ```
190
+
191
+ - **`use_gitignore`**: If `true`, all patterns in your `.gitignore` file will be used for exclusion.
192
+ - **`exclude`**: A list of file or folder name patterns to explicitly ignore.
193
+ - **`include`**: If provided, *only* files matching these patterns will be included in the output, overriding other
194
+ rules.
195
+
196
+ Settings can also be placed in your `pyproject.toml` file under the `[tool.scriber]` section. If a `.scriber.json` file
197
+ is present, it will take precedence over the `pyproject.toml` configuration.
@@ -0,0 +1,149 @@
1
+ # Introduction
2
+
3
+ <p align="center">
4
+ <img src="https://raw.githubusercontent.com/SunneV/ProjectScriber/main/assets/scriber_logo.svg" alt="ProjectScriber Logo" width="420">
5
+ </p>
6
+ <p align="center">
7
+ <img src="https://raw.githubusercontent.com/SunneV/ProjectScriber/main/assets/scriber_name.svg" alt="ProjectScriber Name" width="300">
8
+ </p>
9
+
10
+ A command-line tool to intelligently map and compile your entire project's source code into a single, context-optimized
11
+ text file for Large Language Models (LLMs).
12
+
13
+ ProjectScriber scans your project directory, respects `.gitignore` rules, applies custom filters, and bundles all
14
+ relevant code into a clean, readable format. It's the perfect way to provide a complete codebase to an AI for analysis,
15
+ documentation, or refactoring.
16
+
17
+ -----
18
+
19
+ ## Key Features
20
+
21
+ - **🌳 Smart Project Mapping:** Generates a clear and intuitive tree view of your project's structure.
22
+ - **⚙️ Intelligent Filtering:** Automatically respects `.gitignore` rules and supports custom `include` and `exclude`
23
+ patterns via a `.scriber.json` file for fine-grained control.
24
+ - **📊 In-depth Code Analysis:** Provides a summary with total file size, estimated token count (using `cl100k_base`),
25
+ and a language breakdown for a quick overview of your codebase.
26
+ - **✨ Interactive Setup:** A simple `scriber init` command walks you through creating a configuration file tailored to
27
+ your project.
28
+ - **📋 Clipboard Integration:** Use the `--copy` flag to automatically copy the entire consolidated output to your
29
+ clipboard, ready to be pasted into any application.
30
+ - **🔧 Flexible Configuration:** Manage your settings globally in a `pyproject.toml` file or per-project with a
31
+ `.scriber.json` file.
32
+
33
+ -----
34
+
35
+ ## Getting Started
36
+
37
+ ### Prerequisites
38
+
39
+ - Python 3.10 or higher.
40
+
41
+ ### Installation
42
+
43
+ Install the package from the source using pip. For development, include the optional dependencies.
44
+
45
+ ```shell
46
+ # Navigate to the project root directory
47
+ pip install .[dev]
48
+ ```
49
+
50
+ This will install `ProjectScriber` and make the `scriber` command available in your terminal.
51
+
52
+ -----
53
+
54
+ ## Usage
55
+
56
+ ### 1\. Basic Scan
57
+
58
+ To run ProjectScriber on the current directory, simply execute the `scriber` command. This will generate a
59
+ `scriber_output.txt` file in the same directory.
60
+
61
+ ```shell
62
+ scriber
63
+ ```
64
+
65
+ To target a different project directory:
66
+
67
+ ```shell
68
+ scriber /path/to/your/project
69
+ ```
70
+
71
+ ### 2\. First-Time Configuration
72
+
73
+ For a new project, run the interactive `init` command to create a `.scriber.json` configuration file. This will guide
74
+ you through setting up rules for ignoring files and respecting `.gitignore`.
75
+
76
+ ```shell
77
+ scriber init
78
+ ```
79
+
80
+ ### 3\. Advanced Example
81
+
82
+ Scan a different project, specify a custom output file, and copy the result to the clipboard all in one command.
83
+
84
+ ```shell
85
+ scriber ../my-other-project --output custom_map.txt --copy
86
+ ```
87
+
88
+ -----
89
+
90
+ ## Commands and Options
91
+
92
+ You can customize ProjectScriber's behavior with the following commands and options.
93
+
94
+ | Command/Option | Alias | Description |
95
+ |:----------------------|:-----:|:-------------------------------------------------------------------------------|
96
+ | `scriber [path]` | | Targets a specific directory. Defaults to the current working directory. |
97
+ | `init` | | Starts the interactive process to create a `.scriber.json` configuration file. |
98
+ | `--output [filename]` | `-o` | Specifies a custom name for the output file. |
99
+ | `--copy` | `-c` | Copies the final output directly to the clipboard. |
100
+ | `--tree-only` | | Generates only the folder structure map, excluding all file contents. |
101
+ | `--config [path]` | | Specifies the path to a custom configuration file. |
102
+
103
+ -----
104
+
105
+ ## Configuration
106
+
107
+ You can control ProjectScriber's behavior by placing a `.scriber.json` file in your project's root, which can be easily
108
+ created with the `scriber init` command.
109
+
110
+ **Example `.scriber.json`:**
111
+
112
+ ```json
113
+ {
114
+ "use_gitignore": true,
115
+ "exclude": [
116
+ "__pycache__",
117
+ "node_modules",
118
+ "*.log"
119
+ ],
120
+ "include": [
121
+ "*.py",
122
+ "*.js"
123
+ ]
124
+ }
125
+ ```
126
+
127
+ **Example `pyproject.toml`:**
128
+
129
+ ```toml
130
+ [tool.scriber]
131
+ use_gitignore = true
132
+ exclude = [
133
+ "__pycache__",
134
+ "node_modules",
135
+ "*.log",
136
+ ]
137
+ include = [
138
+ "*.py",
139
+ "*.js",
140
+ ]
141
+ ```
142
+
143
+ - **`use_gitignore`**: If `true`, all patterns in your `.gitignore` file will be used for exclusion.
144
+ - **`exclude`**: A list of file or folder name patterns to explicitly ignore.
145
+ - **`include`**: If provided, *only* files matching these patterns will be included in the output, overriding other
146
+ rules.
147
+
148
+ Settings can also be placed in your `pyproject.toml` file under the `[tool.scriber]` section. If a `.scriber.json` file
149
+ is present, it will take precedence over the `pyproject.toml` configuration.