Skip to content

Changelog

v1.5.2 (2026-12-01)

Security

  • Templates ship .env.example instead of .env (template authors: .env-tpl is now .env.example-tpl). init and startdemo create the local .env from it with a freshly generated SECRET_KEY, so projects no longer share the public example key. An existing .env is never overwritten, and the generated key is never printed.
  • Every template's .gitignore now ignores .env and .env.* and keeps .env.example; before, most templates did not ignore .env, and fastapi-mcp had no .gitignore at all.
  • fastapi-auth-jwt, fastapi-llm-agent, fastapi-domain-starter and fastapi-sqlmodel refuse to start with ENVIRONMENT=production and an example SECRET_KEY. fastapi-mcp also refuses a missing SECRET_KEY or ENABLE_DEMO_USERS=true in production. Templates with src/core/config.py already rejected changethis outside development.
  • fastapi-mcp: the MCP endpoint had no authentication, and MCP_API_KEY had no effect. It now requires Authorization: Bearer <MCP_API_KEY> when MCP_API_KEY is set, and a valid JWT access token otherwise.
  • fastapi-mcp: the demo accounts (user1, user2, admin) exist only with the new ENABLE_DEMO_USERS=true (default false), and the default SECRET_KEY is a random per-process key instead of a fixed string.
  • fastapi-auth-jwt: refresh-token rotation runs in one transaction, so a refresh token can be used only once even under concurrent requests, and its stored expiry is checked. RefreshTokenRepository.revoke(record) is replaced by revoke_if_active(jti).
  • fastkit init with the CORS utility no longer allows every origin with credentials: CORS is enabled only for the origins in BACKEND_CORS_ORIGINS, and * turns credentials off.
  • fastkit init auth modules (JWT, OAuth2, Session-based) no longer ship a default secret. They sign with SECRET_KEY from .env and refuse to start with a missing or example key in production. SESSION_SECRET_KEY is no longer read.

Templates

  • fastapi-mcp: new ENVIRONMENT setting; MCP_MOUNT_PATH is now honoured (the server always mounted at /mcp); BACKEND_CORS_ORIGINS accepts a comma-separated value. Known limitation: in MCP_API_KEY mode, tools that call JWT-protected endpoints return 401 (see the template README).
  • fastapi-custom-response: .gitignore no longer hides the project's scripts/ directory.
  • Every template ships a .gitattributes that keeps LF in shell scripts, Dockerfiles, compose files, Makefile and .env files, even with core.autocrlf=true.
  • uvloop is no longer installed on Windows, which it does not support.
  • fastapi-auth-jwt, fastapi-domain-starter, fastapi-llm-agent, fastapi-mcp and fastapi-sqlmodel ship tests for the production guard, and fastapi-auth-jwt for refresh-token rotation.

CLI

  • fastkit init --config <file> never prompts and always creates ./<project_name>/. An unusable config, an existing project directory or a generation failure now exits with status 1 instead of 0. --yes has no effect with --config.
  • Plain and --interactive init exit with status 1 on an invalid project name, an existing project directory or a generation failure. Declining a confirmation still exits 0; startdemo exit statuses are unchanged.
  • In-place deployment that would overwrite files now refuses to run without a terminal (CI, piped input) unless --yes is given; init then exits with status 1 and startdemo with 0.
  • Config files with a UTF-8 BOM now load; UTF-16 and UTF-32 files fail with an error that explains how to re-save them. --save-config writes LF line endings.
  • uv, PDM and Poetry no longer replace the template's pyproject.toml with a fixed skeleton: fastkit edits only the dependency and build sections it owns and keeps everything else, including requires-python. If it cannot edit the file safely, it stops with an error; an invalid pyproject.toml is kept as pyproject.toml.bak.
  • --package-manager pip now works when fastkit itself was installed with uv tool install or pipx, instead of silently switching to uv. A requirements.txt is written whenever the manager actually used is not pip.
  • fastkit addroute no longer drops an import whose text is part of an existing one (user next to users), which caused a NameError at runtime.
  • Generated tooling passes its own checks: .pre-commit-config.yaml no longer requires python3.12 on PATH, ruff no longer flags FastAPI's Depends / Query defaults (B008), and injected imports are sorted. This was checked by hand; there is no automated end-to-end test yet.
  • With classic-layered and domain-starter, Pagination no longer generates an example router that replaced the template's items list (GET /api/v1/items). It adds add_pagination(app) to main.py with a comment on how to paginate the existing endpoint. minimal and single-module keep the example router.
  • Projects with a SQL database (PostgreSQL, MySQL or SQLite) now depend on sqlalchemy[asyncio]. Plain sqlalchemy could install without greenlet, and the app or Alembic then failed at import.
  • fastkit init projects with Prometheus monitoring (minimal, single-module) no longer crash at startup.

