Skip to content
DATAdotPDFPublic

About

Offline AI autocomplete terminal for Linux, written 100% in KOF. Ghost text + TAB, context-aware suggestions, offline command index. No network.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

6 stars

Watchers

0 watching

Forks

KOFTERM: your problems with the terminal are over! A Linux terminal that explains each command, 100% offline, written in KOF. Free and open source.

KOFTERM

The Linux terminal that teaches you while you use it.
Explains each command as you type, suggests the rest of the line and understands plain-language requests.
Open source, 100% offline and written in KOF, a Brazilian programming language.

GPLv3 license Built with KOF 0.6.6 Linux x86_64 No network Release v0.9.1 CI good first issue

Website · Português · How to contribute · How it was built · Journal

KofTerm is and will always be free. No feature is behind a payment.
But if it helped you and you feel like buying me a coffee (or a Monster) so I can spend
more nights studying and building cool things for the community, that makes me very happy <3

Buy Me a Coffee: dotpdf
or Pix (Brazil, Itaú), random key: a6a35680-c2cd-4e0e-ab3d-8c601cc159c4


                                                                          │ Índice · F2 fecha · F1 busca
┌──(aluno㉿kali)-[~]                                                      │
└─$ sudo cat /etc/shadow                                                  │ cat
                                                                          │ Mostra o conteúdo de arquivos (ou
                                                                          │ junta vários).
                                                                          │
                                                                          │ TAMBÉM NA LINHA
                                                                          │ sudo
                                                                          │   "Super-user do": roda UM comando
                                                                          │   como administrador (root). Pede a
                                                                          │   SUA senha, não a do root, e só
                                                                          │   funciona se você estiver no grupo
                                                                          │   sudo. Tudo fica registrado no
                                                                          │   journal.
                                                                          │ /etc/shadow
                                                                          │   Os hashes das senhas e as regras
                                                                          │   de validade. Só o root lê: sem
                                                                          │   sudo dá "Permissão negada".

A real KofTerm screen on Kali: your usual Bash on the left, the index column explaining the line on the right (F2 shows or hides it). The interface starts in Portuguese; `kofterm lang en` switches the index and the screens to English.

Install

You need Linux x86_64 (a VM is fine). The program only depends on the system libc.

Ready-made release, no KOF needed: download kofterm-0.9.1-linux-x86_64.tar.gz and SHA256SUMS from the releases page.

sha256sum -c SHA256SUMS --ignore-missing && tar -xzf kofterm-0.9.1-linux-x86_64.tar.gz && ./kofterm-0.9.1-linux-x86_64/kofterm install

From source: the installer builds with KOF 0.6.6. If KOF is missing, it asks before downloading it and checks its SHA-256.

git clone https://github.com/DATAdotPDF/kofterm.git && cd kofterm && ./install.sh

Then just open it:

kofterm

Update

Run kofterm update: it shows the right command for your case, without downloading or running anything. In short, you install the new version over the old one. Your history and what KofTerm learned from you live in ~/.local/share/kofterm and stay there.

If you installed from source, inside the folder you cloned:

cd ~/kofterm && git pull && ./install.sh

If you installed the ready-made release, download the new .tar.gz and SHA256SUMS from the releases page and run the same install command with the new version number.

Then close and reopen any KofTerm windows that were open: each one keeps running the old version until it is reopened. To check: kofterm version. What changed in each version is in the CHANGELOG. KofTerm never updates itself, because it doesn't use the internet.

First steps

Key What it does
TAB or → Accepts the grey suggestion (Ctrl+→ accepts one word)
F2 Shows or hides the index column
F1 or Ctrl+T Full-screen index search
? + your request ? instalar o htop, ? quem usa a porta 22. TAB puts the command on the line; Enter runs it
↑ / ↓ Previous commands
Ctrl+R Searches the history: type part of a command, the column lists every match, ↑/↓ picks, Enter puts it on the line (without running it), Esc goes back
TAB with no grey suggestion When a name could be several files, the column lists them: TAB goes to the next, Enter picks
Mouse wheel or Shift+PgUp/PgDn Scrolls back through old output (last 2,000 lines); any key returns. To select text with the mouse, hold Shift. F3 turns the wheel off
Ctrl-L Clears the screen and keeps what you were typing

Try this: type ls -la slowly and watch the column; run cat /etc/shadow and look at the next line; ask ? qual meu ip. To try everything calmly, follow the test script (Portuguese).

In English: run kofterm lang en and open a new KofTerm window. The index, every screen and the ? recipes switch to English (? install htop). kofterm lang pt switches back.

Other commands: kofterm doctor checks the installation, kofterm uninstall removes the program (your history stays; --purge deletes everything).

What it does

Index column As you type, the right-hand column explains the command, each option used (-ld becomes -l + -d), sudo and the paths on the line (/etc/shadow). 148 commands and paths, written for beginners. F1 opens the search.
Ask your way ? qual o gateway suggests ip r; ? quanto espaço sobrou suggests df -h. 142 recipes reviewed by people, tolerant to accents, synonyms and typos. It never makes up a command.
Grey suggestion The rest of the line shows in grey, like in VS Code, and TAB accepts it. It learns from what you run, on your machine only.
Reads the context "Permission denied" suggests the same command with sudo; gti status becomes git status; a missing program becomes sudo apt install with the right package.
Works as root After sudo -i everything keeps working, and suggestions drop sudo.
Risk by context Looks at every command on the line, sudo (or being root) and the current folder. DANGER (rm -rf /, > /etc/passwd, dd to a disk) turns red and is never suggested; Caution (sudo rm -rf /etc/nginx, curl … | sh, reboot) shows in yellow, always with the reason.

