An intelligent tool to map, analyze, and compile project source code for LLM context.
Project description
Introduction
A command-line tool to intelligently map and compile your entire project's source code into a single, context-optimized text file for Large Language Models (LLMs).
ProjectScriber scans your project directory, respects .gitignore rules, applies custom filters, and bundles all
relevant code into a clean, readable format. It's the perfect way to provide a complete codebase to an AI for analysis,
documentation, or refactoring.
Key Features
- 🌳 Smart Project Mapping: Generates a clear and intuitive tree view of your project's structure.
- ⚙️ Intelligent Filtering: Automatically respects
.gitignorerules and supports customincludeandexcludepatterns via a.scriber.jsonfile for fine-grained control. - 📊 In-depth Code Analysis: Provides a summary with total file size, estimated token count (using
cl100k_base), and a language breakdown for a quick overview of your codebase. - ✨ Interactive Setup: A simple
scriber initcommand walks you through creating a configuration file tailored to your project. - 📋 Clipboard Integration: Use the
--copyflag to automatically copy the entire consolidated output to your clipboard, ready to be pasted into any application. - 🔧 Flexible Configuration: Manage your settings globally in a
pyproject.tomlfile or per-project with a.scriber.jsonfile.
Getting Started
Prerequisites
- Python 3.10 or higher.
Installation
Install the package from the source using pip. For development, include the optional dependencies.
# Navigate to the project root directory
pip install .[dev]
This will install ProjectScriber and make the scriber command available in your terminal.
Usage
1. Basic Scan
To run ProjectScriber on the current directory, simply execute the scriber command. This will generate a
scriber_output.txt file in the same directory.
scriber
To target a different project directory:
scriber /path/to/your/project
2. First-Time Configuration
For a new project, run the interactive init command to create a .scriber.json configuration file. This will guide
you through setting up rules for ignoring files and respecting .gitignore.
scriber init
3. Advanced Example
Scan a different project, specify a custom output file, and copy the result to the clipboard all in one command.
scriber ../my-other-project --output custom_map.txt --copy
Commands and Options
You can customize ProjectScriber's behavior with the following commands and options.
| Command/Option | Alias | Description |
|---|---|---|
scriber [path] |
Targets a specific directory. Defaults to the current working directory. | |
init |
Starts the interactive process to create a .scriber.json configuration file. |
|
--output [filename] |
-o |
Specifies a custom name for the output file. |
--copy |
-c |
Copies the final output directly to the clipboard. |
--tree-only |
Generates only the folder structure map, excluding all file contents. | |
--config [path] |
Specifies the path to a custom configuration file. |
Configuration
You can control ProjectScriber's behavior by placing a .scriber.json file in your project's root, which can be easily
created with the scriber init command.
Example .scriber.json:
{
"use_gitignore": true,
"exclude": [
"__pycache__",
"node_modules",
"*.log"
],
"include": [
"*.py",
"*.js"
]
}
Example pyproject.toml:
[tool.scriber]
use_gitignore = true
exclude = [
"__pycache__",
"node_modules",
"*.log",
]
include = [
"*.py",
"*.js",
]
use_gitignore: Iftrue, all patterns in your.gitignorefile will be used for exclusion.exclude: A list of file or folder name patterns to explicitly ignore.include: If provided, only files matching these patterns will be included in the output, overriding other rules.
Settings can also be placed in your pyproject.toml file under the [tool.scriber] section. If a .scriber.json file
is present, it will take precedence over the pyproject.toml configuration.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file project_scriber-1.0.0.tar.gz.
File metadata
- Download URL: project_scriber-1.0.0.tar.gz
- Upload date:
- Size: 62.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.19
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9c4b24ddb731d95111facbe6d825a96ad076eca46a9f30ffa4fef753fdd52e99
|
|
| MD5 |
d7bcaf1296d95710647cdc6c27e91048
|
|
| BLAKE2b-256 |
bf13a13564cb8eb3cced25e47ca88451c237e4330d35ca392051464a4627e4fc
|
File details
Details for the file project_scriber-1.0.0-py3-none-any.whl.
File metadata
- Download URL: project_scriber-1.0.0-py3-none-any.whl
- Upload date:
- Size: 12.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.19
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
44103ed7d7a5d3f7aa88f88916de75a70840f6c39f9e558cea473118e5e39125
|
|
| MD5 |
c8f2d60996b57d3ecc699d1ecd8afac6
|
|
| BLAKE2b-256 |
4af5243b1251bb691ad1988339a4c85ab6a963c787b3437d7bc859e3c427e4ca
|