Windows / Portability

  • fastkit reads and writes every file as UTF-8, writes generated files with LF, and keeps the existing line endings when it edits a file in place.
  • Console output on non-UTF-8 consoles and pipes no longer crashes, and list-templates and interactive template selection work on non-UTF-8 locales.
  • list-templates and the other info tables no longer split template names across lines on an 80-column console (79 usable columns on a Windows console); long descriptions wrap instead.
  • deleteproject, rollback, runserver, package-manager calls, prompts and the template inspector now handle Windows paths, read-only files, .cmd / .bat shims and Git Bash.
  • The debug log falls back to ~/.fastapi-fastkit/logs when the package directory is not writable.
  • Windows behaviour is covered by tests that simulate Windows and by the new windows-latest CI job; it has not been verified by hand on a Windows machine. Generated projects' scripts/*.sh still need Git Bash or WSL.

Documentation

  • The English docs cover the changes above: the generated .env / .env.example, init --config and exit statuses, Windows notes, how package managers keep pyproject.toml, Pagination per preset, the MCP security defaults and the new template-authoring rules.
  • The translated locales (ko/ja/zh/es/fr/de) are not re-synced in this release; reference/translation-status lists the affected pages. Where a translation disagrees with English, English applies.

Maintenance

  • CI tests on windows-latest and adds an encoding-guard job. Check names change to test (<os>, py<version>); update required status checks accordingly.
  • The template security scan now fails when a template could not be scanned, instead of reporting a clean result.

Upgrade notes for existing projects

These apply to projects generated with v1.5.1 or earlier. Upgrading fastkit does not change an existing project.

  1. If .env was committed: add these rules to .gitignore, run git rm --cached .env, commit, and keep a copy without real values as .env.example.

    .env
    .env.*
    !.env.example
    

    The old file stays in Git history, so rotate every secret it contained (SECRET_KEY, database passwords, ANTHROPIC_API_KEY / LLM_AUTH_TOKEN, MCP_API_KEY, FIRST_SUPERUSER_PASSWORD, ...). Rewrite history only if the old values must also disappear from the repository.

  2. Replace the example SECRET_KEY (changethis or another changethis-... value) with a key from python -c "import secrets; print(secrets.token_urlsafe(32))". Users have to log in again afterwards.

  3. fastapi-mcp: in src/mcp_server/router.py, pass auth_config=AuthConfig(dependencies=[Depends(verify_mcp_access)]) to FastApiMCP(...), and compare the key with secrets.compare_digest in verify_mcp_access. Remove the hard-coded demo users from src/api/routes/auth.py or put them behind ENABLE_DEMO_USERS. A newly generated project shows the full change.

  4. fastapi-auth-jwt: compare src/app/domains/auth/repository.py and service.py with a newly generated project to get transactional rotation; code that calls revoke(record) must move to revoke_if_active(jti) inside atomic().

  5. SQL database in a fastkit init project: change sqlalchemy to sqlalchemy[asyncio] (or add greenlet) in pyproject.toml and requirements.txt, then reinstall.

  6. Prometheus in a fastkit init project: move Instrumentator().instrument(app).expose(app) out of lifespan to the line after app = FastAPI(...).

  7. CORS in a fastkit init project: replace allow_origins=["*"] with your frontend origins, or set allow_credentials=False.

  8. JWT, OAuth2 or Session-based auth in a fastkit init project: remove the default "your-secret-key-here-change-in-production" / "change-me-in-production" from the auth module and set a unique SECRET_KEY in .env and in the deployment environment.

  9. Pagination with classic-layered or domain-starter: delete features/pagination.py and its import and include_router line in main.py.

  10. Scripts and CI that call fastkit init: init can now exit with status 1, and init --config no longer asks whether to create a project folder; it always creates ./<project_name>/ and ignores --yes, so adjust piped answers and paths.

