
Install go from go dev for your OS, create an OpenAI API key in the dashboard within a project, and choose an editor like Visual Studio Code to start coding.
Create a simple Go project structure with modules, a cmd folder for maker and server, and an internal agents package, then add a Makefile and run the project.
Build an OpenAI client in Go and generate an entire medium-sized Go project from a first prompt, parsing model responses into files (including a readme) with system and user prompts.
Build the core AI agent client in Go that integrates OpenAI API responses into file creation tasks, with a buffered task channel, a worker pool, and concurrency controls.
Add command line arguments to configure the Golang agent, including the open api key, output directory, base package, and worker count, with environment variable fallbacks and validation.
Add workers and a start method to a go-based code writing agent, using go routines, a task queue, and a mutex-protected file writer to create files in an output directory.
Learn how to stop an AI agent gracefully and clean up resources in Go by implementing a stop method, closing channels, canceling contexts, and waiting for all routines to finish.
Stabilize llm responses by crafting solid system prompts and templates, enabling predictable output for building files and programs such as a to-do app, makefiles, and go code.
Learn to set up and embed templates in a Go code writing agent, creating embedded and overwritable templates, defining metadata, prompts, and file support, and loading templates.
Learn to load and manage code templates in Go by loading embedded and user-defined JSON templates, handling directories, JSON validation, and default fallbacks.
Update the agent to accept a template name and language via command line, remove unused code, and implement error handling to ensure templates load with neatly organized outputs.
Learn to load and manage prompt templates from files for a Golang-based code-writing agent, validate JSON templates, and apply language-specific defaults to system and user prompts.
Learn to parse and execute Go templates, produce a string from processed content, handle errors, and pass data to generate code in a Golang based agent.
Build a code generator in Go by implementing a generate code method with templates. Process templates, set the agent language, create files, and queue tasks for OpenAI prompts.
Explore code generation by implementing the generate code method for an agent, sending template-based prompts to the OpenAI API, handling responses, and wiring main setup for a to-do Go project.
Develop a go-based code writing parser that converts openai responses into code with regex, cleans content, and queues files (readme, makefile, config, internal, routes) for end-to-end code generation.
Polish the golang cli by accepting model and timeout via command line, building the prompt from all args, and wiring the OpenAI model into the http client to generate code.
Extend the Go code writing agent by adding command line flags to list templates and languages, and implement corresponding methods to display the supported templates and languages.
The lecture shows adding multiple language templates and generating runnable code for Java Spring and Python Flask, using templates to build to-do applications with Lombok, JPA, SQLAlchemy, and in-memory databases.
Demonstrates adding a new template without changing code to generate a Django project, including env configuration and a new model, proving the template-driven code writing approach.
Expose the app through a simple web server by adding web/static/index.html with tailwind from the CDN and a templates and models form using WebSocket for real-time AI responses.
Set up an HTTP server and WebSocket using Gorilla Toolkit, define project request and progress event types, and implement a JSON writer with a mutex to manage the WebSocket connection.
Implement an http handler that upgrades to a websocket, reads json project request, and sends progress events to front end while driving code generation with an OpenAI client, zipping directory.
Build a Go function to zip an entire directory by recursively traversing files, creating archive entries, and copying each file into the zip, with proper error handling and imports.
Add a progress callback to the agent to send messages to the frontend during file operations and code generation, enabling real-time status updates.
Test the http server by configuring port, output directory, and open api key, mount the static home and code-generation endpoints, and enable zip download for a JavaScript express to-do app.
Implement a download handler that uses the session UUID to locate and download the zip file with proper headers, then mount it in main and test the browser download flow.
Update the makefile to build and run the HTTP server and command-line app, ensuring the web folder sits with the server and templates are organized in a folder.
Ever wanted to harness the power of AI to write code for you? In this hands-on course, you'll build your very own AI code generation tool using Go! This is the first Golang course on this subject.
I'll guide you step-by-step as we create a powerful application that uses OpenAI's API to generate complete projects in multiple programming languages. You'll learn how to implement concurrent processing, template systems, and even build a sleek web interface.
The course focuses on using prompt engineering to get a consistent response from the LLM, which we, in turn, parse to build out our program. What you will build in this course is fantastic and shows AI's unlimited power.
By the end of this course, you'll have:
A fully functional AI code generator with the ability to generate full project.
Support for Golang, Python, JavaScript, and Java
A professional web UI with real-time progress tracking using WebSocket
Skills to build your own AI-powered development tools
Learn how t build a code generation engine from scratch
Perfect for Go developers curious about AI integration or anyone looking to boost their productivity with custom AI tools.
No AI experience needed - just basic Go knowledge!
Join me and discover how easy it is to build your own AI coding assistant!