{"id":13638523,"url":"https://github.com/xonsh/xontrib-template","last_synced_at":"2026-05-17T20:07:15.864Z","repository":{"id":38177685,"uuid":"95712842","full_name":"xonsh/xontrib-template","owner":"xonsh","description":"Full-featured template for building extension (xontrib) for the xonsh shell.","archived":false,"fork":false,"pushed_at":"2025-01-09T10:09:46.000Z","size":151,"stargazers_count":48,"open_issues_count":9,"forks_count":10,"subscribers_count":7,"default_branch":"main","last_synced_at":"2025-01-09T11:23:39.089Z","etag":null,"topics":["cli","cookiecutter","copier","copier-python","copier-template","poetry","poetry-python","shell","shell-extension","terminal","xonsh","xonsh-dev","xontrib"],"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/xonsh.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"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},"funding":{"custom":"https://github.com/xonsh/xonsh#the-xonsh-shell-community"}},"created_at":"2017-06-28T21:22:55.000Z","updated_at":"2025-01-09T10:09:47.000Z","dependencies_parsed_at":"2024-01-29T10:09:32.939Z","dependency_job_id":"2dd4551d-4823-4ed7-bd51-067a2aa5223a","html_url":"https://github.com/xonsh/xontrib-template","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xonsh%2Fxontrib-template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xonsh%2Fxontrib-template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xonsh%2Fxontrib-template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xonsh%2Fxontrib-template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xonsh","download_url":"https://codeload.github.com/xonsh/xontrib-template/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249764702,"owners_count":21322286,"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","copier","copier-python","copier-template","poetry","poetry-python","shell","shell-extension","terminal","xonsh","xonsh-dev","xontrib"],"created_at":"2024-08-02T01:00:47.644Z","updated_at":"2026-05-17T20:07:15.850Z","avatar_url":"https://github.com/xonsh.png","language":"Python","funding_links":["https://github.com/xonsh/xonsh#the-xonsh-shell-community"],"categories":["Popular Links"],"sub_categories":["Debugging"],"readme":"\u003cp align=\"center\"\u003e\nA template for creating the \u003ca href=\"https://github.com/xonsh/xonsh\"\u003exonsh\u003c/a\u003e extensions called \u003ca href=\"https://xon.sh/tutorial_xontrib.html\"\u003exontribs\u003c/a\u003e.\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\nIf you like the template click ⭐ on the repo.\n\u003c/p\u003e\n\n[![asciicast](https://asciinema.org/a/499605.svg)](https://asciinema.org/a/499605)\n\n## Why use this template?\n\nThis template includes good pack of prebuilt files:\n\n* `README` with the info and xontrib promotion instructions\n* `pyproject.toml` file to make and install PyPi package easily — pick a build backend when prompted by `copier`:\n  * `setuptools` — classic [`PEP 621`](https://peps.python.org/pep-0621/) layout\n  * `poetry` — [Poetry](https://python-poetry.org/) project layout\n  * `uv` — [uv](https://docs.astral.sh/uv/)-managed project with `hatchling` backend and PEP 735 dependency groups\n* `.gitattributes` file to enable Github syntax highlighting for `*.xsh` files\n* `.gitignore` file with standard list of directories to ignore\n* `.github/workflow/push-test.yml` to automatically test the code using Github Actions\n* `.github/*_template.md` files to create Github templates for the text of issue and PR.\n* `.github/FUNDING.yml` file with template for Github sponsorship button.\n* `.pre-commit-config.yaml` file with [pre-commit-hooks](https://github.com/pre-commit/pre-commit-hooks)\n* `MANIFEST.in` file to make Conda feedstock easily\n* `LICENSE` file with standard MIT license\n* `tests/` with the test suite\n\n## Create new xontrib\n\nInstall [copier](https://copier.readthedocs.io/en/stable/):\n\n* From pip:\n\n  ```xsh\n  pip install copier copier-templates-extensions\n  ```\n\n* From xonsh-env (xonsh mamba install):\n\n  ```xsh\n  xpip install copier copier-templates-extensions\n  xbin-add copier\n  ```\n\n* From [uv](https://docs.astral.sh/uv/):\n\n  ```xsh\n  # Start creating a xontrib using one liner:\n  uvx --with copier-templates-extensions copier copy --trust gh:xonsh/xontrib-template .\n  # or just install:\n  uv tool install --with copier-templates-extensions copier\n  ```\n\n* From [pipx](https://pypa.github.io/pipx/):\n\n  ```xsh\n  pipx install copier\u003e=9\n  pipx inject copier copier-templates-extensions\n  ```\n\nThen create your new xontrib:\n\n```xsh\ncopier copy --trust gh:xonsh/xontrib-template .\n```\n\n## Advent of [PEP-621](https://peps.python.org/pep-0621/)\n\nOlder projects can use the following tools to upgrade their setup to use pyproject.toml\n\n* https://github.com/asottile/setup-py-upgrade\n* https://ini2toml.readthedocs.io/en/latest/setuptools_pep621.html\n* https://validate-pyproject.readthedocs.io/\n* https://github.com/denkiwakame/py-tiny-pkg\n\n## If you have an idea for xontrib but have no time to implement\n\n* [Create an issue with your idea](https://github.com/xonsh/xontrib-template/issues/new?assignees=\u0026labels=idea\u0026template=idea.md\u0026title=Idea%3A+)\n* [Top ideas](https://github.com/xonsh/xontrib-template/issues?q=is%3Aissue+is%3Aopen+label%3Aidea+sort%3Areactions-%2B1-desc)\n\n## Development\n\n- `copier` selects the latest tag when `--vcs-ref` option is not given. So it is important to tag the main branch after important template updates.\n\n### How to fix [pre-commit-hooks](https://github.com/pre-commit/pre-commit-hooks)\n\nIf you're using `.pre-commit-config.yaml` and have an error during testing you need fix the code i.e.:\n\n```xsh\nxpip install pre-commit-hooks\npre-commit run --all-files black  # or isort, etc\n```\n\n## Links\n\n* [Awesome Xontribs](https://github.com/xonsh/awesome-xontribs)\n* [Xontribs on GitHub](https://github.com/topics/xontrib)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxonsh%2Fxontrib-template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxonsh%2Fxontrib-template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxonsh%2Fxontrib-template/lists"}