# CoPa

A templating language and CLI tool for building structured prompts for large language models by pulling in content from local files and web pages.

CoPa is a prompt-engineering templating language and CLI tool for generating structured prompts for large language models. Placeholders embed the contents of local files or web pages directly into a prompt template, and auto-fenced blocks wrap the result in a Markdown code fence with a safe number of backticks.

It converts HTML to Markdown, supports directory-tree listings, glob-based file exclusion, nested templates, and strips import statements from TypeScript, TSX and Rust source before embedding it. It also tracks token counts against a model's context limit and respects a project's ignore file. It runs with a single npx command, needing no separate install, and is written in TypeScript.

Website: https://github.com/romansky/copa
