#litestar-vite "No such command 'assets'. "

1 messages · Page 1 of 1 (latest)

warm sphinx
#

Hi! I'm trying to getting started with the (at first sight, incredible) litestar-vite package, but I cannot get working the 'assets' command, I follow the guide on the docs. I don't know if I'm missing something.

I'll leave below some package versions if it's of any help.

Python 3.13
uv 0.9.8

uv pip list
Package Version


anyio 4.12.1
certifi 2026.2.25
click 8.3.1
colorama 0.4.6
faker 40.11.0
h11 0.16.0
httpcore 1.0.9
httpx 0.28.1
idna 3.11
litestar 2.21.1
litestar-htmx 0.5.0
litestar-vite 0.19.0
markdown-it-py 4.0.0
mdurl 0.1.2
msgspec 0.20.0
multidict 6.7.1
multipart 1.3.1
polyfactory 3.3.0
pygments 2.19.2
pyyaml 6.0.3
rich 14.3.3
rich-click 1.9.7
sniffio 1.3.1
typing-extensions 4.15.0
tzdata 2025.3
websockets 16.0

Thanks!

ruby sierraBOT
#
Notes for litestar-vite "No such command 'assets'. "
At your assistance

@warm sphinx

No Response?

If no response in a reasonable time, ping @Member.

Closing

To close, type !solve or byte solve.

MCVE

Please include an MCVE so that we can reproduce your issue locally.

stark raptor
#

hey - can you share your app that you are calling?

#

(and more about how you are calling the app?)

warm sphinx
#

Shure! It's a new app just to try litestar-vite

# app.py
from litestar import Litestar, get


@get("/")
async def index() -> str:
    return "Hello, world!"

app = Litestar([index])

uv run litestar run works (installing litestar[standard] )

but when run uv run litestar assets init --template htmx
gets

Using Litestar app from app:app

Usage: litestar [OPTIONS] COMMAND [ARGS]...

╭─ Error 
  No such command 'assets'.                                

stark raptor
wanton gorgeBOT
#

examples/jinja-htmx/app.py lines 113 to 125

# [docs-start:htmx-vite-config]
vite = VitePlugin(
    config=ViteConfig(
        mode="template",
        dev_mode=DEV_MODE,
        paths=PathConfig(root=here, resource_dir="resources"),
        types=TypeGenConfig(output=Path("resources/generated"), generate_sdk=False),
        runtime=RuntimeConfig(port=5050),
    )
)
templates = TemplateConfig(directory=here / "templates", engine=JinjaTemplateEngine)

app = Litestar(route_handlers=[LibraryController], plugins=[vite, HTMXPlugin()], template_config=templates, debug=True)
stark raptor
#

The docs are having a moment, i see. Otherwise, you'd be able to see this on the actually github pages

#

Here's the output i get when i run this, fwiw:

cody in 🌐 hitop in litestar-fullstack-spa on  bump-to-prerelease [$!+?] is 📦 v0.3.0 via 🐍 v3.12.3 on ☁️  [email protected]
❯ export LITESTAR_APP=app.server.asgi:create_app

cody in 🌐 hitop in litestar-fullstack-spa on  bump-to-prerelease [$!+?] is 📦 v0.3.0 via 🐍 v3.12.3 on ☁️  [email protected] 
❯ uv run litestar assets --help
Using Litestar app from env: 'app.server.asgi:create_app'
Loading environment configuration from .env
                                                                                                                        
 Usage: litestar assets [OPTIONS] COMMAND [ARGS]...                                                                     
                                                                                                                        
 Manage Vite Tasks.                                                                                                     
                                                                                                                        
╭─ Options ────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ --help  -h  Show this message and exit.                                                                              │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
╭─ Commands ───────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ build           Building frontend assets with Vite.                                                                  │
│ deploy          Build and deploy Vite assets to remote storage via fsspec.                                           │
│ doctor          Diagnose and fix Vite configuration issues.                                                          │
│ export-routes   Export route metadata for type-safe routing.                                                         │
│ generate-types  Generate TypeScript types from OpenAPI schema and routes.                                            │
│ init            Initialize vite for your project.                                                                    │
│ install         Install frontend packages.                                                                           │
│ serve           Serve frontend assets. For meta-frameworks (mode='framework'; aliases: 'ssr'/'ssg'), runs production │
│                 Node server. Otherwise runs Vite dev server.                                                         │
│ status          Check the status of the Vite integration.                                                            │
│ update          Update frontend packages.                                                                            │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯

cody in 🌐 hitop in litestar-fullstack-spa on  bump-to-prerelease [$!+?] is 📦 v0.3.0 via 🐍 v3.12.3 on ☁️  [email protected] 
❯ uv pip show litestar-vite
Name: litestar-vite
Version: 0.19.0
Location: /home/cody/code/litestar/litestar-fullstack-spa/.venv/lib/python3.13/site-packages
Requires: httpx, litestar, typing-extensions, websockets
Required-by: app

cody in 🌐 hitop in litestar-fullstack-spa on  bump-to-prerelease [$!+?] is 📦 v0.3.0 via 🐍 v3.12.3 on ☁️  [email protected]