Skip to main content

An intelligent tool to map, analyze, and compile project source code for LLM context.

Project description

Introduction

ProjectScriber Logo

ProjectScriber Name

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 .gitignore rules and supports custom include and exclude patterns via a .scriber.json file 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 init command walks you through creating a configuration file tailored to your project.
  • 📋 Clipboard Integration: Use the --copy flag 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.toml file or per-project with a .scriber.json file.

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: If true, all patterns in your .gitignore file 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

project_scriber-1.0.0.tar.gz (62.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

project_scriber-1.0.0-py3-none-any.whl (12.3 kB view details)

Uploaded Python 3

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

Hashes for project_scriber-1.0.0.tar.gz
Algorithm Hash digest
SHA256 9c4b24ddb731d95111facbe6d825a96ad076eca46a9f30ffa4fef753fdd52e99
MD5 d7bcaf1296d95710647cdc6c27e91048
BLAKE2b-256 bf13a13564cb8eb3cced25e47ca88451c237e4330d35ca392051464a4627e4fc

See more details on using hashes here.

File details

Details for the file project_scriber-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for project_scriber-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 44103ed7d7a5d3f7aa88f88916de75a70840f6c39f9e558cea473118e5e39125
MD5 c8f2d60996b57d3ecc699d1ecd8afac6
BLAKE2b-256 4af5243b1251bb691ad1988339a4c85ab6a963c787b3437d7bc859e3c427e4ca

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page