AI-powered content framework for Streamlit — create presentations, courses, and web-books with Claude or Cursor, no coding required.
Project description
StreamTeX
AI-powered content framework for Streamlit — create presentations, courses, and web-books with Claude or Cursor. No coding required.
StreamTeX combines a modular block architecture with AI-powered workflows. Describe your project in natural language, and let Claude or Cursor build it — or use the Python API for full control.
Getting Started
StreamTeX supports 4 installation levels. Pick the one that fits your needs.
Quick Start (minimal, no workspace)
From zero to a running project in 3 commands:
uv tool install "streamtex[cli]" -U
stx project new my-project
cd my-project && uv sync && stx run
Standard Setup (recommended)
Full workspace with rich templates, documentation, and Claude AI profiles:
uv tool install "streamtex[cli]" -U
mkdir streamtex-dev && cd streamtex-dev
stx install
stx update
stx project new my-project --template project # CLI templates: project, collection, slides
cd projects/my-project
stx claude install project .
stx run
Full Setup (all optional features)
Everything above, plus AI image generation, PDF export, and live inspector:
uv tool install "streamtex[cli]" -U
mkdir streamtex-dev && cd streamtex-dev
stx install --preset power --project my-project --template project
stx update
cd projects/my-project
stx run
The power preset automatically installs PDF export, AI image generation, and the live
inspector into your project. To add Playwright for PDF export, run:
uv run playwright install chromium
Each uv add installs optional features into the current project's environment.
Pick only what you need — or install individual AI providers:
uv add "streamtex[ai-openai]" # OpenAI only
uv add "streamtex[ai-google]" # Google Imagen only
uv add "streamtex[ai-fal]" # fal.ai only
AI image generation requires API keys in your
.envfile:STX_OPENAI_API_KEY,STX_GOOGLE_AI_KEY,STX_FAL_KEY(only the providers you use). See the AI Guide for configuration details.
Prerequisites: Python 3.11+, git, uv.
Zero-Code with Claude or Cursor
Install StreamTeX and a Claude AI profile, then let the AI build your project:
uv tool install "streamtex[cli]" -U
mkdir streamtex-dev && cd streamtex-dev
stx install && stx update
stx project new my-project
cd projects/my-project
stx claude install project .
Open in Claude Code or Cursor, then use slash commands:
/stx-project:project-init
> "Create a Docker course with 12 slides, dark theme,
> table of contents and page navigation"
The AI agent designs the project structure, proposes it for your approval, and generates all files — blocks, styles, book.py — ready to run:
stx run
See the AI Guide for all commands, agents, and workflows.
Code-First with Python
import streamlit as st
import streamtex as sx
from streamtex.styles.core import Style
st.set_page_config(page_title="My Book", layout="wide")
style = Style("color: navy; font-size: 1.2em;", "my-style")
sx.st_write(style, "Hello StreamTeX!")
stx run app.py
Manual Installation (without stx CLI)
pip install streamtex
git clone https://github.com/nicolasguelfi/streamtex-claude.git
mkdir my-project && cd my-project
python ../streamtex-claude/install.py project .
stx run
Workspace Presets
The stx install command supports 5 presets:
| Preset | Repos | Extras (with --project) | Use case |
|---|---|---|---|
basic |
none | Workspace only, upgrade later | |
user |
streamtex-claude | + Claude AI profiles | |
standard (default) |
streamtex-docs + streamtex-claude | pdf, ai | + rich templates + local docs |
power |
streamtex-docs + streamtex-claude | pdf, ai, inspector | + all extras, requires --project |
developer |
all 3 repos | pdf, ai, inspector | + library source + editable install |
stx install --preset user # Claude profiles only
stx install # standard (default)
stx install --preset developer # full developer setup
stx install --preset power --project my-project # all extras with a project
Upgrade an existing workspace to a higher preset:
stx install --preset developer
stx update
Optional Extras
StreamTeX uses optional dependency groups so you install only what you need:
uv add "streamtex[ai]" # AI image generation (OpenAI + Google Imagen + fal.ai)
uv add "streamtex[ai-openai]" # AI images — OpenAI only
uv add "streamtex[ai-google]" # AI images — Google Imagen only
uv add "streamtex[ai-fal]" # AI images — fal.ai only
uv add "streamtex[pdf]" # PDF export via Playwright
uv add "streamtex[inspector]" # Live code inspector sidebar
uv add "streamtex[cli]" # stx CLI (already installed as a global tool above)
See the AI Image Generation section in the AI Guide for configuration and usage.
AI-Powered Features
StreamTeX ships with 22 slash commands, 4 specialized agents, and 10 block templates for AI-assisted development.
Project Creation & Customization
| Command | What it does |
|---|---|
/stx-project:project-init |
Create a complete project from a natural-language description |
/stx-project:project-customize |
Change theme, typography, navigation without editing code |
/stx-project:course-generate |
Generate book.py structure from a CSV block list |
/stx-project:collection-new |
Create a multi-project hub |
Design & Content
| Command | What it does |
|---|---|
/stx-designer:slide-new |
Create slides from descriptions |
/stx-designer:slide-audit |
Validate design rules (font sizes, line lengths, spacing) |
/stx-designer:slide-fix |
Auto-fix design violations |
/stx-designer:style-audit |
Check styles for consistency |
Migration
| Command | What it does |
|---|---|
/stx-migration:html-migrate |
Convert HTML (Google Docs) to StreamTeX blocks |
/stx-migration:html-convert-batch |
Batch conversion of multiple files |
/stx-migration:conversion-audit |
Audit conversion quality |
AI Agents
| Agent | Role |
|---|---|
| Project Architect | Designs project structure from natural language |
| Slide Designer | Creates pedagogically structured, polished slides |
| Slide Reviewer | Reviews and validates completed slides |
| Presentation Designer | Specialist for live projection (large fonts, minimal text) |
See the AI Guide for the complete reference.
Claude & Cursor Integration
StreamTeX provides installable AI profiles via streamtex-claude:
| Profile | Audience | Commands | Agents |
|---|---|---|---|
| project | Content creators | 19 | 3 |
| presentation | Live presenters | +3 | +1 |
| documentation | Manual authors | 10 | 2 |
| library | Library developers | 3 | — |
Install a profile:
stx claude install project ./my-project
Features
- Styled text —
st_writewith tuple support for inline mixed-style text - CSS Grid layouts —
st_gridwith responsive columns - Block containers —
st_block/st_spancontext managers - Lists —
st_listwith ul/ol, custom bullets, centered alignment - Images —
st_imagewith base64 encoding and MIME detection - AI image generation —
st_ai_image/st_ai_image_widgetwith OpenAI, Google Imagen, fal.ai - Code blocks —
st_codewith Pygments syntax highlighting - Diagrams — Mermaid, PlantUML, TikZ with pan/zoom
- LaTeX — math formulas and full documents
- Bibliography — BibTeX/RIS/CSL-JSON import, citations, formatted references
- Book orchestration —
st_bookwith paginated and continuous modes - Table of Contents — auto-numbering and anchor navigation
- Navigation markers — slide-like PageUp/PageDown navigation
- Collections — multi-project hubs with TOML configuration
- HTML export — self-contained dual-rendering pipeline
- Style composition —
Styleobjects with+/-operators - Zoom controls — CSS-based width and zoom adjustments
- Block inspector — live code editor in sidebar (optional)
- Block helpers — DI-injectable helpers with 3 usage modes
Documentation
Online manuals (read & explore)
Examples (source code)
The manuals are also available as source code — clone and run them locally to study the examples:
git clone https://github.com/nicolasguelfi/streamtex-docs
cd streamtex-docs
uv sync
cd manuals/stx_manual_intro && stx run
See streamtex-docs for the full list of example projects.
Reference
- AI Guide — zero-code workflows with Claude/Cursor
- Cheatsheet (EN)
- Coding Standards
Project Structure
A StreamTeX project follows this layout:
my-project/
├── .claude/ # AI profiles (commands, skills, agents)
├── .streamlit/
│ └── config.toml # enableStaticServing = true
├── blocks/
│ ├── __init__.py # Block registry
│ └── bck_intro.py # Your blocks (build() function each)
├── static/
│ └── images/ # Static assets
├── custom/
│ └── styles.py # Project-specific styles
└── book.py # Entry point with st_book()
Installation
# Install or upgrade the CLI as a global tool
uv tool install "streamtex[cli]" -U
# Or as a project dependency
uv add streamtex
Optional extras:
uv add "streamtex[cli]" # stx CLI commands
uv add "streamtex[inspector]" # Live code inspector sidebar
uv add "streamtex[ai]" # AI image generation (OpenAI + Google Imagen + fal.ai)
uv add "streamtex[ai-openai]" # AI images — OpenAI only
uv add "streamtex[ai-google]" # AI images — Google Imagen only
uv add "streamtex[ai-fal]" # AI images — fal.ai only
uv add "streamtex[pdf]" # PDF export via Playwright
Prerequisites
- Python >= 3.11
- uv (recommended package manager)
- git
Project Configuration
StreamTeX projects using from streamtex import * require this ruff config
in pyproject.toml (automatically generated by stx project new):
[tool.ruff.lint]
ignore = ["F403", "F405", "E701", "E741"]
If your project uses [tool.uv.sources] for editable installs, set
UV_NO_SOURCES=1 in CI environments so uv resolves from PyPI instead
of local paths.
Keeping Up to Date
Update the CLI
The stx CLI is installed as a global tool with its own frozen copy of
the library. You must upgrade it explicitly after each release:
uv tool install "streamtex[cli]" -U
Update your workspace
cd streamtex-dev/
stx update # pulls repos, syncs deps, updates profiles
Fine-grained control:
stx update --skip-sync # skip uv sync
stx update --skip-profiles # skip Claude profile update
Check workspace status
stx status # show preset, repos, profiles, project list
Upgrade a project
stx project upgrade # upgrade project deps and extras to match current preset
Update a standalone project (no workspace)
cd my-project/
uv add streamtex --upgrade # update the library dependency
Use
/stx-guide updateinside Claude Code for guided assistance.
Report Issues & Feedback
Found a bug? Have a suggestion? We'd love to hear from you.
- Bug report: Open a bug report — include the error message, steps to reproduce, and your environment
- Feature request: Request a feature — describe the problem and your proposed solution
- Questions & discussions: GitHub Discussions — ask questions, share ideas, show your projects
When reporting a bug, please include:
- The full error traceback (copy-paste from the terminal)
- The command you ran (e.g.
stx project new,/stx-designer:init,stx run) - Your StreamTeX version (
uv pip show streamtex | grep Version)
Contributing
See CONTRIBUTING.md for guidelines on code, content, and AI profile contributions.
Support the Project
If StreamTeX is useful to you, consider sponsoring the project to help maintain and improve it.
License
BUSL-1.1 — Copyright (c) 2026 Nicolas Guelfi Converts to Apache 2.0 on 2030-11-29.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file streamtex-0.4.17.tar.gz.
File metadata
- Download URL: streamtex-0.4.17.tar.gz
- Upload date:
- Size: 1.3 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a882ad2a55b55e3a62ab5233ceb7be4edf0d418ad60797b7d717c880dc866dd6
|
|
| MD5 |
d81a519abc9b9243b221effdc4c7f4a6
|
|
| BLAKE2b-256 |
3478e786b9cef7b05d6fd74b9a6db6e9c789933e67c8e71a84e2f8b1c4914866
|
File details
Details for the file streamtex-0.4.17-py3-none-any.whl.
File metadata
- Download URL: streamtex-0.4.17-py3-none-any.whl
- Upload date:
- Size: 1.4 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
43efa47a6710d68ae67afb116908421c70028749168f9de0093bf063ac126b98
|
|
| MD5 |
28997bd8a4e84043b72e804b170b6ace
|
|
| BLAKE2b-256 |
724fb75d3f793ab447fa9f55a27da08f9b51c371c5a1ad934ffe93fd8b3da004
|