Skip to content

jovanpet/quest

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🧭 Quest

An interactive CLI tool for learning Go through hands-on coding quests with AI-powered hints.

Backstory

I used to work in big tech, and last summer I decided to venture on a journey of personal projects alongside my day job. There are just way too many cool ideas floating around. AI has made it easier than ever to fill in the gaps when things aren't working. In my opinion, AI is great at small, distinct tasks, but not very good at handling large repos.

On my first project, I had no issue setting it up and developing a few endpoints. However, the issues became apparent when my token usage skyrocketed mid-project. The codebase wasn't well organized, and I didn't have time to refactor it while enabling new features. So I scrapped it.

I decided to make my own server setup and used AI liberally for small tasks—refactoring, running tests, implementing boilerplate code with references. But there was a new problem: I'd never built a server from zero to one. Even in college, you get boilerplate. I knew the theory, but I hadn't really implemented it myself. A simple server is easy to set up, but I prefer my code organized for 100 endpoints, even though I only need 10. So I spent 3-4 days researching on Medium, Golang docs, and ChatGPT—3-4 days of not building anything, just cruising the internet on my commute.

I wished there was a way to just work on a project in VS Code and learn along the way. Well, now there is. Quest lets you learn by doing—right in your CLI, on your own terms. No books, no websites, no endless tutorials. Just hands-on coding with AI-powered hints that guide you forward.

Quick Start

# Start a new quest (in your project directory)
quest begin

# Get your next task
quest next

# Check if your code passes
quest check

# Need help? Get AI explanations
quest explain

# Mark current task as complete
quest complete

# View your progress
quest summary

#Check the health of the quest
quest health

Commands

quest begin

Start a new coding quest. Choose from curated templates or generate custom quests with AI. (Run in this in your project directory)

quest next

Move to the next task in your quest and display what you need to work on.

quest check

Validate that you have completed the requirements for the current task. Shows what passed and what failed.

Options (Recommended To Use):

  • -a, --annotate - Generate AI inline comments to code checking in depth check of the code.

quest explain

Get AI-powered explanations and hints for the current task. The AI analyzes your code and provides contextual guidance, with increasing detail based on how many times you've requested help.

quest complete

Mark the current task as complete and move to the next one.

quest jumpTo [task-number]

Jump to a specific task index or the last completed task in your quest.

Options:

  • -l, --last-complete - Jump to the last completed task

quest summary

View your quest progress across all chapters and tasks.

quest health

Checks the health of the quest.

How It Works

  1. Begin - Initialize a quest in the .quest/ folder
  2. Next - See what you need to build
  3. Code - Write your implementation
  4. Check - Validate your code automatically
  5. Explain - Get AI help if stuck
  6. Complete - Move to the next challenge

Example Usage

Here's how you'd typically use Quest:

# Create a new project directory
mkdir my-go-project
cd my-go-project

# Initialize git (so you can actually show recruiters you know what you are doing)
git init
git config user.name "Your Name"
git config user.email "your.email@example.com"

# Start a quest
quest begin
# Choose "go-web-api" template

# Work through tasks
quest next          # See what to build
# Write your code in your editor
quest check         # Validate your implementation
quest check -a      # Double down and have AI check too...
quest explain       # Stuck? Get AI hints...
quest complete      # Move to next task

# Commit your masterpiece
git add .
git commit -m "feat: completed another quest task 🚀"

# Track progress anytime
quest summary

# Push to your repo when you're feeling proud
git push origin main

That's it. No context switching, no leaving your terminal. Just code, check, and learn.

Available Templates

Quick (3 tasks each)

  • go-web-api - REST API with Go - Learn to build HTTP servers, handle JSON, and write tests
  • go-cli-tool - CLI Tool with Cobra - Create command-line tools with subcommands and flags
  • go-concurrency - Go Concurrency Patterns - Master goroutines, channels, and worker pools

Normal (10 tasks)

  • go-fairy-garden - Fairy Worker Service - Build a whimsical worker service with Go

Advanced

  • go-todo-api - Complete Todo REST API (15 tasks) - Build a full-featured REST API with CRUD, testing, and middleware
  • go-auth-system - User Authentication System (19 tasks) - Build complete auth with database, sessions, JWT, and security
  • go-isekai-server - Distributed World Manager (20 tasks) - Manage a distributed virtual world with Go

Requirements

  • Go 1.18 or higher
  • GitHub Copilot CLI (for AI hints via quest explain)

Installation

Option 1: Install via Go (Recommended)

go install github.com/jovanpet/quest@latest

This will install the quest binary to your $GOPATH/bin directory. Make sure $GOPATH/bin is in your PATH.

Option 2: Build from Source

# Clone the repository
git clone https://github.com/jovanpet/quest.git
cd quest

# Build the binary
go build -o quest

# Run it
./quest begin

```bash
# To run in the repo itself, use ./ before quest to run the executable
./quest begin

# To update the repo to the newest version
git pull origin main
go build -o quest

Option 3: Download Pre-built Binaries

Download the latest release from the releases page.


Built with ❤️ for learning Go through interactive quests.

About

Quest is a terminal-based coding practice engine: choose a template, get step-by-step tasks, run checks, and progress through a guided build.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages