Skip to main content

Local LaTeX project scaffolder

Project description

newtex-cli

Scaffold local LaTeX projects from reusable templates.

1. Installation

pipx install newtex-scaffold

2. Configuration

2.1 Local environment file

Create .env.local in the project root:

NEWTEX_DEFAULT_TEMPLATE=acm
NEWTEX_TEMPLATE_ACM_PATH=/path/to/your/acm-template

2.2 Global template config (recommended)

Configure templates once and use newtex from anywhere:

newtex --template-set acm=/absolute/path/or/url/to/template
newtex --set-default-template acm
newtex --templates-list

This writes to ~/.config/newtex/templates.yml.

3. CLI Commands

3.1 Command reference

Command Description
newtex --help Show CLI help
newtex --tests Run the full test suite
newtex --publish-check Validate build/upload prerequisites
newtex --template-set <alias>=<path-or-url> Add or update a global template alias
newtex --template-set <alias>=<path-or-url> --template-description "..." Add alias with description
newtex --set-default-template <alias> Set the global default template alias
newtex --templates-list Show configured global templates
newtex Start interactive project creation
newtex <project-name> <template> Create a project in non-interactive mode
newtex <project-name> <template> --no-git Skip git init
newtex <project-name> <template> --track-pdf Keep compiled PDFs tracked
newtex <project-name> <template> --no-vscode Exclude shared .vscode/ settings
newtex <project-name> <template> --open Open generated project in VS Code

3.2 Quick examples

newtex --help
newtex
newtex exlang-paper acm
newtex exlang-paper acm --no-git
newtex exlang-paper acm --track-pdf
newtex exlang-paper acm --no-vscode
newtex exlang-paper acm --open
Advanced commands
newtex --tests
newtex --publish-check
newtex --template-set acm=/absolute/path/to/template
newtex --set-default-template acm
newtex --templates-list

4. Notes

  • Project names must be lowercase kebab-case (example: exlang-paper).
  • If a template path is invalid, the CLI exits with an error message.

5. Build & Publish

5.1 Build distributions

python -m pip install -e ".[publish]"
newtex --publish-check
python -m build

5.2 Upload to PyPI

You need a PyPI account to publish public packages.

Set token-based auth (recommended):

export TWINE_USERNAME=__token__
export TWINE_PASSWORD=<your-pypi-api-token>
python -m twine upload dist/*

5.3 Install on another Mac

pipx install newtex-scaffold

Then configure templates on that machine:

newtex --template-set acm=/absolute/path/or/url/to/template
newtex --set-default-template acm

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

newtex_cli-0.1.1.dev1.tar.gz (6.9 kB view details)

Uploaded Source

Built Distribution

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

newtex_cli-0.1.1.dev1-py3-none-any.whl (8.9 kB view details)

Uploaded Python 3

File details

Details for the file newtex_cli-0.1.1.dev1.tar.gz.

File metadata

  • Download URL: newtex_cli-0.1.1.dev1.tar.gz
  • Upload date:
  • Size: 6.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for newtex_cli-0.1.1.dev1.tar.gz
Algorithm Hash digest
SHA256 637af5eb1c8553e67d79bd9f0d46c513d67cad671463e5e7129d074e4d01269c
MD5 5d03cdac3b8c744f800c74047e36fd5b
BLAKE2b-256 4ad6af5afce364a1350977cf9687c099a10efd5f739a8844b15486b2153b7270

See more details on using hashes here.

File details

Details for the file newtex_cli-0.1.1.dev1-py3-none-any.whl.

File metadata

File hashes

Hashes for newtex_cli-0.1.1.dev1-py3-none-any.whl
Algorithm Hash digest
SHA256 bd24d7bde69b231154104d858bb8617283ede0cebb3663cf0ea45939cc93072e
MD5 1b13f762d8ad2d30b1ce52810ca49ab0
BLAKE2b-256 dad912b352a592b956151088c2a669900720feb69d3b4f41de929a6de8d821ca

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