A lightweight interactive shell written in Go! 🚀
- Fast and lightweight command execution
- Smart tab completion for commands and files
- Built-in commands (
cd
,pwd
,echo
,type
,exit
) - External command execution
- Beautiful interactive prompt
goshell/
├── main.go # Entry point and initialization
├── executor.go # Command execution engine
├── completion.go # Tab completion implementation
├── builtins.go # Built-in command implementations
└── utils.go # Utility functions
- Go 1.16 or higher
- Git
# Clone the repository
git clone https://github.com/yourusername/goshell.git
# Navigate to the project
cd goshell
# Install dependencies
go mod tidy
# Build the project
go build
Run the shell with:
./goshell
Command | Description | Usage |
---|---|---|
cd |
Change directory | cd [directory] |
pwd |
Print working directory | pwd |
echo |
Echo text to standard output | echo [text] |
type |
Display command type | type [command] |
whoami |
Display user | whoami |
exit |
Exit the shell | exit [code] |
go build -o goshell
- github.com/c-bata/go-prompt - Interactive prompt library
Contributions are welcome! Feel free to submit issues or pull requests.
- Fork the repository
- Create your feature branch:
git checkout -b feature-name
- Commit your changes:
git commit -m 'Add some feature'
- Push to the branch:
git push origin feature-name
- Submit a pull request
This project is licensed under the MIT License - see the LICENSE file for details.