This is a submission for the Hacktoberfest Weekend Challenge: Build for a Friend
My devops friend wants to learn JavaScript, but she is always getting lost in the UI.
So I removed the UI.
Terminal Is Your Friend is a small JavaScript/TypeScript playground where you can write code directly, run it, see the result, make mistakes, and continue.
There is also an AI instructor, but its job is not to write the code for you.
It tries to teach programming from simple things first: numbers, strings, conditions, arrays, loops and functions. Strong foundations before frameworks and abstractions.
KISS.
Later, when the basics are clear, you can discover TypeScript and finally a tiny TSX interface built directly into the terminal.
Try it here:
https://terminal-is-your-friend.vercel.app/
You can start with something as simple as (or even simple):
const randomid = () => Math.random().toString(36).slice(-7).toUpperCase()
return `${randomid()}-${randomid()}-${randomid()}`
and just continue from there.
The project is open source on GitHub:
The TypeScript compiler used by the project is based on my experimental TypeScript fork with support for the pipeline operator.
That experiment lives here:
TypeScript Pipeline Operator Fork
The application is intentionally small.
It is basically a dark terminal, a sandboxed JavaScript/TypeScript runtime and an AI instructor.
The instructor sees the code, the result and errors, and tries to explain what happened instead of immediately producing a solution.
The terminal also has a tiny TSX system.
For example:
return <view small center>
Hello World!
<button onClick={() =>
<view small center>N E X T</view>
}>
next
</button>
</view>
<view> simply creates the next terminal screen.
This is intentionally not React.
It is a small step between writing expressions in a terminal and understanding why UI components work at all.
The project also uses my TypeScript pipeline-operator fork.
I like the pipeline operator for the same reason I like this project:
value
|> step1
|> step2
|> result
It keeps the direction of the program visible.
Because I could experiment.
I could fork TypeScript, change the language, use open tools around it, build a strange little runtime, and connect an AI instructor to it.
None of these experiments need permission.
And somebody else can fork this project tomorrow and make it stranger.
That is the interesting part.
The project itself was developed together with AI tools, but the important experiment for me was not AI generating code.
It was the opposite question:
Can AI help somebody learn programming without taking programming away from them?
That is what the instructor is trying to explore.
Hacktoberfest Weekend Challenge — Build for a Friend