Skip to main content

Composable Markdown trees using @ references

Project description

SpecTree Python Implementation

A Python CLI for SpecTree - composable Markdown files using @ references.

Installation

# From PyPI
pip install spectree-md

# Or from source:
git clone https://github.com/fuzzycomputer/spectree
cd spectree/python
uv tool install .

Usage

The CLI follows the Unix philosophy - pipe in, pipe out:

# Primary usage: stdin to stdout
cat app.md | spectree > output.md

# Convenience: file argument
spectree app.md > output.md

# Output to terminal
spectree app.md

Project Structure

python/
├── README.md                # User-facing documentation
├── README.spec.md           # Implementation details
├── TESTING.spec.md          # Test spec
├── pyproject.toml           # Package configuration
├── src/
│   └── spectree/
│       ├── __init__.py
│       ├── core.py          # Core render() function
│       └── cli.py           # CLI wrapper
└── tests/
    ├── test_core.py         # Core logic tests
    └── test_cli.py          # CLI interface tests

Development

Setup

# Install uv (fast Python package manager)
# https://docs.astral.sh/uv/

# Create and activate virtual environment
uv venv
source .venv/bin/activate

# Install in development mode with all dependencies
uv pip install -e ".[dev]"

Testing

# Run all tests
pytest

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

spectree_md-0.1.0.tar.gz (9.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

spectree_md-0.1.0-py3-none-any.whl (4.3 kB view details)

Uploaded Python 3

File details

Details for the file spectree_md-0.1.0.tar.gz.

File metadata

  • Download URL: spectree_md-0.1.0.tar.gz
  • Upload date:
  • Size: 9.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.7.13

File hashes

Hashes for spectree_md-0.1.0.tar.gz
Algorithm Hash digest
SHA256 935a5dc758b99b90edb8da346f1fa0fc7d341a8d4c3720b20ae16731f6f2e655
MD5 87a8b42c0cddcdfb5c21add63f3e138d
BLAKE2b-256 8e67c69e0d9eb7b332d85e34620f2e5991c9f572438fa3f3c742a889e3c41a01

See more details on using hashes here.

File details

Details for the file spectree_md-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for spectree_md-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3d29967938bf4c9b6c75617a3cc976745edce5a7b5e75212dc4072429799f1d5
MD5 e7384d9d6ff262ca0e3d3d1811ea02e7
BLAKE2b-256 005559974e38485cb067f9bc1848795c0005f693653200eebad8c649c8a66277

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page