A modern, lightweight, cross-platform, and highly optimized shell developed by FomaDev.
Author: MOLENGO MALANDA FORDI (FomaDev)
FomaShell is a modern shell designed to provide a fast, responsive, and streamlined command-line environment. It operates as a fully standalone shell while also serving as a highly optimized default terminal for the C Studio Code (CSCode) IDE.
It natively addresses common issues found in traditional terminals on Windows and Unix systems, including transparent UTF-8 encoding, dynamic compiler toolchain isolation (PATH isolation), transparent pipeline execution, signal handling (Ctrl+C), and dedicated C/C++ development commands (foma check, foma build, foma info).
- Native UTF-8 and 24-bit ANSI Support: Automatic configuration of the Windows terminal (
SetConsoleOutputCP(65001)andENABLE_VIRTUAL_TERMINAL_PROCESSING) for reliable rendering of Unicode characters, symbols, and colors. - Dynamic PATH Management (PATH Isolation): Dynamically prepends the compiler toolchain (for example,
C:/tools/w64devkit/binorMinGW/bin) to the processPATHwithout modifying the operating system's global environment variables. - Dedicated
fomaCommands:foma check: Comprehensive diagnostics for installed compilers and tools (gcc,g++,clang,make,cmake,ninja,gdb,git).foma build [file.c|file.cpp]: Intelligent detection and fast compilation of C/C++ source files with optimized flags (-Wall,-Wextra,-O2).foma info: Details about the FomaDev runtime environment, CSCode integration status, and FPL license terms.
- Full System Transparency: Complete support for pipelines (
cmd1 | cmd2), input/output redirection (<,>,>>), and forwardingCtrl+Csignals without closing the shell session. - Git-Aware Prompt: Displays the FomaDev badge, the current directory (using the
~shortcut), the active Git branch, a modification indicator (*), and the dynamicλsymbol.
fomashell/
├── cmd/
│ └── fomashell/
│ └── main.go # Main entry point (CLI, REPL, flags)
├── internal/
│ ├── builtins/ # Built-in commands (cd, exit, foma check, build, info)
│ ├── config/ # Configuration, PATH isolation, and Windows UTF-8
│ ├── executor/ # System execution, pipelines (|), and redirection (<, >)
│ └── prompt/ # Prompt formatter and Git status
├── go.mod # Go module definition
├── LICENSE # FomaDev Public License (FPL)
└── README.md # Documentation and CSCode integration
- Go 1.21+
- A C/C++ compiler (GCC, Clang, or w64devkit) is recommended for the build features.
# Clone the repository
git clone https://github.com/fomadev/fomashell.git
cd fomashell
# Build the executable
go build -o fomashell.exe ./cmd/fomashell./fomashell.exeUsage:
fomashell [options]
Options:
-compiler, -cpath <path> Inject and isolate compiler path at the head of PATH
-command, -c <cmd> Execute command string non-interactively and exit
-no-banner Suppress welcome banner
-v, --version Display version information
-h, --help Display help message
foma checkfoma build main.c
foma build app.cpp -o myapp.exefoma infoecho "Hello from FomaShell" | findstr "Hello"
dir > listing.txtTo make FomaShell the default terminal for the C Studio Code (CSCode) IDE:
Add the following configuration to the IDE's settings file:
{
"terminal.integrated.defaultProfile.windows": "FomaShell",
"terminal.integrated.profiles.windows": {
"FomaShell": {
"path": "C:\\path\\to\\fomashell.exe",
"args": [
"-compiler", "C:\\tools\\w64devkit\\bin"
],
"icon": "terminal-powershell",
"env": {
"CSCODE_ACTIVE": "1"
}
}
},
"terminal.integrated.defaultProfile.linux": "FomaShell",
"terminal.integrated.profiles.linux": {
"FomaShell": {
"path": "/usr/local/bin/fomashell",
"args": ["-compiler", "/usr/bin"]
}
}
}This project is distributed under the FomaDev Public License (FPL).
FomaDev Public License (FPL)
Copyright (c) 2026 FomaDev (MOLENGO MALANDA FORDI). All rights reserved.
1. Personal and Educational Use: Free for developers, students, and CSCode integration.
2. Contributions: Forks are permitted only for contributing to the official project through a pull request.
3. Commercial Use (PAID): A paid license is required for resale, redistribution, or competing derivative tools.
4. Contact: MOLENGO MALANDA FORDI (FomaDev).
See LICENSE for the complete legal text.