Back to directory

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

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.

More in CLI tools

See all 181
  • grev

    github.com

    A set of Unix coreutils-style filters — grep, sort, cut and more — that answer a plain-language question about each record instead of matching a pattern, using a small decision model.

  • A Node.js script that exports a Google Doc to HTML and CSS with high fidelity, preserving headings, spacing, alignment, bullet lists, images and right-to-left text.

  • gpusched

    github.com

    A VRAM-aware GPU job scheduler for a single machine: declare how much memory each shell command needs, and it places jobs the moment a GPU has room and reports when a guess was wrong.