Troubleshooting
Each section starts with the message you see, then gives the cause and the fix.
fastkit: command not found
The shell cannot find the fastkit command. Either the virtual environment where you installed fastkit is not active, or the folder where uv tool install puts commands is not on your PATH (uv tool update-shell adds it). Activate the environment (source .venv/bin/activate; Windows: .venv\Scripts\activate); fastkit --version then prints fastapi-fastkit, version 2.0.0. python -m fastapi_fastkit runs the same command with the Python of the active environment. See Installation.
The project already exists
$ fastkit init --name hello --no-venv -y
╭──────────────── Error ────────────────╮
│ ❌ Project 'hello' already exists. │
╰───────────────────────────────────────╯
init never writes into an existing folder unless you ask for it. Usually the fix is another name. Commit or back up your work before you try either of the other ways:
fastkit deleteproject hellodeletes the wholehellofolder after you confirm.--in-placewrites the project into the current folder. It keeps files the template does not ship and overwrites those it does (such asREADME.md); in a terminal it lists them and asks first, and-yoverwrites them without asking.
A template does not exist
$ fastkit init --template fastapi-sqlmode --project-name notes
╭───────────────────────────────── Error ──────────────────────────────────╮
│ ❌ Template 'fastapi-sqlmode' does not exist. Did you mean │
│ 'fastapi-sqlmodel', 'fastapi-single-module'? Run 'fastkit │
│ list-templates' to see the available templates. │
╰──────────────────────────────────────────────────────────────────────────╯
Templates removed in fastkit 2.0 are reported the same way; Upgrade from fastkit 1.x names their replacements.
runserver finds no virtual environment
A project created with --no-venv, or freshly cloned, has no .venv. fastkit runserver prints the commands that create it for the project's package manager; run them, then fastkit runserver again:
$ fastkit runserver
╭───────────────────────────────── Error ──────────────────────────────────╮
│ ❌ This FastAPI-fastkit project has no virtual environment (.venv), for │
│ example because it was created with --no-venv. Create it and install the │
│ dependencies from the project directory with: │
│ uv sync │
│ then run 'fastkit runserver' again. │
╰──────────────────────────────────────────────────────────────────────────╯
Do you want to continue with the current Python instead? [y/N]: n
uv is not installed
fastkit uses uv when it is installed and pip otherwise. The Package manager row of the summary then reads pip (uv is not installed), and the Next steps panel and README.md show pip commands. The project works with pip. To use uv, install uv and create the project again, or pass --package-manager.
Poetry is older than 2.0
$ fastkit init --name shop --level layered --database None --package-manager poetry -y
...
╭───────────────────────────────── Error ──────────────────────────────────╮
│ ❌ Project creation failed: Poetry 1.7.1 is installed, but projects │
│ generated by FastAPI-fastkit need Poetry 2.0 or later (they keep their │
│ dependencies in the standard [project] table, which older Poetry cannot │
│ read). Upgrade Poetry with 'poetry self update' (or 'pipx upgrade │
│ poetry' if pipx installed it), or choose another package manager with │
│ --package-manager uv, pdm or pip. Nothing was created. │
╰──────────────────────────────────────────────────────────────────────────╯
The port is already in use
Another process, often an earlier server, already listens on the port. runserver exits with the server's exit status:
$ fastkit runserver
...
╭───────────────────── Success ──────────────────────╮
│ ✨ Starting FastAPI server at 127.0.0.1:8000... │
╰────────────────────────────────────────────────────╯
...
ERROR: [Errno 48] Address already in use
╭───────────────────────────────── Error ──────────────────────────────────╮
│ ❌ The FastAPI server stopped with exit status 3; its messages above say │
│ why. │
╰──────────────────────────────────────────────────────────────────────────╯
Stop the other server, or pick a free port with --port. The error number differs between systems.
The project name is also a dependency
$ fastkit init --template fastapi-sqlmodel --project-name sqlmodel --no-venv
╭───────────────────────────────── Error ──────────────────────────────────╮
│ ❌ The project name 'sqlmodel' is also the name of one of its │
│ dependencies (sqlmodel>=0.0.42): the package manager would take the │
│ project for that package and not install it, so the app could not import │
│ it. Choose another project name. │
╰──────────────────────────────────────────────────────────────────────────╯
Windows
- Activate a virtual environment with
.venv\Scripts\activateinstead ofsource .venv/bin/activate. fastkit runserverstarts the development server on every system. Thescripts/*.shhelpers of the generated projects need Git Bash or WSL.