A powerful command-line shell written in Go with sh-style scripting support
Works seamlessly on Windows, macOS, and Linux. Gosh, it's good to have a reliable shell everywhere!
Interactive mode, command mode, and script mode for maximum flexibility
Full support for pipes, input/output redirection, and command chaining
Write powerful shell scripts with functions, control structures (if/case), variable expansion, and command substitution. Works seamlessly on Windows with automatic script detection!
Automatic detection and execution of .sh files and shebang scripts on Windows. No more "not a valid Win32 application" errors - gosh handles it all!
On Unix-like platforms, scripts run with their specified interpreters (bash, zsh, etc.). Missing interpreters show errors, missing shebangs get a gosh pun warning!
Built-in commands that work on Windows, macOS, and Linux with both Unix (ls, cat, cp) and Windows (dir, type, copy) style commands
Command history, aliases, platform-aware tab completion (case-insensitive on Windows, case-sensitive on Unix), case-insensitive execution, and background execution. Gosh, that's smart!
Robust Ctrl-C handling that interrupts commands without exiting the shell
Works seamlessly on Windows, macOS, and Linux with consistent behavior across all platforms
go build -o gosh
Cross-platform builds:
GOOS=windows go build -o gosh.exe
GOOS=linux go build -o gosh-linux
GOOS=darwin go build -o gosh-macos
./gosh
Gosh, that was easy!
./gosh -c "ls -la"
./gosh -c "dir -l"
Both Unix and Windows style commands work!
./gosh script.sh
gosh script.sh arg1 arg2
By gosh, scripting has never been simpler!
Unix/Linux/macOS: Scripts with shebangs (#!/bin/bash, #!/usr/bin/env zsh) run with their specified interpreters. Missing shebangs get a gosh pun warning!
Windows users: Gosh automatically detects and runs .sh files and shebang scripts - no "not a valid Win32 application" errors. Gosh darn it, that's convenient!
Complete list of all built-in commands and their usage
Learn how to write shell scripts using gosh
Windows shell script support and dual command compatibility - gosh, it works everywhere!
Explore advanced features and techniques
Test and verify platform-aware tab completion and case-insensitive execution features - gosh, it adapts to your platform!
Complete guide to conditional statements in gosh
Learn about robust Ctrl-C handling and signal management