Skip to main content

scitex-template

pypi python docs Read the Docs

tests quality cov License: AGPL v3

SciTeX logo

uv pip install scitex-template[all] · pip install scitex[template]


Problem and Solution

# Problem Solution
1 Six template repos evolving independently — minimal scitex-* package, research project, cloud-module plugin, pip project, LaTeX manuscript, singularity container One vendored monorepo + cloner — pip install scitex-template ships every clone_* function, plus a code-snippet library for scitex idioms (session decorator, io save/load, plt subplots)
2 Cloner code buried in scitex-python — release cadence didn't match the templates' Standalone cloner — independent versioning, lazy umbrella imports, MCP server that exposes the same ops to agents

Quick Start

pip install scitex-template
scitex-template list-templates
scitex-template clone research ./my-experiment
from scitex_template import clone_research, get_code_template

clone_research(target="my-experiment", project_name="my-experiment")
print(get_code_template("session"))

Demo

# Clone any of the 6 vendored templates into a fresh dir
scitex-template clone scitex-pkg my-new-pkg     # minimal scitex-* package
scitex-template clone research-project paper-2026
scitex-template clone latex-manuscript thesis
scitex-template clone singularity-container apptainer-rig

# List available templates + code snippets
scitex-template list-templates
scitex-template list-snippets
graph LR
    Vendored["scitex_template/templates/<br/>(6 vendored template repos)"] --> Cloner["scitex-template clone"]
    Snippets["scitex_template/snippets/<br/>(session, io, plt, ...)"] --> CLI["scitex-template list/get"]
    Cloner --> Out1["fresh project dir"]
    CLI --> Out2["copy-paste idioms"]

Figure 1. Template sources (vendored repos + snippet library) and the two consumption paths: cloner CLI and snippet CLI.

Installation

uv pip install "scitex-template[all]"
Per-module extras
pip install scitex-template         # core (lazy imports for scitex.git / scitex.logging / scitex.scholar)
pip install scitex-template[mcp]    # MCP server deps (fastmcp)
pip install scitex-template[dev]    # pytest + coverage
pip install scitex-template[docs]   # sphinx docs

The umbrella route also works — pip install scitex[template] pulls this package transitively.

Architecture

flowchart LR
    Cache["template cache<br/>~/.scitex/template/cache"] --> Clone["clone_project()"]
    Clone --> Hit{"template registered?"}
    Hit -->|yes| Fast["cache fast-path<br/>recursive copy + name substitution"]
    Hit -->|no| Remote["remote-clone fallback<br/>git clone + keep essential dirs"]
    Fast --> Custom["customize_template()"]
    Remote --> Custom
    Custom --> Git["apply_git_strategy()<br/>child / parent / origin / none"]
    Git --> Out["fresh project dir"]

Figure 2. Clone flow: cache lookup, fast-path vs remote fallback, customization, then git initialization.

Each template ships as plain files; cloning is a recursive copy with optional {name} substitution, no Cookiecutter-style runtime templating engine. The MCP server re-exports the CLI surface 1:1.

3 Interfaces

Python API
import scitex  # noqa: F401 — ensures scitex.git / .logging are importable

from scitex_template import (
    clone_research,
    clone_pip_project,
    clone_scitex_minimal,
    get_available_templates_info,
    get_code_template,
)

# Clone a research project template
clone_research(target="my-experiment", project_name="my-experiment")

# Discover available templates
for info in get_available_templates_info():
    print(f"{info['id']:>10}  {info['description']}")

# Pull a code snippet for a scitex session script
print(get_code_template("session"))

The legacy import path from scitex.template import … also still works via a compatibility shim in scitex-python.

CLI

Entry point: scitex-template (also python -m scitex_template).

scitex-template list-templates             # enumerate templates
scitex-template show-info research         # template metadata
scitex-template clone research ./my-proj   # populate from cache
scitex-template refresh-cache              # force re-clone
MCP Server — for AI Agents

Install with pip install scitex-template[mcp] and the package exposes async handlers (template_list, template_info, template_clone, template_cache_refresh) over MCP — agents can scaffold projects without running Python themselves.

Template repos

scitex-template clones from these external repositories:

Template id Repo
research scitex-research-template
app / pip pip-project-template
cloud-module scitex-template-cloud-module
minimal scitex-minimal-template
singularity singularity_template
paper paper-template

Table 1. External template repositories cloned by scitex-template, keyed by template id.

A future revision may vendor these as templates/<id>/ subdirs in this repo so the cloner and the templates ship in lockstep.

Dependency notes

Per the SciTeX downstream dependency rule (general/01_arch_02), this package aims to avoid a hard runtime dep on the scitex umbrella. At present three submodules are still imported lazily inside clone_* functions: scitex.git, scitex.logging, scitex.scholar.ensure_workspace. Once scitex-git is extracted as a standalone, those imports will move to the standalone equivalents (scitex_git, scitex_logging, scitex_scholar). Users running pip install scitex[template] pick up the umbrella transitively, so there is no current breakage.

License

AGPL-3.0-only.

Part of SciTeX

scitex-template is part of SciTeX. Install via the umbrella with pip install scitex[template] to use as scitex.template (Python) or scitex template ... (CLI).

Four Freedoms for Research

  1. The freedom to run your research anywhere — your machine, your terms.
  2. The freedom to study how every step works — from raw data to final manuscript.
  3. The freedom to redistribute your workflows, not just your papers.
  4. The freedom to modify any module and share improvements with the community.

AGPL-3.0 — because we believe research infrastructure deserves the same freedoms as the software it runs on.


SciTeX

Metadata

Release files for scitex-template 0.7.6

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

Source distribution (sdist)

Source distribution for scitex-template 0.7.6
File Size Uploaded Provenance Actions
scitex_template-0.7.6.tar.gz 7.8 MB With provenance Details for scitex_template-0.7.6.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for scitex-template 0.7.6
File Interpreter ABI Platform Actions
scitex_template-0.7.6-py3-none-any.whl Python 3 none any Details for scitex_template-0.7.6-py3-none-any.whl

Total release size: 15.7 MB

Release files / scitex_template-0.7.6.tar.gz

Download URL scitex_template-0.7.6.tar.gz
Size 7.8 MB
Tags Source
SHA-256 checksum
How to use checksums
6e95ad5b45e928c7afcc5122025e73157328137f5c4ccfecd7e638df225c221f
BLAKE2b-256 checksum
How to use checksums
26c82cd698bfb6be07fec8eec413f072d608fc551a3c8981a8e3d30fdd5aafab
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 28, 2026.

Transparency log

Release files / scitex_template-0.7.6-py3-none-any.whl

Download URL scitex_template-0.7.6-py3-none-any.whl
Size 7.9 MB
Tags Python 3
SHA-256 checksum
How to use checksums
8a1a4de15759a62491ae91a0f5839656bd216f2befeece3388f4eaf5a1be34e7
BLAKE2b-256 checksum
How to use checksums
dba31475286fdd9b4ef51712da72d1656e9755d04352069d2e411213ff981e52
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 28, 2026.

Transparency log

Security for scitex-template 0.7.6

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for scitex_template-0.7.6.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 28, 2026.

Transparency log

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