A fully interactive, filesystem-driven retro terminal website simulation (green-on-black Linux shell) built with PHP + JavaScript.
This project is a web-based terminal emulation experience designed to look and feel like an old-school Linux shell running over SSH. Visitors interact with your site through simulated commands such as ls, cd, cat, less, and more. All content is stored in a simple folder structure and rendered dynamically β no CMS or database required.
Perfect for:
- Retro-styled personal websites
- Developer portfolios
- Documentation sites
- Easter-egg terminal interfaces
- Nostalgia projects
- Fake SSH login sequence
- Realistic green-on-black CRT-style UI
- Blinking cursor, auto-scroll, editable prompt
- Command history (
β/β) - Tab completion for commands & filenames
- Markdown renderer with headings/lists/bold/italic, clickable links, and inline ANSI art
- Responsive layout recalculates pager height + ASCII art width on resize
- Toggleable CRT bloom/scanline filter via the
crtcommand - Mobile-friendly keyboard helper so touch devices keep the software keyboard open
- Configurable file-type whitelist + download list (exposed through the
getcommand) - Faux utility commands (
banner,figlet,find,locate,grep,get, etc.) for extra realism
Everything the user sees comes from the content/ directory.
- Add folders β becomes directories in the terminal
- Add
.mdfiles β viewable viacat&less - Add images β rendered as ASCII art
- MOTD loaded from
content/_meta/motd.md
| Command | Description |
|---|---|
help |
Show available commands |
ls, ls -l, ls -lh |
Directory listing (with fake UNIX permissions) |
cd |
Change directory |
pwd |
Print working directory |
cat <file> |
Display text/markdown or ASCII-converted images |
less <file> |
Full-screen pager with keyboard navigation |
man <cmd> |
Show the faux manual entry for a command |
uname [-a] |
Display simulated system information |
whoami |
Show the current user name |
date |
Display the current date and time |
banner |
Display a retro system info summary |
crt [mode] |
Toggle the CRT filter (on/off/toggle/status) |
figlet [-f font] text |
Render ASCII art text (block or mini font) |
find [path] pattern |
Search a folder tree for names containing text |
locate term |
Search the entire site content for a term |
grep [-rl] pat [path] |
Search file contents (with recursive, names-only support) |
clear |
Clear screen |
Image files (png, jpg, gif, webp) automatically render in the terminal as ANSI-colored ASCII art using PHP GD.
Enable the blog-bbs plugin (see config.php) to unlock a faux dial-up telnet command. It dials into an ANSI BBS interface that lists markdown posts stored under content/Blog/, complete with customizable ANSI splash screens and an optional message board.
When connected you'll be asked for a handle, the prompt shifts to HANDLE@NODE>, and every BBS command clears and redraws the fixed-width UI so it feels like a dedicated dial-in experience.
retro-terminal/
ββ index.php
ββ api.php
ββ config.php
ββ content/
β ββ _meta/
β β ββ motd.md
β ββ About/
β β ββ About.md
β ββ Projects/
β ββ Projects.md
ββ assets/
β ββ css/terminal.css
β ββ js/terminal.js
ββ README.md
- PHP 7.4+
- PHP-GD extension (for ASCII image rendering)
- Web server (Apache, Nginx, Caddy, etc.)
Clone the repository:
git clone https://github.com/kimusan/retro-termnal-web.git
cd retro-terminal-webPlace the project in any PHP-enabled webroot:
/var/www/html/retro-terminal/
Open in your browser:
http://localhost/retro-terminal/
Done π
All settings are in config.php:
return [
'content_root' => __DIR__ . '/content',
'shell_user' => 'guest',
'shell_host' => null, // defaults to domain
'default_theme' => 'classic', // or 'crt'
'options' => [
'enable_ansi_images' => true,
'max_output_lines' => 200,
'allowed_extensions' => ['md', 'txt', 'png', 'jpg', 'jpeg', 'gif', 'webp', 'svg'],
'downloadable_extensions' => ['zip', 'tar', 'gz', 'tgz', 'bz2', 'xz', '7z', 'iso', 'img', 'bin', 'appimage'],
],
];
Set `'default_theme' => 'crt'` to enable the CRT filter by default (visitors can still toggle it via the `crt` command). Adjust the extension lists to control which files show up in `ls`/`cat` versus which binaries are exposed through the `get` download command.'shell_user' => 'kim',
'shell_host' => 'retrobox',Prompt becomes:
kim@retrobox:/$
Content is zero-config and purely filesystem driven.
See CONTENT_GUIDE.md for detailed instructions.
Key points:
- Folders = directories (
ls,cd) - Markdown
.md= viewable files (cat,less) - Images = ASCII art (
cat image.png) - MOTD is read from
content/_meta/motd.md
- Terminal emulation
- Prompt handling
- Tab completion
- History
- Command parsing
- Directory listing
- Markdown/text loading
- Image β ASCII renderer
- Path sanitization / security
See ROADMAP.md for long-term plans.
Upcoming features include:
- Improved markdown rendering
- CRT bloom / glow modes
- Custom themes
- βman pagesβ for commands
- Sound effects (optional)
MIT License β free to use, modify, and share.
PRs, issues, and feature requests are welcome!
If you use this in a personal site or portfolio, please share β itβs always cool to see how others extend the terminal experience.