Changelog
v1.5.2 (2026-12-01)
Security
- Templates ship
.env.exampleinstead of.env(template authors:.env-tplis now.env.example-tpl).initandstartdemocreate the local.envfrom it with a freshly generatedSECRET_KEY, so projects no longer share the public example key. An existing.envis never overwritten, and the generated key is never printed. - Every template's
.gitignorenow ignores.envand.env.*and keeps.env.example; before, most templates did not ignore.env, andfastapi-mcphad no.gitignoreat all. fastapi-auth-jwt,fastapi-llm-agent,fastapi-domain-starterandfastapi-sqlmodelrefuse to start withENVIRONMENT=productionand an exampleSECRET_KEY.fastapi-mcpalso refuses a missingSECRET_KEYorENABLE_DEMO_USERS=truein production. Templates withsrc/core/config.pyalready rejectedchangethisoutsidedevelopment.fastapi-mcp: the MCP endpoint had no authentication, andMCP_API_KEYhad no effect. It now requiresAuthorization: Bearer <MCP_API_KEY>whenMCP_API_KEYis set, and a valid JWT access token otherwise.fastapi-mcp: the demo accounts (user1,user2,admin) exist only with the newENABLE_DEMO_USERS=true(defaultfalse), and the defaultSECRET_KEYis 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 byrevoke_if_active(jti).fastkit initwith the CORS utility no longer allows every origin with credentials: CORS is enabled only for the origins inBACKEND_CORS_ORIGINS, and*turns credentials off.fastkit initauth modules (JWT, OAuth2, Session-based) no longer ship a default secret. They sign withSECRET_KEYfrom.envand refuse to start with a missing or example key in production.SESSION_SECRET_KEYis no longer read.
Templates
fastapi-mcp: newENVIRONMENTsetting;MCP_MOUNT_PATHis now honoured (the server always mounted at/mcp);BACKEND_CORS_ORIGINSaccepts a comma-separated value. Known limitation: inMCP_API_KEYmode, tools that call JWT-protected endpoints return401(see the template README).fastapi-custom-response:.gitignoreno longer hides the project'sscripts/directory.- Every template ships a
.gitattributesthat keeps LF in shell scripts, Dockerfiles, compose files,Makefileand.envfiles, even withcore.autocrlf=true. uvloopis no longer installed on Windows, which it does not support.fastapi-auth-jwt,fastapi-domain-starter,fastapi-llm-agent,fastapi-mcpandfastapi-sqlmodelship tests for the production guard, andfastapi-auth-jwtfor 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.--yeshas no effect with--config.- Plain and
--interactiveinitexit with status 1 on an invalid project name, an existing project directory or a generation failure. Declining a confirmation still exits 0;startdemoexit statuses are unchanged. - In-place deployment that would overwrite files now refuses to run without a terminal (CI, piped input) unless
--yesis given;initthen exits with status 1 andstartdemowith 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-configwrites LF line endings. - uv, PDM and Poetry no longer replace the template's
pyproject.tomlwith a fixed skeleton: fastkit edits only the dependency and build sections it owns and keeps everything else, includingrequires-python. If it cannot edit the file safely, it stops with an error; an invalidpyproject.tomlis kept aspyproject.toml.bak. --package-manager pipnow works when fastkit itself was installed withuv tool installor pipx, instead of silently switching to uv. Arequirements.txtis written whenever the manager actually used is not pip.fastkit addrouteno longer drops an import whose text is part of an existing one (usernext tousers), which caused aNameErrorat runtime.- Generated tooling passes its own checks:
.pre-commit-config.yamlno longer requirespython3.12onPATH, ruff no longer flags FastAPI'sDepends/Querydefaults (B008), and injected imports are sorted. This was checked by hand; there is no automated end-to-end test yet. - With
classic-layeredanddomain-starter, Pagination no longer generates an example router that replaced the template's items list (GET /api/v1/items). It addsadd_pagination(app)tomain.pywith a comment on how to paginate the existing endpoint.minimalandsingle-modulekeep the example router. - Projects with a SQL database (PostgreSQL, MySQL or SQLite) now depend on
sqlalchemy[asyncio]. Plainsqlalchemycould install withoutgreenlet, and the app or Alembic then failed at import. fastkit initprojects 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-templatesand interactive template selection work on non-UTF-8 locales. list-templatesand 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/.batshims and Git Bash.- The debug log falls back to
~/.fastapi-fastkit/logswhen the package directory is not writable. - Windows behaviour is covered by tests that simulate Windows and by the new
windows-latestCI job; it has not been verified by hand on a Windows machine. Generated projects'scripts/*.shstill need Git Bash or WSL.
Documentation
- The English docs cover the changes above: the generated
.env/.env.example,init --configand exit statuses, Windows notes, how package managers keeppyproject.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-statuslists the affected pages. Where a translation disagrees with English, English applies.
Maintenance
- CI tests on
windows-latestand adds anencoding-guardjob. Check names change totest (<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.
-
If
.envwas committed: add these rules to.gitignore, rungit rm --cached .env, commit, and keep a copy without real values as.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. -
Replace the example
SECRET_KEY(changethisor anotherchangethis-...value) with a key frompython -c "import secrets; print(secrets.token_urlsafe(32))". Users have to log in again afterwards. -
fastapi-mcp: insrc/mcp_server/router.py, passauth_config=AuthConfig(dependencies=[Depends(verify_mcp_access)])toFastApiMCP(...), and compare the key withsecrets.compare_digestinverify_mcp_access. Remove the hard-coded demo users fromsrc/api/routes/auth.pyor put them behindENABLE_DEMO_USERS. A newly generated project shows the full change. -
fastapi-auth-jwt: comparesrc/app/domains/auth/repository.pyandservice.pywith a newly generated project to get transactional rotation; code that callsrevoke(record)must move torevoke_if_active(jti)insideatomic(). -
SQL database in a
fastkit initproject: changesqlalchemytosqlalchemy[asyncio](or addgreenlet) inpyproject.tomlandrequirements.txt, then reinstall. -
Prometheus in a
fastkit initproject: moveInstrumentator().instrument(app).expose(app)out oflifespanto the line afterapp = FastAPI(...). -
CORS in a
fastkit initproject: replaceallow_origins=["*"]with your frontend origins, or setallow_credentials=False. -
JWT, OAuth2 or Session-based auth in a
fastkit initproject: remove the default"your-secret-key-here-change-in-production"/"change-me-in-production"from the auth module and set a uniqueSECRET_KEYin.envand in the deployment environment. -
Pagination with
classic-layeredordomain-starter: deletefeatures/pagination.pyand its import andinclude_routerline inmain.py. -
Scripts and CI that call
fastkit init:initcan now exit with status 1, andinit --configno 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
.envthat Git ignores. Commit.env.exampleand keep real values in.envor in the deployment environment. - An in-place deployment keeps an existing
.env; check that itsSECRET_KEYis not an example value.
v1.5.1 (2026-10-27)
Security
- Templates:
black(GHSA-cg8m-r9f2-5wm2),certifi(GHSA-6q48-6c7w-9gw2, critical),setuptoolsinfastapi-dockerized(GHSA-xmj3-9gf7-h52w) andmcpinfastapi-mcp(GHSA-84m7-p3x7-pcfv) upgraded.pip-auditreports no known vulnerabilities in any template (#86, #88, #90). - Workspace: 40 open Dependabot alerts resolved by raising
certifi,black,virtualenvandfilelock(GHSA-6q48-6c7w-9gw2, GHSA-8rjx-v5ww-45pp and 18 more) (#90).
Maintenance
scripts/update_nav_translations.pymoved its AI fallback from the retiredgpt-4togpt-5.6-sol(contributed by @brunobuddy, #89).
Notes
mcp1.30.0 changes some defaults infastapi-mcpprojects: redirects are followed only within the same origin, idle Streamable HTTP sessions close after 30 minutes, and the OAuth client validates the authorization server'sissuer.
v1.5.0 (2026-10-14)
Features
fastkit addroute --layout classic-layer|domain(contributed by @vastimofeev, #83). Without the option,domain-starterprojects get thedomainlayout and others keepclassic-layer; the chosen layout is shown before generation.- The
domainlayout generatesdomains/<route>/with models, schemas, repository, service and router, an in-memory CRUD example, and registers it in the API router. - Re-running
addrouteis safe: existing files and router registrations are kept, not duplicated.
Templates
fastapi-domain-starter: theitemsdomain follows the same convention, and tests reset each domain's in-memory store so generated domains stay isolated (#83).
Security
PyJWTraised to 2.15.1 infastapi-auth-jwtandfastapi-mcp(PYSEC-2026-4140 ~ 4152);fastapi-mcppinsurllib3==2.8.0(PYSEC-2026-4175 ~ 4177).- Workspace floors
urllib3>=2.8.0(GHSA-gh4c-6fx4-qh6g) andanyio>=4.14.2(GHSA-82r6-8w77-94w6, GHSA-5p39-cfhj-2xmp) (#80, #82). - Dev floor
virtualenv>=21.7.13closes 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-referenceand the domain-starter tutorial document--layout(#83); small fixes to the MCP tutorial anddevelopment-setup. - All six translated locales (ko/ja/zh/es/fr/de) brought to parity with English, including the pages changed by #83 (#84).
Maintenance
addroutegeneration moved into separate modules;add_new_route()gained an optionallayoutargument.
Breaking Changes
addroutein adomain-starterproject now generates the domain layout; pass--layout classic-layerto keep the old output.
v1.4.1 (2026-09-10)
Security
python-josereplaced byPyJWT[crypto]in the JWT / FastAPI-Users options andfastapi-mcp(drops the unpatchedecdsaCVE-2024-23342); docs dependencies raised for Dependabot advisories.passlib[bcrypt]replaced bypwdlib[argon2]in the same places; generated projects now hash passwords with argon2id.
Fixes
- Template inspector and CI fixes: the weekly
fastapi-psql-orminspection passes again, everydocker-compose psoutput format is parsed with a fallback to thedocker composeplugin, Docker templates are smoke-tested on the container's port, and the security-scan report counts vulnerabilities correctly. startdemo/initwrite text files with LF and keep executable bits, so shell scripts no longer fail withbash\r: No such file or directory.fastapi-psql-orm.envnow setsENVIRONMENT=development.
v1.4.0 (2026-09-04)
Features
fastkit init --config <file>(JSON/TOML/YAML) for prompt-free, reproducible generation, and--save-configto save an interactive session.--dry-run,--no-venv,--no-installand--yesforinitandstartdemo.- Generated projects record a
[tool.fastapi-fastkit]block thatrunserverandaddrouteuse 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) andlogging(structured JSON)./healthand/readyare always generated. - Templates carry
# fastkit:imports/# fastkit:routesanchors foraddroute. - Package-manager commands time out (
FASTKIT_SUBPROCESS_TIMEOUT); auto-detection prefersuv.
Templates
- New:
fastapi-auth-jwt,fastapi-sqlmodelandfastapi-llm-agent. - Deprecated:
fastapi-dockerized,fastapi-async-crud(still shipped). - All templates target Python 3.12, drop
setup.py-tpland theFastAPI-fastkitdependency; thefastapi-mcppackage is renamed tomcp_server.
Fixes
- A failed run no longer deletes a project directory that existed before it;
startdemorefuses 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
lifespanandpython:3.12-slim.jinja2is the only new runtime dependency. - The template inspector runs real smoke tests and more consistency checks;
scripts/inspect-templates.pygained--offline,--no-smokeand--mypy. - Docs: tutorials for the new templates; CLI reference and starter guide updated (EN/KO).
Breaking Changes
setup.py-tplremoved from bundled templates (pyproject-first).- Generated projects no longer list
FastAPI-fastkitas a runtime dependency. pipis no longer auto-upgraded during environment setup.- Auto-detection prefers
uvoverpip; pass--package-manager pipto keep the old behaviour. TemplateInspector/inspect_fastapi_templatetake anInspectionOptionsargument.
v1.3.0 (2026-05-06)
Features
fastkit init --interactiveadds anArchitecture Presetstep:minimal,single-module,classic-layeredanddomain-starter.- Each preset uses its own base template;
classic-layeredanddomain-starterkeep the template's entrypoint, andrunserverand generated Dockerfiles find the app module in layouts such assrc/app/main.py.
Templates
- New
fastapi-domain-startertemplate: a domain-oriented starter with/api/v1/healthand an exampleitemsdomain. - Template READMEs have titles that
fastkit list-templatesshows as descriptions.
Documentation
- New
Choosing a Starterguide,Preset Feature Matrixreference,fastapi-domain-startertutorial, and translation status and source-of-truth pages. - CLI examples refreshed; the Korean
init --interactivewalkthrough fixed.
Tests
- End-to-end and regression tests for the presets and
fastapi-domain-starter, including thepippath.
Maintenances
- Templates are pyproject-first: inspection and project detection read
pyproject.toml. fastapi-domain-startershipsrequirements.txt-tplso it works withpip.
v1.2.1 (2026-04-17)
Fixes
- A failed
fastkit initwith in-place deployment could delete the whole working directory; cleanup now removes only a project folder it created. fastapi-single-moduleprojects now get the project name inmain.py.- Interactive init writes test configuration to
pytest.iniinstead oftests/conftest.py, which broke the generated test suite. - Poetry projects get a valid
pyproject.tomlfor any version specifier, marker or extra, not just==. - SQLite projects now install
aiosqlite. - The generated Dockerfile
CMDuses exec form, so the app shuts down gracefully onSIGTERM.
Security
- Minimum versions raised for Dependabot advisories:
pytest>=9.0.3,black>=26.3.1,pygments>=2.20.0,requests>=2.33.0(andpymdown-extensions>=10.17.2to 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 thefastapi-emptytemplate, 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.txtwith 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
consolenot 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-moduletemplate - fix the Dockerfile and
docker-compose.ymloffastapi-psql-orm
v1.1.2 (2025-09-05)
Improvements
fastkit initandfastkit startdemocan create the project in the current directory instead of a new folder.fastapi-emptylistssetuptoolsas a dependency.fastkit addrouteaccepts.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 initandfastkit startdemo, the--package-manageroption, 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
--debugmode 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
h11version 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 startuptofastkit startdemoandfastkit startprojecttofastkit init - add
fastkit addroutecommand : for adding a route to project - add
fastkit runservercommand : 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-defaulttemplate - add
fastapi-asnyc-crudtemplate - add
fastapi-customized-responsetemplate - add
fastapi-dockerizedtemplate - add
fastapi-psql-ormtemplate
Features
- add the
fastkitCLI with--help,--version,--debug,echo,list-templates,startup,startprojectanddeleteproject
Maintenances
- add test cases including template test cases
Chores
- add version tag system
- add pr-branching methods