PromptMap is a .NET console application that transforms Visual Studio solutions into structured AI-friendly context files. By scanning .sln files or directories of .cs files, it produces a detailed map of your project, enabling better assistance from coding tools like ChatGPT.
PromptMap is a powerful .NET console application that streamlines the process of providing context to AI coding assistants like ChatGPT. This tool scans Visual Studio solution files (.sln) or directories containing .cs files and generates a structured map of your project, detailing files, namespaces, classes, methods, and properties.
With the output specifically designed to be AI-friendly, users can easily paste this structured information into ChatGPT to enhance the quality of coding assistance and to ensure accurate and relevant responses while discussing project details.
.sln files or directories, making it comprehensive and easy to use.To use PromptMap, simply run:
promptmap --solution <path-to.sln> [options]
promptmap --dir <path-to-directory> [options]
The application provides several command-line options for flexibility:
| Option | Description |
|---|---|
--solution <path> | Specify the path to the .sln file |
--dir <path> | Specify the path to the directory to scan |
--out <path> | Set output file path (default is stdout) |
--include-private | Choose to include private members in the output |
--include-ctors | Option to include constructors in the mapping |
-h, --help | Display help information |
Here’s an example of PromptMap generating a structure for itself:
PromptMap
└─ PromptMap
├─ <global namespace>
│ └─ Program
│ ├─ Method Task<int> Main(string[] args) [public]
├─ PromptMap.Cli
│ ├─ ArgParser
│ │ ├─ Method Options Parse(string[] args) [public]
│ │ ├─ Method void PrintHelp(bool error) [public]
│ ├─ Node
│ │ ├─ Property string Name { get; } [public]
│ │ ├─ Property SortedDictionary<string, Node> Children { get; } [public]
│ │ ├─ Property List<string> Lines { get; } [public]
│ └─ Options
│ ├─ Property string? SolutionPath { get; set; } [public]
│ ├─ Property string? DirPath { get; set; } [public]
│ ├─ Property string? OutPath { get; set; } [public]
│ ├─ Property bool IncludePrivate { get; set; } [public]
│ ├─ Property bool IncludeCtors { get; set; } [public]
├─ PromptMap.Cli.Analysis
│ └─ RoslynWalker
│ ├─ Method Task<Node> FromSolutionAsync(string solutionPath, bool includePrivate, bool includeCtors, CancellationToken ct) [public]
│ ├─ Method Node FromDirectory(string dirPath, bool includePrivate, bool includeCtors, CancellationToken ct) [public]
└─ PromptMap.Cli.Printing
└─ TreePrinter
├─ Method string Print(Node root) [public]
Providing the right context to AI coding assistants is essential for effective collaboration. Rather than manually describing project structures or pasting in files, PromptMap offers a comprehensive overview in a condensed, easy-to-read format, ensuring that AI tools can assist users more accurately and effectively.
You might like to look at ZOSCII repo's ZOSCII CHAT - it does almost the same thing as ClipBin but with a difference - and of course it isn't targetted towards the same audience. ZOSCIICHAT is a 100% secure chat with no message data stored on the server so it can never be compromised by someone one-day being able to decrypt it.
Sign in to comment.