Skip to main content

Welcome to Petk Documentation

Petk is a comprehensive CLI toolkit designed specifically for prompt engineering workflows and template-driven content management. This documentation follows the DiΓ‘taxis framework to help you find exactly what you need, when you need it.

Getting Started​

New to Petk? Start with our Learning section for step-by-step tutorials and guides.

Need Help?​

Having trouble with something specific? Check our Problem-Solving section for solutions to common issues.

Quick Reference​

Looking for specific technical details? Our Reference section has comprehensive API documentation and configuration details.

Understanding Petk​

Want to understand the concepts and design decisions behind Petk? Explore our Explanation section for architectural insights.

What is Petk?​

Petk is a prompt engineering toolkit that provides:

  • Advanced Template Engine: Dynamic content inclusion with glob patterns, variable substitution, recursive processing, and cycle detection
  • Markdown-to-YAML Converter: Transform documentation into structured data with multimodal content support and rich document analysis
  • CLI Tools: Complete command-line interface for template processing, validation, conversion, and watch mode development
  • Monorepo Architecture: Clean, maintainable TypeScript codebase with modular package structure

Key Capabilities​

Template Processing​

  • Complex include blocks with YAML configuration
  • Glob pattern matching with multiple sorting options (alphabetical, last updated)
  • Deterministic content sampling and depth limit controls
  • Variable substitution with recursive resolution
  • Comprehensive cycle detection and error handling

Content Conversion​

  • Markdown to YAML transformation with AST processing
  • Multimodal content detection and handling
  • Rich document structure analysis
  • Robust error reporting and recovery

Development Integration​

  • Watch mode for real-time template processing
  • Template validation and error reporting
  • Project initialization and configuration management
  • Seamless integration with modern development workflows

This documentation is organized into four main sections based on what you're trying to accomplish:

πŸ“š Learning​

Step-by-step tutorials and guides for newcomers. Start here if you're new to Petk or want to learn specific workflows.

πŸ”§ Problems​

Solutions to specific issues and troubleshooting guides. Use this when you're stuck on something particular.

πŸ“– Reference​

Technical reference, API documentation, and configuration options. Use this for quick lookups and detailed specifications.

πŸ’‘ Explanation​

Concepts, architectural decisions, and design philosophy. Use this to understand the "why" behind Petk's design.


Ready to get started? Choose the section that matches your current goal.