Scaffold a UV-powered Python research paper project in seconds
  • TypeScript 88.5%
  • Python 10.7%
  • JavaScript 0.8%
Find a file
2026-04-12 22:02:12 +10:00
src feat: add end-to-end smoke test 2026-04-12 21:52:07 +10:00
template fix: sync AGENTS.md content with CLAUDE.md 2026-04-12 22:02:12 +10:00
.gitignore feat: initialize project scaffold with tsup and typescript 2026-04-12 21:50:17 +10:00
.prettierrc feat: add eslint and prettier configuration 2026-04-12 21:52:15 +10:00
eslint.config.mjs feat: add eslint and prettier configuration 2026-04-12 21:52:15 +10:00
package-lock.json feat: initialize project scaffold with tsup and typescript 2026-04-12 21:50:17 +10:00
package.json feat: initialize project scaffold with tsup and typescript 2026-04-12 21:50:17 +10:00
README.md docs: add project readme 2026-04-12 21:52:23 +10:00
tsconfig.json fix: add node types to tsconfig to resolve vscode errors 2026-04-12 21:56:37 +10:00
tsup.config.ts feat: initialize project scaffold with tsup and typescript 2026-04-12 21:50:17 +10:00

create-paper-py

Scaffold a UV-powered Python research paper project in seconds — a create-vite-style CLI for academic/research work.

Prerequisites

  • uv (the generated project is managed by uv)
  • git (optional, used only when you enable git init)
  • NVIDIA GPU + driver (optional, auto-detected for PyTorch CUDA configuration)

The CLI probes for these tools at startup and prints install hints if anything is missing.

Usage

npm create paper-py@latest my-paper
# or
npx create-paper-py my-paper
# or
pnpm create paper-py my-paper

What it generates

<project>/
├── scripts/
│   ├── __init__.py
│   └── s0_utilities/
│       └── dataset_loader.py   # config-driven data loading
├── tests/
├── datas/
│   ├── assets/                 # static assets (fonts, images)
│   │   └── TimesSun.ttf
│   ├── raw_data/               # original data + datasets.json config
│   │   └── datasets.json
│   ├── data/                   # processed data
│   └── output/                 # models, metrics, artifacts
├── docs/
├── backup/
├── .gitignore
├── CLAUDE.md
├── AGENTS.md
├── pyproject.toml              # [project] + [tool.ruff] + [tool.mypy]
└── README.md

Interactive flow

  1. Project name (validated, normalized to PEP-503)
  2. Short description
  3. Python version (auto-detected from uv python list)
  4. Runtime packages (space-separated, optional)
  5. Dev tools (ruff + mypy)
  6. Extra dev packages (optional)
  7. PyTorch — auto-detects CUDA via nvidia-smi; shows CUDA version selector when GPU is found, CPU-only otherwise
  8. uv sync — create .venv and install now
  9. git init

Non-interactive mode: create-paper-py my-paper --yes

Version detection

All version defaults are fetched at runtime:

Item Source
Python uv python list --only-installed
PyTorch PyPI JSON API
CUDA options PyTorch wheel index + nvidia-smi

Fallback values are used when network or tools are unavailable.

Local Development

npm install
npm run build          # produces dist/index.js
npm run smoke          # end-to-end smoke test

# Code quality
npm run lint           # eslint
npm run format         # prettier
npm run typecheck      # tsc --noEmit

Run the CLI directly:

node dist/index.js my-test-project

Project layout (this repo)

create-paper-py/
├── src/
│   ├── index.tsx       # CLI entry, orchestration
│   ├── prompts.tsx     # interactive flow
│   ├── env-check.tsx   # uv/git/CUDA detection + version fetching
│   ├── scaffold.tsx    # template copy + placeholder substitution
│   ├── runners.tsx     # uv / git subprocess wrappers
│   ├── render.tsx      # gradient banner + spinner
│   ├── utils.tsx       # shared helpers
│   ├── types.tsx       # type definitions
│   └── smoke.tsx       # end-to-end smoke test
├── template/           # project template (copied as-is, placeholders applied)
├── eslint.config.mjs
├── .prettierrc
├── tsconfig.json
├── tsup.config.ts
└── package.json