cogapp
« Back to VersTracker
Description:
Small bits of Python computation for static files
Type: Formula  |  Latest Version: 3.6.0@0  |  Tracked Since: Dec 17, 2025
Links: Homepage  |  formulae.brew.sh
Category: Developer tools
Tags: code-generation python static-sites developer-tools
Install: brew install cogapp
About:
Cog is a code generator that allows you to embed Python code in source files. It executes the embedded code and inserts the output back into the file, enabling dynamic content generation for static files. This is particularly useful for maintaining documentation, generating boilerplate code, or keeping data structures in sync.
Key Features:
  • Embed Python code directly in any text file
  • Idempotent generation: output is safely replaced on re-runs
  • Supports multiple output formats and languages
  • Lightweight with no runtime dependencies
Use Cases:
  • Generating repetitive code or configuration files
  • Keeping documentation examples synchronized with actual code
  • Creating data-driven static assets
Alternatives:
  • Jinja2 – Jinja2 is a full templating engine, whereas Cog executes arbitrary Python to generate content within existing files.
License: MIT
Dependencies: python@3.14
Bottles available for: all
Version History
Detected Version Rev Change Commit
Oct 12, 2025 9:32am 0 VERSION_BUMP 3a42941c