Open source doc / excel / ppt skills for LLMs - Groq, Ollama, vLLM, any OpenAI-compatible endpoint.
Project description
altr
Open source doc / excel / ppt skills for LLMs.
Claude has document skills. ChatGPT has them. Open-weight models don't.
Point gpt-oss-120b on Groq (or any model behind an OpenAI-compatible API) at
altr and it gains three tools it can call to produce real files:
| Tool | Output | Good for |
|---|---|---|
create_document |
.docx |
reports, guides, letters, meeting notes |
create_spreadsheet |
.xlsx |
budgets, trackers, datasets - with formulas |
create_presentation |
.pptx |
pitch decks, talks - with speaker notes |
The model sends structured JSON through standard tool calling; altr
validates it (Pydantic) and renders it (python-docx, openpyxl,
python-pptx). Renderer errors are fed back to the model so it can correct
itself. No code execution, no sandboxes - the model can only emit document
content.
Install
pip install altr-oss
The PyPI distribution is altr-oss; the import and the CLI command are both
plain altr.
Or straight from the repo:
pip install git+https://github.com/PasinduSuraweera/altr-oss
Quickstart (CLI)
export GROQ_API_KEY=gsk_...
altr make "Create a 6-slide pitch deck for a solar-powered drone startup"
altr make "Make a 12-month SaaS budget spreadsheet with formula totals"
altr make "Write a 2-page onboarding doc for new backend engineers"
Files land in ./output. Works with any OpenAI-compatible server:
# Groq (default)
altr make "..." --model openai/gpt-oss-120b
# Ollama, fully local
altr make "..." --base-url http://localhost:11434/v1 --model llama3.3 --api-key ollama
# vLLM / LM Studio / anything else that speaks chat completions
altr make "..." --base-url http://localhost:8000/v1 --model my-model
Render a JSON spec directly, no model involved (great for testing):
altr render presentation examples/pitch-deck.json
altr render spreadsheet examples/budget.json
altr render document examples/onboarding-doc.json
Use it as a library
from altr import OfficeAgent
agent = OfficeAgent(model="openai/gpt-oss-120b", out_dir="out")
result = agent.run("Create a quarterly report with a KPI table")
print(result.files) # [PosixPath('out/quarterly-report.docx')]
print(result.reply) # the model's final message
Use it as a skill in your own agent
Already have an agent loop? Take just the tools:
from altr import SYSTEM_PROMPT, get_tools, dispatch
response = client.chat.completions.create(
model="openai/gpt-oss-120b",
messages=[{"role": "system", "content": SYSTEM_PROMPT}, ...],
tools=get_tools(), # OpenAI-format tool definitions
)
for call in response.choices[0].message.tool_calls:
result = dispatch(call.function.name, call.function.arguments, out_dir="out")
# {"ok": True, "file": "out/report.docx"} - or {"ok": False, "error": ...}
dispatch never raises on bad model output - validation and render errors come
back as data you can hand to the model for self-correction.
What the model can express
- Documents: headings (9 levels), paragraphs with inline
bold/italic/
code, bullet & numbered lists, tables with bold headers, images with captions, whole markdown blocks, page breaks. - Spreadsheets: multiple worksheets, bold header rows, column widths,
frozen header rows, live Excel formulas (
=SUM(B2:B10)), and bar/line/pie charts built from the sheet's data. - Presentations: title slides, section dividers, bulleted slides with indent levels, chart slides, full-width image slides, speaker notes.
Filenames from the model are sanitized to their base name, so output can never escape the output directory. Image paths must point at existing local files - the system prompt tells the model to only use files you mention.
Brand templates
Start every generated file from your own template so fonts, colors, and slide masters match your brand:
altr make "..." --docx-template brand.docx --pptx-template brand.pptx
altr render presentation deck.json --template brand.pptx
Custom .pptx templates must keep the stock layout order (0 title,
1 title+content, 2 section header, 5 title only).
PDF export
Pass --pdf to make or render to also export each created file as PDF.
Requires LibreOffice (soffice) on your PATH. From Python:
from altr import to_pdf
to_pdf("output/report.docx")
Roadmap
- Recipe/preset library of reusable prompts
- Chart styling options (colors, axis titles, legends)
- Nested markdown lists and blockquotes
- Watermarks and headers/footers
Contributing
PRs welcome - see CONTRIBUTING.md. Good first issues: roadmap items above, or new block types for the document schema.
License
MIT © Pasindu Suraweera
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
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 altr_oss-0.2.0.tar.gz.
File metadata
- Download URL: altr_oss-0.2.0.tar.gz
- Upload date:
- Size: 20.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
76b3c209b5908bbbf9ad3f09d63be6b5e673092eecdb5092ae08176bb759cc8a
|
|
| MD5 |
afeaa75c2c795e35c8e9e3e98e4b7613
|
|
| BLAKE2b-256 |
6cac659f012ce3a24ab653ece9f0c4bcec7cb553705dae4c6e9f71f0f700bbbe
|
Provenance
The following attestation bundles were made for altr_oss-0.2.0.tar.gz:
Publisher:
release.yml on PasinduSuraweera/altr-oss
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
altr_oss-0.2.0.tar.gz -
Subject digest:
76b3c209b5908bbbf9ad3f09d63be6b5e673092eecdb5092ae08176bb759cc8a - Sigstore transparency entry: 2167741421
- Sigstore integration time:
-
Permalink:
PasinduSuraweera/altr-oss@3c80648e88b1ee0fe096faa827903dbeb61e7b27 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/PasinduSuraweera
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@3c80648e88b1ee0fe096faa827903dbeb61e7b27 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file altr_oss-0.2.0-py3-none-any.whl.
File metadata
- Download URL: altr_oss-0.2.0-py3-none-any.whl
- Upload date:
- Size: 19.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1e8b6a6c06e8a922e42b4c491b8c65b4f001032e06a07ba7fae86bbae6b548da
|
|
| MD5 |
3e2c2eaa8fce034e13f0d288b1f13e9d
|
|
| BLAKE2b-256 |
bad12bc939f752a87dfe27cb27055c5869a02699233f675b8d8f0f45b50852e3
|
Provenance
The following attestation bundles were made for altr_oss-0.2.0-py3-none-any.whl:
Publisher:
release.yml on PasinduSuraweera/altr-oss
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
altr_oss-0.2.0-py3-none-any.whl -
Subject digest:
1e8b6a6c06e8a922e42b4c491b8c65b4f001032e06a07ba7fae86bbae6b548da - Sigstore transparency entry: 2167741427
- Sigstore integration time:
-
Permalink:
PasinduSuraweera/altr-oss@3c80648e88b1ee0fe096faa827903dbeb61e7b27 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/PasinduSuraweera
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@3c80648e88b1ee0fe096faa827903dbeb61e7b27 -
Trigger Event:
workflow_dispatch
-
Statement type: