Skip to content

ProjectScribe is a lightweight C++ command-line tool that scans your project's directory, generates a clean file structure report, and includes the contents of all relevant source files. Useful for sharing your project with friends, collaborators, or language models for review and documentation.

License

Notifications You must be signed in to change notification settings

Sam1624/ProjectScribe

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

📝 ProjectScribe

ProjectScribe is a command-line utility written in C++ that helps you quickly and easily generate a textual representation of your project structure. It's especially useful when sharing your project with others — be it a friend, a colleague, or an LLM (Large Language Model) — for review, analysis, or documentation.


🔧 Features

  • 📁 Generates a full project structure with folders, text files, and binary files
  • 🧹 Supports both .gitignore and .psignore for excluding files and directories
  • 📄 Includes the contents of all text files in the final output file (project_structure.txt)
  • 🧠 Detects binary files based on null byte signatures

🚀 Usage

./project_scribe [path] [options]

Arguments:

  • path — path to the root project directory (defaults to the current directory)

Options:

  • --use-gitignore — use .gitignore instead of .psignore
  • --help or -h — display help message

Example:

./project_scribe ./my_project --use-gitignore

After execution, the tool generates a project_structure.txt file containing:

  • A hierarchy of files and folders
  • Indication of binary files
  • Contents of all readable text files

🧾 About .psignore

ProjectScribe supports its own ignore format file called .psignore, and can also fall back to .gitignore if --use-gitignore is specified.

The .psignore file must be placed at the root of the project being scanned. If the file is not found, a default ignore list will be used.

Example .psignore:

# This is a comment, it will be ignored.
# Add folder or file names to skip here.
# One entry per line.

# Folders
.idea
out/
dist/

# Files
CMakeCache.txt
compile_commands.json

# Extensions (must start with a dot)
.log
.tmp
.bak

📂 Project Structure

ProjectScribe/
├── .gitignore
├── CMakeLists.txt
├── include/
│   └── ProjectScanner.hpp
└── src/
    ├── main.cpp
    └── ProjectScanner.cpp

📌 Sample Output (project_structure.txt)

📁 Full project structure: ~/ProjectScribe

[FILE] .gitignore
[FILE] CMakeLists.txt
[DIR] include/
  [FILE] ProjectScanner.hpp
[DIR] src/
  [FILE] ProjectScanner.cpp
  [FILE] main.cpp

📄 File contents:

[FILE] CMakeLists.txt:
--------------------
cmake_minimum_required(VERSION 3.16)
project(ProjectScribe)
...
--------------------

[FILE] src/main.cpp:
--------------------
#include "ProjectScanner.hpp"
...
--------------------

📋 Requirements

  • C++17 compatible compiler
  • CMake ≥ 3.16

⚙️ Build

git clone https://github.com/Sam1624/ProjectScribe.git
cd ProjectScribe 
mkdir build && cd build
cmake ..
make
./project_scribe --help

📜 License

This project is licensed under the MIT License. See the LICENSE file for details.

About

ProjectScribe is a lightweight C++ command-line tool that scans your project's directory, generates a clean file structure report, and includes the contents of all relevant source files. Useful for sharing your project with friends, collaborators, or language models for review and documentation.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published