Topview Logo
  • Create viral videos with
    GPT-4o + Ads library
    Use GPT-4o to edit video empowered by Youtube & Tiktok & Facebook ads library. Turns your links or media assets into viral videos in one click.
    Try it free
    gpt video

    Cursor is great BUT Aider is the OG AI Coding King (Mermaid Diagram AI Agent)

    blog thumbnail

    Introduction

    Hello engineers! Andy Dev Dan here, bringing you the latest insights from the tech ecosystem. Today, I want to share some thoughts on a trending tool, Cursor, and why I believe you should consider exploring another powerful alternative: Aider.

    The Buzz About Cursor

    Cursor has been making waves recently, particularly due to its new multifile editing feature. As a big fan of Cursor, I can appreciate the capabilities it brings to the table. However, it's important to remember that Cursor is a closed-source commercial application. Relying solely on a single tool this early in the generative AI age might not be the best approach.

    Introducing Aider

    For the past year, our channel has been leveraging AI coding through Aider—one of the original LLM-based coding tools. From what we’ve observed, Aider not only often outperforms Cursor, but it also provides greater control over the coding process. Best of all, Aider is completely free and supports multiple LLM providers. The brains behind Aider, Paul the Engineer, regularly posts insightful blogs that cover the latest developments in AI coding.

    In today’s article, I’ll demonstrate how to build a new Mermaid AI agent using Aider, allowing you to generate diagrams faster and more effectively.

    What is Mermaid?

    Before diving in, let me explain what Mermaid is. It's a fantastic text-based diagramming and charting tool that allows developers to create node-and-edge-based diagrams from simple text blocks.

    Building the Mermaid Agent

    The setup for our Mermaid AI agent is straightforward. You can run a command to specify the desired diagram and output image. Additionally, you can provide an input file for the agent to read and generate diagrams. This allows for easy iteration to improve the output.

    Here’s how the command works:

    1. Run the Command: Call our Mermaid agent with the necessary parameters, and it’ll start generating the diagram.
    2. Prompt Dissection: After running the command, we can analyze the provided prompt. For example, we might request a flowchart explaining the importance of communication through diagramming for engineering better products, specifying various benefits such as time savings and increased trust.
    3. Iterate: One of the best features of this tool is allowing continuous iteration. You can add nodes, group by benefits, and format the diagram quickly to suit your needs.

    AI Coding with Aider

    Let’s dive into the AI coding aspect with Aider. Using its terminal functionality, I will walk through implementing the necessary adjustments within our codebase. By leveraging Aider's command, I can quickly pinpoint where we save our generated diagrams and how to ensure all previous iterations are preserved.

    1. Requesting Changes: I’ll ask Aider what changes are needed to move generated images into the output directory while appending iteration numbers.
    2. Utilizing Existing Functions: Aider identifies that we have a function for building the appropriate file path, making the necessary adjustment easy.
    3. Implementation: After discussing the changes, I’ll instruct Aider to implement them.

    Bulk Command Creation

    Now, to enhance our Mermaid AI agent further, I'll create a new command that allows users to generate multiple diagram versions at once. This is particularly useful when exploring various design options and visual perspectives.

    1. New Command Setup: I’ll add a flag that enables creating multiple versions of a diagram.
    2. Configuration: Leveraging Aider allows me to make all these changes efficiently, with one prompt handling multiple files and configurations.
    3. Execution: Running the new bulk command generates several diagrams, which lets us visually assess multiple options quickly.

    The Outcome

    Using the new bulk command, Aider is capable of generating several unique diagrams that provide varied perspectives on the project or task at hand. This not only aids in clarity but also improves communication—an invaluable skill for engineers looking to convey ideas rapidly.

    Final Thoughts

    I want to emphasize the power of diversifying your AI coding tools. While Cursor is an excellent resource, it’s essential not to be locked into a single application. Aider provides an open-source, customizable alternative that can help you achieve significantly more control over your coding experience. As we explore the future of generative AI, it’s vital to stay agile, learning and adapting as new tools emerge.

    If you're keen on generating diagrams and enhancing your workflow, I highly recommend exploring Aider alongside Cursor. It’s an exciting time to be part of the generative AI landscape, and embracing these innovations will benefit your career and projects.


    Keywords

    • Cursor
    • Aider
    • AI Coding
    • Mermaid
    • Diagram Generation
    • Multifile Editing
    • Open Source
    • LLM
    • Engineering Communication

    FAQ

    1. What is Cursor? Cursor is a closed-source commercial application designed for coding assistance, recently gaining traction due to its multifile editing feature.

    2. What is Aider? Aider is an open-source AI coding tool that allows customizable coding assistance and supports multiple LLM providers.

    3. How does the Mermaid AI agent work? The Mermaid AI agent creates diagrams based on text input, allowing for rapid iteration and improvements to visuals.

    4. Why should I diversify my coding tools? Diversifying coding tools mitigates risk and provides access to a wider range of functionalities, especially as the generative AI landscape evolves.

    5. How can Aider enhance engineering communication? Aider simplifies the process of generating diagrams, a crucial aspect of clear engineering communication, helping to convey complex ideas succinctly.

    One more thing

    In addition to the incredible tools mentioned above, for those looking to elevate their video creation process even further, Topview.ai stands out as a revolutionary online AI video editor.

    TopView.ai provides two powerful tools to help you make ads video in one click.

    Materials to Video: you can upload your raw footage or pictures, TopView.ai will edit video based on media you uploaded for you.

    Link to Video: you can paste an E-Commerce product link, TopView.ai will generate a video for you.

    You may also like