promptext

module
v0.2.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 19, 2024 License: MIT

README ΒΆ

promptext

πŸ“ Smart code context extractor for AI assistants

Go Report Card Release Documentation

promptext is an intelligent code context extraction tool designed specifically for AI assistant interactions. It analyzes your codebase, filters relevant files, estimates token usage using tiktoken (GPT-3.5/4 compatible), and provides formatted output suitable for AI prompts.

Key Features

  • πŸ” Smart file filtering with .gitignore support and intelligent defaults
  • πŸ“Š Accurate token counting using tiktoken (GPT-3.5/4 compatible)
  • πŸ—‚οΈ Comprehensive project analysis (entry points, configs, core files, tests, docs)
  • πŸ“ Multiple output formats (Markdown, XML)
  • πŸ”§ Configurable via CLI flags or .promptext.yml
  • πŸ“ˆ Project metadata extraction (language, version, dependencies)
  • πŸ”„ Git repository information extraction
  • ⚑ Performance monitoring and debug logging

Quick Install

Linux/macOS:

curl -sSL https://raw.githubusercontent.com/1broseidon/promptext/main/scripts/install.sh | bash

Windows (PowerShell):

irm https://raw.githubusercontent.com/1broseidon/promptext/main/scripts/install.ps1 | iex

Using Go:

go install github.com/1broseidon/promptext/cmd/promptext@latest
Windows Installation Options
  • System-wide installation (requires admin): Run PowerShell as Administrator and use the command above
  • User installation: Add -UserInstall flag to install for current user only
  • Manual installation: Download the Windows binary from the releases page

Basic Usage

# Process current directory
prx

# Process specific file types
prx -e .go,.js

# Show project summary
prx -i

# Export as XML with debug logging
prx -f xml -o project.xml -D

# Process with custom exclusions and verbose output
prx -x "test/,vendor/" -v

Configuration

Create a .promptext.yml in your project root:

extensions:
  - .go
  - .js
excludes:
  - vendor/
  - "*.test.go"
format: markdown
verbose: false

Documentation

Visit our documentation site for:

  • πŸ“š Getting Started Guide
  • βš™οΈ Configuration Options
  • πŸ” File Filtering Rules
  • πŸ“Š Token Analysis
  • πŸ”¬ Project Analysis Features
  • πŸ“ Output Format Specifications
  • ⚑ Performance Tips

License

MIT License - see LICENSE for details.

Directories ΒΆ

Path Synopsis
cmd
internal
log

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL