{"id":22924001,"url":"https://github.com/tobi-de/litestar-tailwind-cli","last_synced_at":"2026-03-14T05:02:03.048Z","repository":{"id":244132703,"uuid":"813231857","full_name":"Tobi-De/litestar-tailwind-cli","owner":"Tobi-De","description":"Provides a CLI plugin for Litestar to use Tailwind CSS via the Tailwind CLI.","archived":false,"fork":false,"pushed_at":"2024-09-05T09:50:04.000Z","size":39,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-11T13:35:12.819Z","etag":null,"topics":["litestar","tailwindcss"],"latest_commit_sha":null,"homepage":"https://github.com/Tobi-De/litestar-tailwind-cli","language":"CSS","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/Tobi-De.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","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}},"created_at":"2024-06-10T18:15:44.000Z","updated_at":"2024-12-31T10:27:40.000Z","dependencies_parsed_at":"2024-06-13T03:40:01.834Z","dependency_job_id":null,"html_url":"https://github.com/Tobi-De/litestar-tailwind-cli","commit_stats":null,"previous_names":["tobi-de/litestar-tailwind-cli"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tobi-De%2Flitestar-tailwind-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tobi-De%2Flitestar-tailwind-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tobi-De%2Flitestar-tailwind-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tobi-De%2Flitestar-tailwind-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Tobi-De","download_url":"https://codeload.github.com/Tobi-De/litestar-tailwind-cli/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253837468,"owners_count":21971984,"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":["litestar","tailwindcss"],"created_at":"2024-12-14T08:19:00.832Z","updated_at":"2026-03-14T05:02:02.982Z","avatar_url":"https://github.com/Tobi-De.png","language":"CSS","funding_links":[],"categories":[],"sub_categories":[],"readme":"# litestar-tailwind-cli\n\n[![PyPI - Version](https://img.shields.io/pypi/v/litestar-tailwind-cli.svg)](https://pypi.org/project/litestar-tailwind-cli)\n[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/litestar-tailwind-cli.svg)](https://pypi.org/project/litestar-tailwind-cli)\n\n-----\n\n\u003e [!IMPORTANT]\n\u003e This plugin currently contains minimal features and is a work-in-progress\n\nProvides a CLI plugin for [Litestar](https://litestar.dev) to use [Tailwind CSS](https://tailwindcss.com) via the Tailwind CLI.\n\n## Table of Contents\n\n- [litestar-tailwind-cli](#litestar-tailwind-cli)\n  - [Table of Contents](#table-of-contents)\n  - [Installation](#installation)\n  - [Usage](#usage)\n  - [License](#license)\n\n## Installation\n\n```console\npip install litestar-tailwind-cli\n```\n\n## Usage\n\nConfigure and include the `TailwindCLIPlugin` in your Litestar app:\n\n```python\nfrom pathlib import Path\n\nfrom litestar import Litestar\nfrom litestar.static_files import create_static_files_router\nfrom litestar.contrib.jinja import JinjaTemplateEngine\nfrom litestar.template.config import TemplateConfig\nfrom litestar_tailwind_cli import TailwindCLIPlugin\n\nASSETS_DIR = Path(\"assets\")\n\ntailwind_cli = TailwindCLIPlugin(\n  use_server_lifespan=True,\n  src_css=ASSETS_DIR / \"css\" / \"input.css\",\n  dist_css=ASSETS_DIR / \"css\" / \"tailwind.css\",\n)\n\napp = Litestar(\n    route_handlers=[create_static_files_router(path=\"/static\", directories=[\"assets\"])],\n    debug=True,\n    plugins=[tailwind_cli],\n    template_config=TemplateConfig(\n        directory=Path(\"templates\"),\n        engine=JinjaTemplateEngine,\n    ),\n)\n```\n\n```jinja\n\u003chead\u003e\n...\n  \u003clink rel=\"stylesheet\" href=\"/static/css/tailwind.css\"\u003e\n\u003c/head\u003e\n```\n\nAfter setting up, you can use the following commands:\n\n- `litestar tailwind init`: This command initializes the tailwind configuration and downloads the CLI if it's not already installed.\n- `litestar tailwind watch`: This command starts the Tailwind CLI in watch mode during development. You won't have to use this if you set `use_server_lifespan` to `True`.\n- `litestar tailwind build`: This command builds a minified production-ready CSS file.\n\n\u003e [!NOTE]\n\u003e Don't forget to update the `content` key in `tailwind.config.js` to specify your templates directories.\n\nThe `TailwindCLIPlugin` has the following configuration options:\n\n- `src_css`: The path to the source CSS file. Defaults to \"css/input.css\".\n- `dist_css`: The path to the distribution CSS file. Defaults to \"css/tailwind.css\".\n- `config_file`: The path to the Tailwind configuration file. Defaults to \"tailwind.config.js\".\n- `use_server_lifespan`: Whether to use server lifespan. Defaults to `False`. It will start the Tailwind CLI in watch mode when you use the `litestar run` command.\n- `cli_version`: The version of the Tailwind CLI to download. Defaults to \"latest\".\n- `src_repo`: The GitHub repository from which to download the Tailwind CLI. Defaults to `tailwindlabs/tailwindcss`.\n- `asset_name`: The name of the asset to download from the repository. Defaults to `tailwindcss`.\n\nFor example, if you are using the repository `https://github.com/dobicinaitis/tailwind-cli-extra/tree/main`, you would set `src_repo` to `\"dobicinaitis/tailwind-cli-extra\"` and `asset_name` to `\"tailwindcss-extra\"`.\n\n## License\n\n`litestar-tailwind-cli` is distributed under the terms of the [MIT](https://spdx.org/licenses/MIT.html) license.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftobi-de%2Flitestar-tailwind-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftobi-de%2Flitestar-tailwind-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftobi-de%2Flitestar-tailwind-cli/lists"}