Inspiration
Debugging code inside terminal-based workflows often creates unnecessary friction. Leaving the terminal or editor to search for fixes breaks concentration and slows down development. We wanted to build a fast, lightweight command-line tool that lets developers troubleshoot and fix broken scripts directly from their shell without switching contexts.
What it does
GemTerm is a terminal-native automated code debugging tool. When given a target file and an error description or traceback message directly via the command line:
- It ingests the broken code alongside the reported issue.
- Queries Gemini to analyze the failure and generate a corrected script.
- Safely writes the fixed solution to a new
_correctedfile, preserving the original code intact.
How we built it
- Language: Python
- AI Model: Google Gemini API (
gemini-3.6-flash) - File Handling & CLI: Native Python standard libraries (
os,sys,argparse) andrichfor formatted terminal output. - Packaging: PyInstaller to build a portable standalone executable.
Challenges we ran into
- Formatting API prompts to guarantee raw, clean executable code without conversational filler or markdown artifacts.
- Ensuring safe, non-destructive file operations so original source files are never corrupted.
- Packaging external API client dependencies into a single lightweight binary.
Accomplishments that we're proud of
- Building a working end-to-end command-line utility from scratch.
- Creating a practical developer tool that solves real coding issues instantly from the terminal.
What we learned
- Integrating Gemini APIs into custom Python terminal applications.
- Designing reliable prompt templates for precise code generation.
- Compiling Python applications into portable executables using PyInstaller.
What's next for GemTerm
- Adding terminal color-coded diff views to inspect changes before writing.
- Adding flags to automatically pipe tracebacks and error logs directly from shell execution.
Log in or sign up for Devpost to join the conversation.