Skip to content

Conversation

@savannahostrowski
Copy link
Member

@savannahostrowski savannahostrowski commented Oct 27, 2025

This PR adds the initial version of fastapi new, which initializes your project, installs dependencies, and downloads boilerplate code to simplify the fastapi getting started experience.

The goal is to support two core workflows:

# One-off project creation (no install):
uvx fastapi-new my-project

# If they want it integrated:
pip install "fastapi[standard,new]"
fastapi new my-project

The commands above create identical projects with main.py, README.md, and project configuration with a pyproject.toml.

Once this is merged, I will follow up with a PR to fastapi-cli to register this command
and update our docs to reflect this simpler path to getting started. Later, I'd like to extend this to allow users to pass --template or a similar option to customize the boilerplate downloaded.

image

@savannahostrowski savannahostrowski added feature New feature or request and removed feature New feature or request labels Oct 27, 2025
Copy link

@patrick91 patrick91 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't wait to have this!

I've left some comments, hopefully I'm not too annoying :D

Copy link
Member

@tiangolo tiangolo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is looking great! 🤩

I tried it locally to see how it feels and how it looks in the terminal, so polished! I like it. ✨

I just have a few minor comments.

),
] = None,
python: Annotated[
str | None,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm realizing we can require Python 3.10+ for running fastapi-new, so we can finally use the new union vertical bar [tears of joy 🥹].

Copy link
Member

@tiangolo tiangolo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome! This looks great! 🚀 ✨ 🎉

@tiangolo tiangolo changed the title fastapi new command ✨ Add implementation of fastapi-new CLI, and base for fastapi new command Nov 10, 2025
@tiangolo tiangolo merged commit 031b857 into fastapi:main Nov 10, 2025
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants