Skip to content

pm_encoder v1.5.0 - Enhanced Init-Prompt 🌳

Choose a tag to compare

@alanbld alanbld released this 14 Dec 08:15
· 164 commits to main since this release

🌳 Enhanced Init-Prompt with Directory Tree & Stats

pm_encoder v1.5.0 improves the AI CLI integration with visual directory trees and project statistics.

✨ What's New

1. Directory Tree Visualization 🌳

Generated instruction files now include a visual project structure:

pm_encoder/
β”œβ”€β”€ crates/
β”‚   β”œβ”€β”€ utf8dok-ast/
β”‚   β”œβ”€β”€ utf8dok-cli/
β”‚   └── utf8dok-core/
β”œβ”€β”€ docs/
β”œβ”€β”€ rust/
β”œβ”€β”€ tests/
└── pm_encoder.py
  • 3-level depth by default
  • Respects .pm_encoder_config.json ignore patterns
  • Directories marked with / suffix

2. File Statistics πŸ“Š

Each generated file now shows:

  • File count: Number of files in context
  • Context size: Bytes and KB
**Statistics:**
- Files: 42
- Context size: 189,234 bytes (184.8 KB)

3. Improved Multi-AI Support 🎁

Both targets benefit from enhancements:

Target Output Format
claude CLAUDE.md + CONTEXT.txt Markdown
gemini GEMINI.md + CONTEXT.txt Plain text

πŸ“Š Example Output

CLAUDE.md (v1.5.0)

# my_project

## Project Overview
my_project - Context automatically generated by pm_encoder

## Commands
- `cargo build`
- `cargo test`

## Project Structure

\`\`\`
my_project/
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ lib.rs
β”‚   └── main.rs
β”œβ”€β”€ tests/
└── Cargo.toml
\`\`\`

**Statistics:**
- Files: 5
- Context size: 12,345 bytes (12.1 KB)

For complete context, see `CONTEXT.txt`.

πŸš€ Usage

# Generate with directory tree & stats
pm_encoder . --init-prompt

# Different lenses
pm_encoder . --init-prompt --init-lens debug
pm_encoder . --init-prompt --init-lens security

# Multi-AI
pm_encoder . --init-prompt --target gemini

πŸ“ˆ Test Status

  • Python Tests: 93/93 passing βœ…
  • Rust Tests: 8/8 passing βœ…
  • Coverage: 95% maintained

πŸ”— Also in This Release

Rust v0.2.0 released alongside:

  • Core serialization complete
  • Plus/Minus format (byte-identical with Python)
  • MD5 checksums
  • Binary detection

See rust-v0.2.0 for details.


πŸ“¦ Installation

curl -O https://raw.githubusercontent.com/alanbld/pm_encoder/main/pm_encoder.py
chmod +x pm_encoder.py
./pm_encoder.py --version  # 1.5.0

Changelog: v1.4.0...v1.5.0