Notes

  • New projects get a .env that Git ignores. Commit .env.example and keep real values in .env or in the deployment environment.
  • An in-place deployment keeps an existing .env; check that its SECRET_KEY is not an example value.

v1.5.1 (2026-10-27)

Security

  • Templates: black (GHSA-cg8m-r9f2-5wm2), certifi (GHSA-6q48-6c7w-9gw2, critical), setuptools in fastapi-dockerized (GHSA-xmj3-9gf7-h52w) and mcp in fastapi-mcp (GHSA-84m7-p3x7-pcfv) upgraded. pip-audit reports no known vulnerabilities in any template (#86, #88, #90).
  • Workspace: 40 open Dependabot alerts resolved by raising certifi, black, virtualenv and filelock (GHSA-6q48-6c7w-9gw2, GHSA-8rjx-v5ww-45pp and 18 more) (#90).

Maintenance

  • scripts/update_nav_translations.py moved its AI fallback from the retired gpt-4 to gpt-5.6-sol (contributed by @brunobuddy, #89).

Notes

  • mcp 1.30.0 changes some defaults in fastapi-mcp projects: redirects are followed only within the same origin, idle Streamable HTTP sessions close after 30 minutes, and the OAuth client validates the authorization server's issuer.

v1.5.0 (2026-10-14)

Features

  • fastkit addroute --layout classic-layer|domain (contributed by @vastimofeev, #83). Without the option, domain-starter projects get the domain layout and others keep classic-layer; the chosen layout is shown before generation.
  • The domain layout generates domains/<route>/ with models, schemas, repository, service and router, an in-memory CRUD example, and registers it in the API router.
  • Re-running addroute is safe: existing files and router registrations are kept, not duplicated.

Templates

  • fastapi-domain-starter: the items domain follows the same convention, and tests reset each domain's in-memory store so generated domains stay isolated (#83).

Security

  • PyJWT raised to 2.15.1 in fastapi-auth-jwt and fastapi-mcp (PYSEC-2026-4140 ~ 4152); fastapi-mcp pins urllib3==2.8.0 (PYSEC-2026-4175 ~ 4177).
  • Workspace floors urllib3>=2.8.0 (GHSA-gh4c-6fx4-qh6g) and anyio>=4.14.2 (GHSA-82r6-8w77-94w6, GHSA-5p39-cfhj-2xmp) (#80, #82).
  • Dev floor virtualenv>=21.7.13 closes GHSA-p58f-9548-mpm2, GHSA-x78j-v8h9-3j2q, GHSA-94p9-xgh2-xp45 and GHSA-9h9j-4vrj-gf7g.

Documentation

  • Landing pages load the logo from a path that works on the docs site (#81).
  • English: adding-routes, cli-reference and the domain-starter tutorial document --layout (#83); small fixes to the MCP tutorial and development-setup.
  • All six translated locales (ko/ja/zh/es/fr/de) brought to parity with English, including the pages changed by #83 (#84).

Maintenance

  • addroute generation moved into separate modules; add_new_route() gained an optional layout argument.

Breaking Changes

  • addroute in a domain-starter project now generates the domain layout; pass --layout classic-layer to keep the old output.

v1.4.1 (2026-09-10)

Security

  • python-jose replaced by PyJWT[crypto] in the JWT / FastAPI-Users options and fastapi-mcp (drops the unpatched ecdsa CVE-2024-23342); docs dependencies raised for Dependabot advisories.
  • passlib[bcrypt] replaced by pwdlib[argon2] in the same places; generated projects now hash passwords with argon2id.

Fixes

  • Template inspector and CI fixes: the weekly fastapi-psql-orm inspection passes again, every docker-compose ps output format is parsed with a fallback to the docker compose plugin, Docker templates are smoke-tested on the container's port, and the security-scan report counts vulnerabilities correctly.
  • startdemo / init write text files with LF and keep executable bits, so shell scripts no longer fail with bash\r: No such file or directory. fastapi-psql-orm .env now sets ENVIRONMENT=development.

v1.4.0 (2026-09-04)

Features

  • fastkit init --config <file> (JSON/TOML/YAML) for prompt-free, reproducible generation, and --save-config to save an interactive session.
  • --dry-run, --no-venv, --no-install and --yes for init and startdemo.
  • Generated projects record a [tool.fastapi-fastkit] block that runserver and addroute use instead of guessing the layout.
  • The interactive builder generates working code for every option and adds migrations (Alembic), tooling (ruff, pre-commit, GitHub Actions, devcontainer, Makefile) and logging (structured JSON). /health and /ready are always generated.
  • Templates carry # fastkit:imports / # fastkit:routes anchors for addroute.
  • Package-manager commands time out (FASTKIT_SUBPROCESS_TIMEOUT); auto-detection prefers uv.

Templates

  • New: fastapi-auth-jwt, fastapi-sqlmodel and fastapi-llm-agent.
  • Deprecated: fastapi-dockerized, fastapi-async-crud (still shipped).
  • All templates target Python 3.12, drop setup.py-tpl and the FastAPI-fastkit dependency; the fastapi-mcp package is renamed to mcp_server.

Fixes

  • A failed run no longer deletes a project directory that existed before it; startdemo refuses an existing target.
  • In-place deployment asks before overwriting and only edits files it copied.
  • Quotes and backslashes in the project name, author or description no longer break generated files.
  • Rewriting the [tool.fastapi-fastkit] block no longer corrupts arrays in it.

Maintenance

  • Interactive code generation uses Jinja2 templates; generated apps use lifespan and python:3.12-slim. jinja2 is the only new runtime dependency.
  • The template inspector runs real smoke tests and more consistency checks; scripts/inspect-templates.py gained --offline, --no-smoke and --mypy.
  • Docs: tutorials for the new templates; CLI reference and starter guide updated (EN/KO).

Breaking Changes

  • setup.py-tpl removed from bundled templates (pyproject-first).
  • Generated projects no longer list FastAPI-fastkit as a runtime dependency.
  • pip is no longer auto-upgraded during environment setup.
  • Auto-detection prefers uv over pip; pass --package-manager pip to keep the old behaviour.
  • TemplateInspector / inspect_fastapi_template take an InspectionOptions argument.

v1.3.0 (2026-05-06)

Features

  • fastkit init --interactive adds an Architecture Preset step: minimal, single-module, classic-layered and domain-starter.
  • Each preset uses its own base template; classic-layered and domain-starter keep the template's entrypoint, and runserver and generated Dockerfiles find the app module in layouts such as src/app/main.py.

Templates

  • New fastapi-domain-starter template: a domain-oriented starter with /api/v1/health and an example items domain.
  • Template READMEs have titles that fastkit list-templates shows as descriptions.

Documentation

  • New Choosing a Starter guide, Preset Feature Matrix reference, fastapi-domain-starter tutorial, and translation status and source-of-truth pages.
  • CLI examples refreshed; the Korean init --interactive walkthrough fixed.

Tests

  • End-to-end and regression tests for the presets and fastapi-domain-starter, including the pip path.

Maintenances

  • Templates are pyproject-first: inspection and project detection read pyproject.toml.
  • fastapi-domain-starter ships requirements.txt-tpl so it works with pip.

v1.2.1 (2026-04-17)

Fixes

  • A failed fastkit init with in-place deployment could delete the whole working directory; cleanup now removes only a project folder it created.
  • fastapi-single-module projects now get the project name in main.py.
  • Interactive init writes test configuration to pytest.ini instead of tests/conftest.py, which broke the generated test suite.
  • Poetry projects get a valid pyproject.toml for any version specifier, marker or extra, not just ==.
  • SQLite projects now install aiosqlite.
  • The generated Dockerfile CMD uses exec form, so the app shuts down gracefully on SIGTERM.

Security

  • Minimum versions raised for Dependabot advisories: pytest>=9.0.3, black>=26.3.1, pygments>=2.20.0, requests>=2.33.0 (and pymdown-extensions>=10.17.2 to keep the docs building).

Documentation

  • FAQ: the interactive mode section now says which files are generated only for certain options.
  • Contributing and development-setup guides updated.

Maintenances

  • Regression tests for every fix above, Ruff warnings cleaned up in the CLI, and lock files refreshed to the new security floors.

v1.2.0 (2025-11-27)

Features

  • (Breaking Change) fastkit init --interactive: a guided, feature-by-feature project builder on top of the fastapi-empty template, with compatibility warnings and a summary before creation.
  • Generates main.py, database, authentication, test and Docker files for the selected features.
  • Writes the package manager's dependency file and a requirements.txt with the dependencies of every selected feature.

Improvements

  • Interactive steps: database, authentication, background tasks, caching, monitoring, testing, utilities, deployment, package manager and custom packages.

Technical

  • The interactive backend is split into a config builder, a code generator and a dependency collector, with input validation and compatibility checks.

Documentation

  • AI translation support for the user guides.

v1.1.5 (2025-09-14)

Improvements

  • Console output adapts to the terminal size (80% of its width, up to 120 characters).

Fixes

  • CLI tables no longer truncate template names and descriptions.
  • Fixed the console not found error that affected every earlier version.

v1.1.4 (deprecated)

This hotfix build is deprecated; its issues were fixed in v1.1.5.

v1.1.3 (2025-09-13)

Templates

  • add fastapi-single-module template
  • fix the Dockerfile and docker-compose.yml of fastapi-psql-orm

v1.1.2 (2025-09-05)

Improvements

  • fastkit init and fastkit startdemo can create the project in the current directory instead of a new folder.
  • fastapi-empty lists setuptools as a dependency.
  • fastkit addroute accepts . for the current project.

v1.1.1 (2025-08-15)

Improvements

  • Template inspection workflow fixed; it now runs with uv.

v1.1.0 (2025-08-08)

Features

  • Support for the uv (default), PDM, Poetry and pip package managers: a selection step in fastkit init and fastkit startdemo, the --package-manager option, and the matching dependency files.
  • Templates are tested automatically end to end with every package manager; new templates need no test configuration.

Improvements

  • Package manager prompts with descriptions, and template quality checks that combine static inspection with these tests.

Documentation

  • User guides, CLI reference, contributing guide and template guides updated for package managers and automated template testing.

Technical

  • Package managers share a common base class and factory; CI tests every package manager.

Breaking Changes

  • Default Package Manager: changed from pip to uv.
  • CLI Prompts: interactive commands ask for a package manager.

v1.0.2 (2025-07-02)

Features

  • --debug mode writes a debug log to the package directory.

Maintenances

  • add coverage test report and apply it at pre-commit hook

v1.0.1 (2025-06-27)

Fixes

  • bump h11 version from 0.14.0 to 0.16.0

Documentations

  • add github.io site for FastAPI-fastkit (with termynal & mkdocs-material)

Maintenances

  • add CLI test cases

v1.0.0 (2025-03-01)

official release version

Features

  • rename fastkit startup to fastkit startdemo and fastkit startproject to fastkit init
  • add fastkit addroute command : for adding a route to project
  • add fastkit runserver command : for running FastAPI server

Documentations

  • complete contribution guides

v0.1.1 (2025-02-21)

pre-release version

Fixes

  • modified template metadata injection modules

v0.1.0 (2025-02-13)

initial release : pre-release version

Templates

  • add fastapi-default template
  • add fastapi-asnyc-crud template
  • add fastapi-customized-response template
  • add fastapi-dockerized template
  • add fastapi-psql-orm template

Features

  • add the fastkit CLI with --help, --version, --debug, echo, list-templates, startup, startproject and deleteproject

Maintenances

  • add test cases including template test cases

Chores

  • add version tag system
  • add pr-branching methods