Why KofTerm exists

Someone starting with Linux opens the terminal and finds a blinking cursor. Learning what ls -ld does means digging through --help; finding the command to "see the gateway" means leaving the terminal to search; "Permission denied" or "command not found" don't say what to do next.

KofTerm was born from studying networking at Cisco and having to learn Bash on a Kali VM. It sits next to your prompt like a patient teacher: you keep your usual Bash, and it explains, suggests and corrects as you type. Nothing runs without your Enter.

It's for you if you are studying Linux, networking or cybersecurity (Cisco courses, VM labs, Codecademy, Hack The Box) and want to learn the terminal by using the terminal.

Safe by rule

KofTerm sees what you type, so it follows rules that don't change:

  • 100% offline. The program opens no network connections, and CI rejects network code. Check it: inside KofTerm, ls -l /proc/$PPID/fd | grep -c socket prints 0.
  • Nothing runs by itself. Suggestions and recipes only fill the line.
  • Your data stays with you, in ~/.local/share/kofterm (folder 0700). sudo passwords don't go through the editor; lines with a password, token or key (and lines starting with a space) still run but are never saved to the history.
  • Ethical study. Scanning and capture tools come with a warning: only on your own lab network or with written permission.
  • It installs nothing. When a tool is missing, it explains how to install it; the decision is yours.

Details and how to report a vulnerability: SECURITY.md.

Made in KOF

The terminal, the screen emulator, the learning model, the installer and the 76 tests are written in KOF, a Brazilian language created by Mel Santos. Whatever the language lacks becomes a parallel KOF library, never another language; the only boundary is the system libc. Along the way, four compiler bugs were found and reported to KOF. Memory stays at 7.9 MB.

How it was all built, phase by phase: docs/HOW_IT_WAS_BUILT.md.

How to help

KofTerm is open source and built to help, cooperate and add up. You don't need to know KOF: the most valuable contributions are plain-language text.

I want to... Start with
Teach the ? mode a new request New recipe in recipes/pt_BR.txt
Explain a command better Index entry in index/pt_BR.txt
Test it and report back Test script and an issue
Write KOF code good first issue and help wanted issues
Make the model smarter kofterm contribute --preview shows what your model learned, anonymized; see datasets/contrib

Full guide: CONTRIBUTING.md · Code of Conduct

What comes next

Version What goes in
0.7.x Fixes from testing 0.7.0 and more networking recipes
0.8.0, finding things (done) History search with Ctrl+R, a candidate list when completing files, and the mouse wheel scrolling old output
0.9.0, for everyone (English done) English index, screens and recipes (done, kofterm lang en); in 0.9.x, emoji with the right width and a clear warning when the terminal is too narrow (done)
1.0.0, stable Tested by other people on several distributions and terminals, no limitation that gets in the way, stable file formats
Later A small neural model in pure KOF (kof-nn) that understands looser requests, always pointing to real recipes

How versions are numbered and the 1.0 criteria: CONTRIBUTING, section Versões (in Portuguese). See also the CHANGELOG and the issues.

Known limitations: while the wheel is on, selecting text with the mouse needs Shift (or F3 to turn the wheel off); old output keeps the last 2,000 lines; the column needs at least 40 columns left for Bash; in a window narrower than 69 columns the column hides and a notice says why.

Contributors

People who helped build KofTerm, beyond code: tests, recipes, explanations and ideas. Every accepted contribution is listed here and in the CHANGELOG.

  • Pedro D. Ferreira (@DATAdotPDF): author and first human tester.
  • Mariana (@marianabsctba): technical review. Pointed out context-aware danger checks, PTY security tests and keeping secrets out of the history, which now guide the next security release.
  • You? See how to help. 💙

How it was built (process and audit trail)

KofTerm is developed in the open, with every decision on record:

  • docs/HOW_IT_WAS_BUILT.md: phases, architecture, repository map and the end-to-end process.
  • docs/JOURNAL.md: the dated journal, including the human tests and what each one changed.
  • docs/KOF_FINDINGS.md: findings about the KOF compiler, reported upstream.
  • CHANGELOG.md: what changed in each version.
  • Signed commits and tags; AI assistance (Claude Code) is declared in every commit.

Credits

  • KOF language: created by Mel Santos (@melmonfre · LinkedIn) and maintained with the KOF contributors in the central repository KofLang/Kof4j, licensed GPL-3.0. Site: koflang.github.io.
  • koffuster by Luna (@lunalully): reference for structuring a KOF terminal tool.
  • tldr-pages (tldr-pages/tldr), CC BY 4.0: command examples for the index and the training corpus.
  • SS64 (ss64.com/bash): command reference. Its content is not copied into this repository; KofTerm links to it.

Full third-party notices in NOTICE.

Authorship

KofTerm was conceived and is developed by Pedro D. Ferreira (@DATAdotPDF). The project's authorship is recorded in its Git history, in the dated development journal and in AUTHORS.md. AI assistance (Claude Code) is disclosed with a Co-Authored-By line in each commit it helped produce.

To cite KofTerm, use CITATION.cff.

License

GNU General Public License v3.0, the same license as KOF. See LICENSE.

Contact

Portfolio LinkedIn GitHub Email

From audiovisual storytelling to reliable data and security systems.

About

Offline AI autocomplete terminal for Linux, written 100% in KOF. Ghost text + TAB, context-aware suggestions, offline command index. No network.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

6 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages