{"id":18749320,"url":"https://github.com/reedjones/spell-craft","last_synced_at":"2026-02-14T15:31:33.784Z","repository":{"id":248062903,"uuid":"827647742","full_name":"reedjones/spell-craft","owner":"reedjones","description":"SpellCraft CLI is a Python project that generates command-line interfaces (CLIs) from configuration files. Each CLI plugin is packaged as a separate module containing a configuration and a list of commands. Our nomenclature revolves around the concept of spells and incantations, where plugins are spells and commands are incantations.","archived":false,"fork":false,"pushed_at":"2024-10-09T13:08:56.000Z","size":729,"stargazers_count":1,"open_issues_count":33,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-09-10T18:50:56.452Z","etag":null,"topics":["automation","automation-framework","cli","cli-app","cli-framework","cli-generator","cli-tool","framework","python"],"latest_commit_sha":null,"homepage":"https://github.com/reedjones/spell-craft","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/reedjones.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-07-12T05:02:27.000Z","updated_at":"2024-12-30T22:30:02.000Z","dependencies_parsed_at":"2024-07-12T06:30:07.969Z","dependency_job_id":"3ffe2a50-98d4-4b7e-b028-d153f69171f4","html_url":"https://github.com/reedjones/spell-craft","commit_stats":null,"previous_names":["reedjones/spell-craft"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/reedjones/spell-craft","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reedjones%2Fspell-craft","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reedjones%2Fspell-craft/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reedjones%2Fspell-craft/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reedjones%2Fspell-craft/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/reedjones","download_url":"https://codeload.github.com/reedjones/spell-craft/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reedjones%2Fspell-craft/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29447971,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-14T14:10:32.461Z","status":"ssl_error","status_checked_at":"2026-02-14T14:09:49.945Z","response_time":53,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["automation","automation-framework","cli","cli-app","cli-framework","cli-generator","cli-tool","framework","python"],"created_at":"2024-11-07T17:07:10.413Z","updated_at":"2026-02-14T15:31:33.768Z","avatar_url":"https://github.com/reedjones.png","language":"Python","readme":"\n\n\u003cdiv align=\"center\"\u003e\n  \u003ch1\u003e#Spellcraft \u003c/h1\u003e\n  \u003cimg src=\"https://github.com/reedjones/spell-craft/raw/main/logo.webp\" alt=\"spellcraft\" style=\"\" width=\"250\" /\u003e\n\u003c/div\u003e\n\u003cdiv align=\"center\"\u003e\n\n[![Build status](https://github.com/reedjones/spell-craft/workflows/build/badge.svg?branch=master\u0026event=push)](https://github.com/reedjones/spell-craft/actions?query=workflow%3Abuild)\n[![Python Version](https://img.shields.io/pypi/pyversions/spell-craft.svg)](https://pypi.org/project/spell-craft/)\n[![Dependencies Status](https://img.shields.io/badge/dependencies-up%20to%20date-brightgreen.svg)](https://github.com/reedjones/spell-craft/pulls?utf8=%E2%9C%93\u0026q=is%3Apr%20author%3Aapp%2Fdependabot)\n\n[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)\n[![Security: bandit](https://img.shields.io/badge/security-bandit-green.svg)](https://github.com/PyCQA/bandit)\n[![Pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit\u0026logoColor=white)](https://github.com/reedjones/spell-craft/blob/master/.pre-commit-config.yaml)\n[![Semantic Versions](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--versions-e10079.svg)](https://github.com/reedjones/spell-craft/releases)\n[![License](https://img.shields.io/github/license/reedjones/spell-craft)](https://github.com/reedjones/spell-craft/blob/master/LICENSE)\n![Coverage Report](assets/images/coverage.svg)\n\nSpellcraft CLI is a Python project that generates command-line interfaces (CLIs) from configurations. Each CLI plugin is packaged as a separate module containing a configuration and a list of commands. Our nomenclature revolves around the concept of spells and incantations, where plugins are spells and commands are incantations.\n\n\u003c/div\u003e\n\n\n## Usage\n\n1.  Prepare your plugins:\n\n    -   Each plugin should have its own directory under the\n        \u003cspan class=\"title-ref\"\u003eplugins\u003c/span\u003e folder.\n    -   Each plugin directory should contain a\n        \u003cspan class=\"title-ref\"\u003ecommands.txt\u003c/span\u003e file with the shell\n        commands.\n    -   Optionally, include a configuration file\n        (\u003cspan class=\"title-ref\"\u003ecommands.json\u003c/span\u003e or\n        \u003cspan class=\"title-ref\"\u003ecommands.yaml\u003c/span\u003e) for command\n        arguments.\n\n2.  Generate the CLI:\n\n    ``` shell\n    python -m spellcraft.cli generate-cli plugins/\n    ```\n\n3.  Use the generated CLI:\n\n    ``` shell\n    python -m spellcraft.cli \u003cplugin_command\u003e [arguments]\n    ```\n\n## Example\n\nExample \u003cspan class=\"title-ref\"\u003ecommands.txt\u003c/span\u003e for\n\u003cspan class=\"title-ref\"\u003elist_files\u003c/span\u003e plugin:\n\n``` text\nlist_files:ls -la {{ directory }}\n```\n\nExample \u003cspan class=\"title-ref\"\u003ecommands.json\u003c/span\u003e for\n\u003cspan class=\"title-ref\"\u003elist_files\u003c/span\u003e plugin:\n\n``` json\n{\n    \"list_files\": {\n        \"arguments\": {\n            \"directory\": {\n                \"prompt\": \"Please enter the directory\",\n                \"default\": \".\"\n            }\n        }\n    }\n}\n```\n\nExample \u003cspan class=\"title-ref\"\u003ecommands.txt\u003c/span\u003e for\n\u003cspan class=\"title-ref\"\u003edo_something_else\u003c/span\u003e plugin:\n\n``` text\ndo_something_else:echo {{ message }}\n```\n\nExample \u003cspan class=\"title-ref\"\u003ecommands.yaml\u003c/span\u003e for\n\u003cspan class=\"title-ref\"\u003edo_something_else\u003c/span\u003e plugin:\n\n``` yaml\ndo_something_else:\n  arguments:\n    message:\n      prompt: \"Please enter a message\"\n      default: \"Hello, World!\"\n```\n\n## Contributing\n\nFeel free to contribute by submitting issues or pull requests. Make sure\nto follow the coding standards and write tests for any new features or\nbug fixes.\n\n## License\n\nThis project is licensed under the MIT License.\n\n\n# Dev Setup\n\n## Very first steps\n\n### Initialize your code\n\n1. Initialize `git` inside your repo:\n\n```bash\ncd spell-craft \u0026\u0026 git init\n```\n\n2. If you don't have `Poetry` installed run:\n\n```bash\nmake poetry-download\n```\n\n3. Initialize poetry and install `pre-commit` hooks:\n\n```bash\nmake install\nmake pre-commit-install\n```\n\n4. Run the codestyle:\n\n```bash\nmake codestyle\n```\n\n5. Upload initial code to GitHub:\n\n```bash\ngit add .\ngit commit -m \":tada: Initial commit\"\ngit branch -M main\ngit remote add origin https://github.com/reedjones/spell-craft.git\ngit push -u origin main\n```\n\n### Set up bots\n\n- Set up [Dependabot](https://docs.github.com/en/github/administering-a-repository/enabling-and-disabling-version-updates#enabling-github-dependabot-version-updates) to ensure you have the latest dependencies.\n- Set up [Stale bot](https://github.com/apps/stale) for automatic issue closing.\n\n### Poetry\n\nWant to know more about Poetry? Check [its documentation](https://python-poetry.org/docs/).\n\n\u003cdetails\u003e\n\u003csummary\u003eDetails about Poetry\u003c/summary\u003e\n\u003cp\u003e\n\nPoetry's [commands](https://python-poetry.org/docs/cli/#commands) are very intuitive and easy to learn, like:\n\n- `poetry add numpy@latest`\n- `poetry run pytest`\n- `poetry publish --build`\n\netc\n\u003c/p\u003e\n\u003c/details\u003e\n\n### Building and releasing your package\n\nBuilding a new version of the application contains steps:\n\n- Bump the version of your package `poetry version \u003cversion\u003e`. You can pass the new version explicitly, or a rule such as `major`, `minor`, or `patch`. For more details, refer to the [Semantic Versions](https://semver.org/) standard.\n- Make a commit to `GitHub`.\n- Create a `GitHub release`.\n- And... publish 🙂 `poetry publish --build`\n\n## 🎯 What's next\n\nWell, that's up to you 💪🏻. I can only recommend the packages and articles that helped me.\n\n- [`Typer`](https://github.com/tiangolo/typer) is great for creating CLI applications.\n- [`Rich`](https://github.com/willmcgugan/rich) makes it easy to add beautiful formatting in the terminal.\n- [`Pydantic`](https://github.com/samuelcolvin/pydantic/) – data validation and settings management using Python type hinting.\n- [`Loguru`](https://github.com/Delgan/loguru) makes logging (stupidly) simple.\n- [`tqdm`](https://github.com/tqdm/tqdm) – fast, extensible progress bar for Python and CLI.\n- [`IceCream`](https://github.com/gruns/icecream) is a little library for sweet and creamy debugging.\n- [`orjson`](https://github.com/ijl/orjson) – ultra fast JSON parsing library.\n- [`Returns`](https://github.com/dry-python/returns) makes you function's output meaningful, typed, and safe!\n- [`Hydra`](https://github.com/facebookresearch/hydra) is a framework for elegantly configuring complex applications.\n- [`FastAPI`](https://github.com/tiangolo/fastapi) is a type-driven asynchronous web framework.\n\nArticles:\n\n- [Open Source Guides](https://opensource.guide/).\n- [A handy guide to financial support for open source](https://github.com/nayafia/lemonade-stand)\n- [GitHub Actions Documentation](https://help.github.com/en/actions).\n- Maybe you would like to add [gitmoji](https://gitmoji.carloscuesta.me/) to commit names. This is really funny. 😄\n\n## 🚀 Features\n\n### Development features\n\n- Supports for `Python 3.8` and higher.\n- [`Poetry`](https://python-poetry.org/) as the dependencies manager. See configuration in [`pyproject.toml`](https://github.com/reedjones/spell-craft/blob/master/pyproject.toml) and [`setup.cfg`](https://github.com/reedjones/spell-craft/blob/master/setup.cfg).\n- Automatic codestyle with [`black`](https://github.com/psf/black), [`isort`](https://github.com/timothycrosley/isort) and [`pyupgrade`](https://github.com/asottile/pyupgrade).\n- Ready-to-use [`pre-commit`](https://pre-commit.com/) hooks with code-formatting.\n- Type checks with [`mypy`](https://mypy.readthedocs.io); docstring checks with [`darglint`](https://github.com/terrencepreilly/darglint); security checks with [`safety`](https://github.com/pyupio/safety) and [`bandit`](https://github.com/PyCQA/bandit)\n- Testing with [`pytest`](https://docs.pytest.org/en/latest/).\n- Ready-to-use [`.editorconfig`](https://github.com/reedjones/spell-craft/blob/master/.editorconfig), [`.dockerignore`](https://github.com/reedjones/spell-craft/blob/master/.dockerignore), and [`.gitignore`](https://github.com/reedjones/spell-craft/blob/master/.gitignore). You don't have to worry about those things.\n\n### Deployment features\n\n- `GitHub` integration: issue and pr templates.\n- `Github Actions` with predefined [build workflow](https://github.com/reedjones/spell-craft/blob/master/.github/workflows/build.yml) as the default CI/CD.\n- Everything is already set up for security checks, codestyle checks, code formatting, testing, linting, docker builds, etc with [`Makefile`](https://github.com/reedjones/spell-craft/blob/master/Makefile#L89). More details in [makefile-usage](#makefile-usage).\n- [Dockerfile](https://github.com/reedjones/spell-craft/blob/master/docker/Dockerfile) for your package.\n- Always up-to-date dependencies with [`@dependabot`](https://dependabot.com/). You will only [enable it](https://docs.github.com/en/github/administering-a-repository/enabling-and-disabling-version-updates#enabling-github-dependabot-version-updates).\n- Automatic drafts of new releases with [`Release Drafter`](https://github.com/marketplace/actions/release-drafter). You may see the list of labels in [`release-drafter.yml`](https://github.com/reedjones/spell-craft/blob/master/.github/release-drafter.yml). Works perfectly with [Semantic Versions](https://semver.org/) specification.\n\n### Open source community features\n\n- Ready-to-use [Pull Requests templates](https://github.com/reedjones/spell-craft/blob/master/.github/PULL_REQUEST_TEMPLATE.md) and several [Issue templates](https://github.com/reedjones/spell-craft/tree/master/.github/ISSUE_TEMPLATE).\n- Files such as: `LICENSE`, `CONTRIBUTING.md`, `CODE_OF_CONDUCT.md`, and `SECURITY.md` are generated automatically.\n- [`Stale bot`](https://github.com/apps/stale) that closes abandoned issues after a period of inactivity. (You will only [need to setup free plan](https://github.com/marketplace/stale)). Configuration is [here](https://github.com/reedjones/spell-craft/blob/master/.github/.stale.yml).\n- [Semantic Versions](https://semver.org/) specification with [`Release Drafter`](https://github.com/marketplace/actions/release-drafter).\n\n## Installation\n\n```bash\npip install -U spell-craft\n```\n\nor install with `Poetry`\n\n```bash\npoetry add spell-craft\n```\n\nThen you can run\n\n```bash\nspell-craft --help\n```\n\nor with `Poetry`:\n\n```bash\npoetry run spell-craft --help\n```\n\n### Makefile usage\n\n[`Makefile`](https://github.com/reedjones/spell-craft/blob/master/Makefile) contains a lot of functions for faster development.\n\n\u003cdetails\u003e\n\u003csummary\u003e1. Download and remove Poetry\u003c/summary\u003e\n\u003cp\u003e\n\nTo download and install Poetry run:\n\n```bash\nmake poetry-download\n```\n\nTo uninstall\n\n```bash\nmake poetry-remove\n```\n\n\u003c/p\u003e\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e2. Install all dependencies and pre-commit hooks\u003c/summary\u003e\n\u003cp\u003e\n\nInstall requirements:\n\n```bash\nmake install\n```\n\nPre-commit hooks coulb be installed after `git init` via\n\n```bash\nmake pre-commit-install\n```\n\n\u003c/p\u003e\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e3. Codestyle\u003c/summary\u003e\n\u003cp\u003e\n\nAutomatic formatting uses `pyupgrade`, `isort` and `black`.\n\n```bash\nmake codestyle\n\n# or use synonym\nmake formatting\n```\n\nCodestyle checks only, without rewriting files:\n\n```bash\nmake check-codestyle\n```\n\n\u003e Note: `check-codestyle` uses `isort`, `black` and `darglint` library\n\nUpdate all dev libraries to the latest version using one comand\n\n```bash\nmake update-dev-deps\n```\n\n\u003cdetails\u003e\n\u003csummary\u003e4. Code security\u003c/summary\u003e\n\u003cp\u003e\n\n```bash\nmake check-safety\n```\n\nThis command launches `Poetry` integrity checks as well as identifies security issues with `Safety` and `Bandit`.\n\n```bash\nmake check-safety\n```\n\n\u003c/p\u003e\n\u003c/details\u003e\n\n\u003c/p\u003e\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e5. Type checks\u003c/summary\u003e\n\u003cp\u003e\n\nRun `mypy` static type checker\n\n```bash\nmake mypy\n```\n\n\u003c/p\u003e\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e6. Tests with coverage badges\u003c/summary\u003e\n\u003cp\u003e\n\nRun `pytest`\n\n```bash\nmake test\n```\n\n\u003c/p\u003e\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e7. All linters\u003c/summary\u003e\n\u003cp\u003e\n\nOf course there is a command to ~~rule~~ run all linters in one:\n\n```bash\nmake lint\n```\n\nthe same as:\n\n```bash\nmake test \u0026\u0026 make check-codestyle \u0026\u0026 make mypy \u0026\u0026 make check-safety\n```\n\n\u003c/p\u003e\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e8. Docker\u003c/summary\u003e\n\u003cp\u003e\n\n```bash\nmake docker-build\n```\n\nwhich is equivalent to:\n\n```bash\nmake docker-build VERSION=latest\n```\n\nRemove docker image with\n\n```bash\nmake docker-remove\n```\n\nMore information [about docker](https://github.com/reedjones/spell-craft/tree/master/docker).\n\n\u003c/p\u003e\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e9. Cleanup\u003c/summary\u003e\n\u003cp\u003e\nDelete pycache files\n\n```bash\nmake pycache-remove\n```\n\nRemove package build\n\n```bash\nmake build-remove\n```\n\nDelete .DS_STORE files\n\n```bash\nmake dsstore-remove\n```\n\nRemove .mypycache\n\n```bash\nmake mypycache-remove\n```\n\nOr to remove all above run:\n\n```bash\nmake cleanup\n```\n\n\u003c/p\u003e\n\u003c/details\u003e\n\n## 📈 Releases\n\nYou can see the list of available releases on the [GitHub Releases](https://github.com/reedjones/spell-craft/releases) page.\n\nWe follow [Semantic Versions](https://semver.org/) specification.\n\nWe use [`Release Drafter`](https://github.com/marketplace/actions/release-drafter). As pull requests are merged, a draft release is kept up-to-date listing the changes, ready to publish when you’re ready. With the categories option, you can categorize pull requests in release notes using labels.\n\n### List of labels and corresponding titles\n\n|               **Label**               |  **Title in Releases**  |\n| :-----------------------------------: | :---------------------: |\n|       `enhancement`, `feature`        |       🚀 Features       |\n| `bug`, `refactoring`, `bugfix`, `fix` | 🔧 Fixes \u0026 Refactoring  |\n|       `build`, `ci`, `testing`        | 📦 Build System \u0026 CI/CD |\n|              `breaking`               |   💥 Breaking Changes   |\n|            `documentation`            |    📝 Documentation     |\n|            `dependencies`             | ⬆️ Dependencies updates |\n\nYou can update it in [`release-drafter.yml`](https://github.com/reedjones/spell-craft/blob/master/.github/release-drafter.yml).\n\nGitHub creates the `bug`, `enhancement`, and `documentation` labels for you. Dependabot creates the `dependencies` label. Create the remaining labels on the Issues tab of your GitHub repository, when you need them.\n\n## 🛡 License\n\n[![License](https://img.shields.io/github/license/reedjones/spell-craft)](https://github.com/reedjones/spell-craft/blob/master/LICENSE)\n\nThis project is licensed under the terms of the `MIT` license. See [LICENSE](https://github.com/reedjones/spell-craft/blob/master/LICENSE) for more details.\n\n## 📃 Citation\n\n```bibtex\n@misc{spell-craft,\n  author = {spell-craft},\n  title = {SpellCraft CLI is a Python project that generates command-line interfaces (CLIs) from configurations. Each CLI plugin is packaged as a separate module containing a configuration and a list of commands. Our nomenclature revolves around the concept of spells and incantations, where plugins are spells and commands are incantations.},\n  year = {2024},\n  publisher = {GitHub},\n  journal = {GitHub repository},\n  howpublished = {\\url{https://github.com/reedjones/spell-craft}}\n}\n```\n\n## Credits [![🚀 Your next Python package needs a bleeding-edge project structure.](https://img.shields.io/badge/python--package--template-%F0%9F%9A%80-brightgreen)](https://github.com/TezRomacH/python-package-template)\n\nThis project was generated with [`python-package-template`](https://github.com/TezRomacH/python-package-template)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freedjones%2Fspell-craft","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Freedjones%2Fspell-craft","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freedjones%2Fspell-craft/lists"}