The Python package provides a tidypress entrypoint for Python environments.
Rendering still uses the Node.js CLI and Astro engine. Node.js 22.12 or newer is required for init, dev, build, preview, deploy, and context.
Install
pip install tidypressFor site commands, the wrapper resolves the Node CLI in this order:
TIDYPRESS_CLI_JS- a local monorepo or project
node_modules/tidypress tidypressonPATH
It does not use npx by default. TIDYPRESS_USE_NPX=1 is available as an explicit escape hatch.
Site commands
These commands are delegated to the Node CLI (same surface as npx tidypress):
tidypress init [--preset lab|blog|persona|docs-writing|custom]
tidypress dev
tidypress build
tidypress preview
tidypress clean
tidypress deploy
tidypress context [output.md]
tidypress import devto <url-or-slug>
tidypress doctor
tidypress migrate-sections
tidypress add-version <label>import devto fetches real markdown. Other import providers write review scaffolds. Experimental Node commands (editor, export, ai) forward when enabled in config.
Notebook conversion
convert is Python-native:
tidypress convert analysis.ipynbBy default, output goes to:
docs/src/content/docs/analysis.mdxYou can choose the output file:
tidypress convert analysis.ipynb --output docs/src/content/docs/reports/analysis.mdxThe converter preserves markdown cells, code cells, text outputs, and PNG image outputs.
Source extraction
extract-docs writes a simple API notes file from Python, TypeScript, or Go comments:
tidypress extract-docs src/ --lang py
tidypress extract-docs src/ --lang ts
tidypress extract-docs src/ --lang goDefault output:
docs/src/content/docs/api/<lang>.mdThis is a convenience helper for small projects. For large API references, keep using the dedicated tooling for that ecosystem.
Agents and markdown
Agents that edit files in git use the same commands as you do: add markdown under src/content/, run tidypress build, deploy build/. Export tidypress context when the model needs a map of existing pages. Details: Agents and markdown.
Help and init presets
tidypress --help
tidypress init --helpThe Python entrypoint lists the same init presets as the Node CLI (lab, blog, persona, docs-writing, custom). default is an alias for lab.
Streaming build and deploy
tidypress build and tidypress deploy stream Node CLI output live through an async subprocess. Add --sync to use the legacy blocking runner (for scripts that capture output).
YAML bridge
tidypress.yaml is validated against the shared JSON Schema from @tidypress/config before Python commands read bridged flags.
The wrapper can read tidypress.yaml or tidypress.yml:
python:
convert:
input_path: analysis.ipynb
output_path: docs/src/content/docs/analysis.mdxRun with an explicit config:
tidypress convert --config ./tidypress.yaml