Skip to main content

⚡ PyAct CLI

The engine behind dynamic Markdown.

The PyAct CLI allows you to compile .pamd files into standard Markdown (.md). It evaluates your Python logic, injects your variables, and builds complex markdown elements effortlessly.

🚀 Installation

Install it directly from PyPI:

pip install pyact-cli

📖 How it works

A .pamd file contains exactly one Markdown cell and may contain multiple Python cells. Python cells are concatenated in order before execution.

1. Write your Python logic

Define a context() function that returns the variables you want to inject. You can even use the built-in pamd_helpers to do heavy lifting!

import pamd_helpers

def context():
    # Automatically converts the lambda to LaTeX!
    equation = pamd_helpers.equation(lambda x: x**2, [5])
    
    return {
        "title": "My PyAct Document",
        "math": equation
    }

2. Write your Markdown

Use <ctx> tags to inject your Python variables anywhere in your text.

# <ctx>title</ctx>

Here is my dynamically generated equation:
<ctx>math</ctx>

You can also include other pamd files as templates!
<tmp>path/to/another_file</tmp>

3. Use Global Variables <glb>

If you have data you want to access everywhere across multiple nested files (like an author name or project ID), simply create a global.py file in your root folder:

def global_context():
    return {"author": "Jane Doe"}

You can then inject this data into any Markdown cell using the <glb> tag!

Written by <glb>author</glb>

4. Compile to Markdown

Run the compiler from your terminal to generate your final Markdown document:

pyact path/to/your_file.pamd -o output.md

Use --no-cache to force a rebuild without reading cached Markdown, or --clear-cache to remove the project's .pamd-cache directory before building:

pyact path/to/your_file.pamd --no-cache
pyact path/to/your_file.pamd --clear-cache

5. Compile to Word (DOCX)

You can also compile straight to a native Microsoft Word Document, complete with CSS styling!

pyact path/to/your_file.pamd -o output.md --docx output.docx

Note: If you have a style.css file in the same directory, PyAct will automatically load it to style your Word Document. You can also specify one manually using the --css path/to/style.css flag!

6. Configure Word Export via pamd.conf

Control document metadata, running headers, and footers with a pamd.conf file:

[Header]
left = My Project
right = 2026

[Footer]
left = Confidential
center = Page {page} of {pages}

[Metadata]
author = Jane Doe
title = Monthly Report

PyAct will automatically detect pamd.conf in your directory, inject dynamic page numbers ({page} / {pages}), configure tab stops, and populate document metadata!

7. Scaffolding New Projects with pyact init

Quickly spin up a new project ready to compile:

pyact init my_project --template engineering

Templates: default, engineering, academic.

That's it! You now have documents ready to be shared, published, or distributed.

Metadata

Release files for pyact-cli 1.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pyact-cli 1.2.0
File Size Uploaded Provenance Actions
pyact_cli-1.2.0.tar.gz 35.1 kB Without provenance Details for pyact_cli-1.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pyact-cli 1.2.0
File Interpreter ABI Platform Actions
pyact_cli-1.2.0-py3-none-any.whl Python 3 none any Details for pyact_cli-1.2.0-py3-none-any.whl

Total release size: 71.1 kB

Release files / pyact_cli-1.2.0.tar.gz

Download URL pyact_cli-1.2.0.tar.gz
Size 35.1 kB
Tags Source
SHA-256 checksum
How to use checksums
0d8a1ffac738a04f4537e8e61771eab755e8adbebbfbaa3ad28fddcb9cd7f767
BLAKE2b-256 checksum
How to use checksums
6a8cd0ea7646a6b46dd4e2c30da162daea0f0c7c1e2ac3034c989fa0228ea6d7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.6

Release files / pyact_cli-1.2.0-py3-none-any.whl

Download URL pyact_cli-1.2.0-py3-none-any.whl
Size 36.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e0ee2a8f032d6d4b8611107d44821bfc03d78c4a8c5c3af7e1596677b77f982f
BLAKE2b-256 checksum
How to use checksums
502678fd2d6f0eb66c8cded06024cabcb5d32e6dddb474dcfa26ed836b8e071f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.6

Security for pyact-cli 1.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page