{"id":26638624,"url":"https://github.com/tschm/cradle","last_synced_at":"2025-12-13T18:49:27.772Z","repository":{"id":271487347,"uuid":"913621077","full_name":"tschm/cradle","owner":"tschm","description":"Simple command line interface to create repos based on templates","archived":false,"fork":false,"pushed_at":"2025-04-08T11:33:26.000Z","size":3733,"stargazers_count":28,"open_issues_count":5,"forks_count":4,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-08T12:32:47.989Z","etag":null,"topics":["cli","cookiecutter","gh","github","github-actions","ssh","templates","uv","uvx"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tschm.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":".github/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-01-08T03:25:15.000Z","updated_at":"2025-04-08T11:33:30.000Z","dependencies_parsed_at":"2025-01-08T04:27:30.182Z","dependency_job_id":"cce63a96-7538-4d14-bdd3-a7262f3e1e8d","html_url":"https://github.com/tschm/cradle","commit_stats":null,"previous_names":["cvxgrp/cradle","tschm/cradle"],"tags_count":69,"template":false,"template_full_name":"cvxgrp/cvxcli","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tschm%2Fcradle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tschm%2Fcradle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tschm%2Fcradle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tschm%2Fcradle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tschm","download_url":"https://codeload.github.com/tschm/cradle/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248288010,"owners_count":21078824,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","cookiecutter","gh","github","github-actions","ssh","templates","uv","uvx"],"created_at":"2025-03-24T17:39:08.268Z","updated_at":"2025-12-13T18:49:27.705Z","avatar_url":"https://github.com/tschm.png","language":"Python","readme":"# qCradle\n\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)\n[![PyPI version](https://badge.fury.io/py/qCradle.svg)](https://badge.fury.io/py/qCradle)\n[![Coverage Status](https://coveralls.io/repos/github/tschm/cradle/badge.png?branch=main)](https://coveralls.io/github/tschm/cradle?branch=main)\n[![ci](https://github.com/tschm/cradle/actions/workflows/ci.yml/badge.svg)](https://github.com/tschm/cradle/actions/workflows/ci.yml)\n\nqcradle is a command line tool to create repos based on a group of templates.\nIt has been created\nto accelerate, simplify and harmonize the development\nof experiments and quantitative strategies\nas described [here](https://www.linkedin.com/pulse/rapid-quanting-thomas-schmelzer-omauf/?trackingId=Gqjma%2F8PTueJWvaBF4qWaQ%3D%3D).\n\n![Creating a repository from the command line](https://raw.githubusercontent.com/tschm/cradle/main/demo.png)\n\n**qcradle** is a tool inspired by [Cookiecutter](https://cookiecutter.readthedocs.io/en/stable/#),\nbut more biased towards quants, researchers, and academics.\n\nWhether you're building entire Python packages or financial models,\nrunning simulations, or writing academic papers,\nqcradle helps you hit the ground running with a structured\nand efficient setup following the most recent standards set in 2025.\n\nWe use [uv](https://github.com/astral-sh/uv), [hatch](https://hatch.pypa.io/),\n[marimo](https://marimo.io/) and [Tectonic](https://tectonic-typesetting.github.io/).\nSupporting [DevContainers](https://containers.dev/),\n[Renovate](https://github.com/renovatebot/renovate),\nand [Dependabot](https://github.com/dependabot),\nwe take full advantage of [GitHub Workflows](https://docs.github.com/en/actions/using-workflows/about-workflows).\n\nEach template comes with curated [pre-commit hooks](https://pre-commit.com/).\nWe compile [Jupyter Books](https://jupyterbook.org/) to collect\ntest reports, API documentation, and notebooks.\n\nLet’s make project setup as rigorous as your research!\n\n## Examples\n\nUsers can interact with qcradle by either creating templates or\nby using existing templates to create projects. We would be\ndelighted to list your public work here:\n\n### User projects\n\nWe would like to encourage our users to point to public repositories\ncreated with the qcradle. We start with\n\n* [cvxball](https://github.com/cvxgrp/cvxball). We created badges\n  for you\n\n### User templates\n\nPlease share your templates with the world!\n\n## Install gh\n\nPlease install GitHub's official command line tool [gh](https://github.com/cli/cli).\nThis tool is used to create GitHub repos from the command line.\n\nVerify the existence of the tool and a valid SSH connection with\n\n```bash\nssh -T git@github.com\ngh --version\n```\n\nA new SSH connection could be established [here](https://docs.github.com/en/authentication/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent).\n\n## Install uv and uvx\n\nuv is a modern, high-performance Python package manager and installer\nwritten in Rust.\nIt serves as a drop-in replacement for traditional tools like pip and pipx.\nFor macOS and Linux:\n\n```bash\ncurl -LsSf https://astral.sh/uv/install.sh | sh\n```\n\nFor Windows follow the instructions [here](https://docs.astral.sh/uv/getting-started/installation/)\n\n## Understanding uvx\n\nuvx is a command provided by uv to run tools published as Python packages\nwithout installing them permanently. It creates temporary,\nisolated environments for these tools:\n\n```bash\nuvx qcradle\n```\n\nThis command will:\n\n* Resolve and install the qcradle package in a temporary environment.\n* Execute the qcradle command.\n\n**Note**: If you plan to use a tool frequently, consider installing\nit permanently using uv:\n\n```bash\nuv tool install qcradle\n````\n\nOnce the tool is permanently installed it is enough to start it with\n\n```bash\nqcradle\n```\n\n## Templates\n\nYou could create your own templates and standardize project structures\nacross your team or organization.\nIt's essentially a project scaffolding tool that helps maintain consistency\nin Python projects.\n\nWe currently offer $4$ standard templates out of the box\n\n* The document template\n* The experiments template\n* The package template\n* The R template\n\n### Standard Templates\n\nWe follow the one template, one repository policy.\nYou are encouraged to create your own templates and we give $4$ examples that\nmay serve as inspiration\n\n#### [The document template](https://github.com/tschm/paper)\n\nThe template supports the fast creation of repositories of LaTeX documents.\nThe repo can compile your LaTeX documents with every commit and put them\non a dedicated branch.\n\n#### [The experiments template](https://github.com/tschm/experiments)\n\nHere we support the creation of notebooks without the ambition to release software.\nThe repo is not minimalistic but comes with a curated set of pre-commit hooks and\nfollows modern and established guidelines. The notebooks are based on Marimo.\n\n#### [The package template](https://github.com/tschm/package)\n\nThe package template is most useful when the final\ngoal is the release of software to a registry, e.g. pypi.\nIt offers full uv support and compiles documentation\ninto a Jupyter Book.\n\n#### [The R template](https://github.com/tschm/cradle_r)\n\nHere we expose R Studio in a devcontainer.\n\n### Proprietary templates\n\n#### Creation\n\nYou can create your very own templates and we recommend to start with\nforking the\n[dedicated repo](https://github.com/tschm/template/blob/main/README.md)\nfor the job.\n\nTemplates rely on [Jinja](https://jinja.palletsprojects.com/en/stable/).\nAt the root level the repo needs a 'copier.yml' file and a 'template' folder.\n\nEach template is tested using [act](https://github.com/nektos/act), e.g.\nwe render the project template and test the workflows of the created project.\nThis helps to avoid creating projects starting their life in a broken state.\n\n#### Usage\n\nWe essentially expose the copier interface directly with\nminor modifications, e.g. if the user is not submitting a source template\nwe offer to choose one of the standard templates.\n\nAny cradle template could be used directly as the first 'template'\nargument\n\n```bash\nuvx qcradle --template=git@github.com:tschm/paper.git\n```\n\nBy default, Copier (and hence the repo-launcher) will copy from the last\nrelease found in template Git tags, sorted as\n[PEP 440](https://peps.python.org/pep-0440/).\n\n### Update existing projects\n\nTemplates are moving targets in most professional setups. It is possible to update\nprojects created with the help of the qcradle by specifying an existing path\ninstead of a template.\n\n```bash\nuvx qcradle --dst_path=/Users/thomasschmelzer/projects/my_marimo_experiments\n```\n\nThe tool expects a full path. Your repo should contain your previous answers\nin a file '.copier-answers.yml' which serve as default arguments for the\nquestions you have been asked before. All standard templates create the file.\n\n## :warning: Private repositories\n\nUsing workflows in private repos will eat into your monthly GitHub bill.\nYou may want to restrict the workflow to operate only when merging on the main branch\nwhile operating on a different branch or deactivate the flow.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftschm%2Fcradle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftschm%2Fcradle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftschm%2Fcradle/lists"}