whatisgithub

What is teenycode?

yangshun/teenycode — explained in plain English

Analysis updated 2026-05-18

90TypeScriptAudience · developerComplexity · 2/5Setup · easy

In one sentence

A roughly 200-line educational terminal coding assistant that reads, lists, and edits files using OpenAI's API, built to show how AI coding agents work.

Mindmap

mindmap
  root((Teenycode))
    What it does
      Terminal coding agent
      Reads and edits files
      ~200 lines of code
    Purpose
      Educational project
      Not production tool
      Based on Amp guide
    Tools
      Read file
      List files
      Edit or create file
    Setup
      OpenAI API key
      Run without cloning
    Audience
      Developers learning agents

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Read the source code to learn how a minimal AI coding agent loop works

USE CASE 2

Run a simple terminal chat assistant that can read, list, and edit local files

USE CASE 3

Use as a starting template for building a custom coding agent

What is it built with?

TypeScriptOpenAI APINode.js

How does it compare?

yangshun/teenycodev9ai/ai-engineer-roadmapryderwe/sollin-music-desktop
Stars909091
LanguageTypeScriptTypeScriptTypeScript
Setup difficultyeasymoderatemoderate
Complexity2/53/52/5
Audiencedeveloperdevelopergeneral

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · easy Time to first run · 5min

Requires an OpenAI API key set as an environment variable or in a config file.

So what is it?

Teenycode is a minimal coding assistant that runs in the terminal and is built for learning purposes. It connects to OpenAI's API and can read, list, and edit files in whatever folder you run it from, responding to plain-language instructions you type into a chat prompt. The entire project is around 200 lines of TypeScript code, intentionally kept small so that anyone curious about how AI coding tools work can read through the source and understand each part. The README explicitly states this is an educational project, not a production tool, and it credits a guide by Amp as the starting point. The agent has three built-in file tools: one to read a file's contents, one to list files and folders in a directory, and one to make a specific text replacement inside a file or create a new file. There is no ability to run shell commands, which the README notes is an intentional omission for safety reasons, though you can add that yourself. Getting started is straightforward. You need an OpenAI API key, which you either set as an environment variable or put in a local configuration file. From there you can run the tool directly without cloning the repository using a single command, or clone it and run from source if you want to modify the code. The tool is meant to demonstrate the core loop of an AI agent: receive a message, decide which file tool to use, call that tool, observe the result, and respond. For anyone who wants to understand how tools like GitHub Copilot or Claude Code work at their simplest, this project offers a readable starting point.

Copy-paste prompts

Prompt 1
Walk me through teenycode's source code to explain how the agent loop works
Prompt 2
Help me set up teenycode with my OpenAI API key and run it in a project folder
Prompt 3
Show me how to add a new file tool to teenycode, like renaming files
Prompt 4
Explain how teenycode's file-edit tool avoids overwriting the whole file

Frequently asked questions

What is teenycode?

A roughly 200-line educational terminal coding assistant that reads, lists, and edits files using OpenAI's API, built to show how AI coding agents work.

What language is teenycode written in?

Mainly TypeScript. The stack also includes TypeScript, OpenAI API, Node.js.

How hard is teenycode to set up?

Setup difficulty is rated easy, with roughly 5min to a first successful run.

Who is teenycode for?

Mainly developer.

Open on GitHub → Ask about another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.