<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Kashish</title>
    <description>The latest articles on DEV Community by Kashish (@crestxcode).</description>
    <link>https://dev.to/crestxcode</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3898691%2F6ba3b33b-34be-4bfb-9c7f-a6a6b55e021b.png</url>
      <title>DEV Community: Kashish</title>
      <link>https://dev.to/crestxcode</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/crestxcode"/>
    <language>en</language>
    <item>
      <title>I Got Tired of Setting Up FastAPI Projects Manually — So I Built a CLI to Do It For Me</title>
      <dc:creator>Kashish</dc:creator>
      <pubDate>Sun, 26 Apr 2026 11:59:29 +0000</pubDate>
      <link>https://dev.to/crestxcode/i-got-tired-of-setting-up-fastapi-projects-manually-so-i-built-a-cli-to-do-it-for-me-3p3j</link>
      <guid>https://dev.to/crestxcode/i-got-tired-of-setting-up-fastapi-projects-manually-so-i-built-a-cli-to-do-it-for-me-3p3j</guid>
      <description>&lt;p&gt;I'm a third year engineering student still learning FastAPI.&lt;br&gt;
I came across this problem while building a project — had to create&lt;br&gt;
all these files manually and thought there has to be a better way.&lt;/p&gt;

&lt;p&gt;Here's what that painful setup looks like every single time:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Create the folder structure&lt;/li&gt;
&lt;li&gt;Write models.py&lt;/li&gt;
&lt;li&gt;Wire up the routes&lt;/li&gt;
&lt;li&gt;Set up the database config&lt;/li&gt;
&lt;li&gt;Write main.py&lt;/li&gt;
&lt;li&gt;Install dependencies&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I literally did all of this manually for one of my projects — typing &lt;br&gt;
every file, every folder, every import from scratch in the terminal. &lt;br&gt;
And halfway through I thought... why am I doing this again?&lt;/p&gt;

&lt;p&gt;So over two nights I built a CLI that does all of it for me.&lt;/p&gt;
&lt;h2&gt;
  
  
  How it works
&lt;/h2&gt;

&lt;p&gt;You define your models in a simple JSON file:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"models"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"User"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"id"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"int"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"name"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"str"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"email"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"str"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"Item"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"id"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"int"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"name"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"str"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"price"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"float"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"routes"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"User"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Item"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then run one command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;python &lt;span class="nt"&gt;-m&lt;/span&gt; generator.cli myapp &lt;span class="nt"&gt;--json&lt;/span&gt; schema.json &lt;span class="nt"&gt;--db&lt;/span&gt; &lt;span class="nt"&gt;--install&lt;/span&gt; &lt;span class="nt"&gt;--run&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And you get a fully working FastAPI backend — SQLAlchemy models, &lt;br&gt;
CRUD routes, database setup, everything — live at /docs in seconds.&lt;/p&gt;

&lt;p&gt;No more copy pasting. No more manual setup.&lt;/p&gt;

&lt;h2&gt;
  
  
  What it generates
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;SQLAlchemy ORM models&lt;/li&gt;
&lt;li&gt;Full CRUD routes for every model&lt;/li&gt;
&lt;li&gt;Database configuration&lt;/li&gt;
&lt;li&gt;FastAPI app entry point&lt;/li&gt;
&lt;li&gt;requirements.txt&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What I learned
&lt;/h2&gt;

&lt;p&gt;Honestly building this taught me more about how FastAPI and SQLAlchemy &lt;br&gt;
actually work under the hood than any tutorial did. When you're &lt;br&gt;
generating the code yourself, you really have to understand every &lt;br&gt;
single line of it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Try it out
&lt;/h2&gt;

&lt;p&gt;GitHub: &lt;a href="https://github.com/CrestXcode/API-BOILERPLATE-GENERATOR" rel="noopener noreferrer"&gt;https://github.com/CrestXcode/API-BOILERPLATE-GENERATOR&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It's my first open source project and I'd love feedback — what's &lt;br&gt;
missing, what could be better, would you actually use this? Drop &lt;br&gt;
a comment! 🙏&lt;/p&gt;

&lt;p&gt;And if it saved you even 10 minutes — that's enough for me!&lt;/p&gt;

</description>
      <category>python</category>
      <category>fastapi</category>
      <category>opensource</category>
      <category>beginners</category>
    </item>
  </channel>
</rss>
