Ai Coding Tools

How to Use Cursor to Write Your First AI-Powered App in Under 2 Hours

By BTW Team3 min read

Comparing tools? See the AI tools tested on the show.

In short

A step-by-step guide that will enable you to quickly build an AI-powered application using Cursor, perfect for new developers.

If you’re like me, the idea of building an AI-powered app can feel daunting. With so many tools and frameworks out there, it's easy to get lost in the noise. But what if I told you that you could create your first AI app in under two hours using Cursor? Yes, you read that right. Cursor has streamlined the building process, making it accessible even for those of us who aren’t full-time developers. In this guide, I’ll walk you through the steps, share what you need, and highlight some honest trade-offs along the way.

Prerequisites: What You Need Before You Start

Before diving in, make sure you have the following:

  1. Cursor Account: Sign up for a free account at Cursor.
  2. Basic Understanding of JavaScript: You don’t need to be an expert, but familiarity with the basics will help.
  3. Node.js Installed: Ensure you have Node.js installed on your machine (version 14 or later).
  4. A Code Editor: I recommend using Visual Studio Code, but any editor will do.

Step-by-Step Guide to Building Your App

Step 1: Set Up Your Project

  1. Open Cursor and create a new project.

  2. Choose the "AI App" template. This comes preloaded with essential components.

  3. In the terminal, run:

    npm install
    

    This command installs necessary dependencies.

Step 2: Integrate AI Features

  1. Locate the ai.js file in your project folder. This is where you’ll define your AI functionalities.

  2. Replace the placeholder code with the following snippet:

    const AI = require('cursor-ai');
    
    const response = AI.generateResponse("What topic do you want to discuss?");
    console.log(response);
    
  3. Save your changes.

Step 3: Testing Your App

  1. In the terminal, start your app by running:

    npm start
    
  2. If everything is set up correctly, you should see your AI response in the console.

Expected Outputs

After running your app, you should see something like:

AI Response: "Let's talk about AI!"

Troubleshooting: What Could Go Wrong?

  1. Error in Installation: If you encounter issues during npm install, ensure your Node.js version is compatible.
  2. No AI Response: Double-check your API key and make sure it’s correctly set up in your config.js file.

Pricing Breakdown: How Much Does It Cost?

Cursor is quite budget-friendly, especially for indie builders. Here’s a quick pricing overview:

| Plan | Price | Features | Best For | Limitations | |---------------|---------------------|----------------------------------------|------------------------------|------------------------------------------------| | Free | $0 | Basic AI features, 5 projects | Beginners | Limited features, no custom domains | | Pro | $20/mo | Unlimited projects, priority support | Serious hobbyists | Costs can add up quickly | | Business | $49/mo | Team collaboration, advanced analytics | Small teams | Expensive for solo founders |

What We Actually Use

In our experience, we’ve found that the Pro plan is worth it if you’re serious about building multiple projects. The free tier is great for testing the waters, but you’ll soon hit limitations that could stall your progress.

Conclusion: Start Here

If you’re ready to dive into the world of AI-powered apps, Cursor is an excellent starting point. It’s cost-effective, user-friendly, and gets you up and running in no time. Follow the steps outlined above, and you’ll have your first app launched in under two hours.

Remember, the key to success is to start simple and iterate. Once you’ve built your first app, consider exploring more advanced features or integrating other tools to enhance functionality.

Watch real AI builds every week

Built This Week is a weekly podcast where Jordan Metzner and Sam Nadler build something real with AI every episode, test new AI tools and talk with founders who build with AI.

See the tools

Watch real AI builds every week

Built This Week is a weekly podcast where Jordan Metzner and Sam Nadler build something real with AI every episode, test new AI tools and talk with founders who build with AI.

See the tools
Ai Coding Tools

3 AI Coding Tools That Are Overrated (and Why You Should Avoid Them)

3 AI Coding Tools That Are Overrated (and Why You Should Avoid Them) In the everevolving landscape of AI coding tools, it's easy to get swept up in the hype. As indie hackers and s

Nov 30, 20263 min read
Ai Coding Tools

5 Ways AI Coding Tools Can Accelerate Your MVP Development in 2026

5 Ways AI Coding Tools Can Accelerate Your MVP Development in 2026 In 2026, the landscape for indie hackers and solo founders has evolved significantly, especially with the advent

Nov 26, 20264 min read
Ai Coding Tools

5 AI Coding Tools That Make Legacy Code Feel Brand New in 2026

5 AI Coding Tools That Make Legacy Code Feel Brand New in 2026 If you’re a developer stuck maintaining legacy code, you know the frustration. It’s like navigating a maze blindfolde

Nov 23, 20264 min read
Ai Coding Tools

10 AI Coding Tools That Will Save You Hours of Debugging in 2026

10 AI Coding Tools That Will Save You Hours of Debugging in 2026 Debugging can feel like a neverending cycle of frustration. Whether you're a solo founder or an indie hacker, spend

Nov 18, 20265 min read
Ai Coding Tools

10 Common Mistakes When Using AI Coding Tools for MVP Development

10 Common Mistakes When Using AI Coding Tools for MVP Development As a founder in 2026, you’re likely aware that AI coding tools can significantly speed up the MVP development proc

Nov 16, 20264 min read
Ai Coding Tools

5 AI Coding Myths Every Beginner Developer Should Ditch in 2026

5 AI Coding Myths Every Beginner Developer Should Ditch in 2026 As a beginner developer, you’ve probably come across a ton of buzz surrounding AI coding tools. But with all the hyp

Nov 12, 20263 min read