A powerful, custom interactive shell built in Go. GX-Shell transforms your standard terminal into a specialized environment for rapid file system management with custom "GX" prefixed commands.
Install quickly:
git clone https://github.com/joyal777/gopher-cli.git && cd gopher-cli
go run main.go- Interactive Environment: Real-time path display in your prompt.
- Complete File Operations: Create, delete, move, copy, and find files/folders.
- File Viewing: View entire files or just the beginning/end.
- System Information: Check dates, paths, and system details without leaving the shell.
- Storage Analytics: Calculate the total size of files and directories (auto-converts to KB/MB/GB).
- Directory Navigation: Full support for moving through your file system.
- Utility Tools: Count files, create empty files, and more.
| Command | Action | Example |
|---|---|---|
gx |
Create a File or Folder | gx notes.txt or gx source_code |
gxd |
Delete (Recursive) | gxd old_folder |
gxmv |
Move/Rename file or folder | gxmv old.txt new.txt |
gxcp |
Copy file | gxcp source.txt backup.txt |
gxfind |
Find files by name | gxfind .go |
gxempty |
Create empty file | gxempty temp.txt |
gxmkdir |
Create directory | gxmkdir newfolder |
gxecho |
Append text to file | gxecho "Hello World" file.txt |
gxdup |
Duplicate a file | gxdup original.txt |
| Command | Action | Example |
|---|---|---|
gxc |
Change Directory (cd) | gxc .. or gxc projects |
gxl |
List items in directory | gxl |
gxpwd |
Print working directory | gxpwd |
gxcount |
Count files in directory | gxcount or gxcount ./folder |
| gxmd5 | MD5 checksum of a file | gxmd5 file.bin |
| gxsha1 | SHA-1 checksum of a file | gxsha1 file.bin |
| Command | Action | Example |
|---|---|---|
gxcat |
View entire file contents | gxcat notes.txt |
gxhead |
View first 10 lines of file | gxhead log.txt |
gxtail |
View last 10 lines of file | gxtail log.txt |
gxgrep |
Search text in files | gxgrep "error" log.txt |
gxstat |
Show detailed file stats | gxstat document.pdf |
| gxlines | Count lines in a file | gxlines README.md |
| gxcountwords | Count words in a file | gxcountwords essay.txt |
| gxemptylinecount | Count blank lines in a file | gxemptylinecount notes.md |
| Command | Action | Example |
|---|---|---|
gxs |
Check Storage Size | gxs my_videos |
gxdate |
Show current date and time | gxdate |
gxinfo |
Show system information | gxinfo |
gxwhich |
Locate a command in PATH | gxwhich go |
gxtree |
Display directory tree | gxtree ./src |
| gxreplace | Replace text in file (in-place) | gxreplace old new file.txt |
| gxopen | Open file with default app | gxopen image.png |
| gxrenameext | Rename file extension | gxrenameext file.txt md |
| gxbackup | Create timestamped backup | gxbackup notes.txt |
| gxtruncate | Truncate file to size (bytes) | gxtruncate file.bin 1024 |
| gxpermissions | Show permissions & metadata | gxpermissions script.sh |
These commands were recently added for convenience — quick one-liners:
| Command | Action |
|---|---|
gxmd5 |
Show MD5 checksum |
gxsha1 |
Show SHA-1 checksum |
gxlines |
Count file lines |
gxcountwords |
Count words in a file |
gxemptylinecount |
Count blank lines |
gxreplace |
Replace text in a file (in-place) |
gxopen |
Open file with default application |
gxrenameext |
Change file extension |
gxbackup |
Create timestamped backup |
gxtruncate |
Truncate file to given size (bytes) |
gxpermissions |
Show file permissions and metadata |
| Command | Action | Example |
|---|---|---|
gxcount |
Count files in directory | gxcount or gxcount ./folder |
gxempty |
Create empty file | gxempty temp.txt |
gxmkdir |
Create directory | gxmkdir newfolder |
gxtouch |
Update/Create file timestamp | gxtouch file.txt |
gxhelp |
Show extended help menu | gxhelp |
| Command | Action | Example |
|---|---|---|
exit |
Quit GX-Shell | exit or Ctrl+X |
- Go 1.21+ installed on your machine.
- Clone the repository:
git clone https://github.com/joyal777/gopher-cli.git cd gopher-cli - Run the shell directly:
go run main.go
- (Optional) Build the executable:
go build -o gx.exe ./gx.exe
📖 Usage Examples
-
File Management
gx-shell> gxl # List files gx-shell> gx notes.txt # Create a file gx-shell> gx projects # Create a folder gx-shell> gxmv notes.txt old.txt # Rename file gx-shell> gxcp old.txt backup.txt # Copy file gx-shell> gxdup backup.txt # Duplicate file gx-shell> gxecho "Content" file.txt # Append text to file gx-shell> gxd old.txt # Delete file
-
Navigation & Tree View
gx-shell> gxpwd # Show current directory gx-shell> gxc projects # Enter projects folder gx-shell> gxc .. # Go back gx-shell> gxtree ./src # Show directory tree
-
Viewing & Searching Files
gx-shell> gxhead log.txt # See first 10 lines gx-shell> gxtail log.txt # See last 10 lines gx-shell> gxcat config.json # View entire file gx-shell> gxgrep "error" log.txt # Search for text gx-shell> gxstat document.pdf # Show file stats
-
System Info & Utilities
gx-shell> gxdate # Check current time gx-shell> gxinfo # Show system details gx-shell> gxs downloads # Check folder size gx-shell> gxwhich python # Find python location gx-shell> gxtouch newfile.txt # Create/update timestamp
-
Finding & Counting
gx-shell> gxfind .md # Find all markdown files gx-shell> gxcount # Count items in current dir gx-shell> gxcount ./src # Count items in src folder gx-shell> gxhelp # Show detailed help ### Advanced Usage You can combine GX commands with pipes and redirection just like standard shell utilities: ```bash # Count lines containing 'TODO' across .go files gx-shell> gxfind .go | xargs gxgrep "TODO" | wc -l # Save MD5 checksum of a file to a file gx-shell> gxmd5 bigfile.bin > bigfile.md5 # Create a backup and then open it (example on Unix-like systems) gx-shell> gxbackup notes.txt && ls -t notes.txt.bak.* | head -n1 | xargs gxopen
🤝 Contributing
This is an open-source project! Feel free to:
Fork the repository
Add new commands or features
Improve existing functionality
Submit a pull request
Whether it's bug fixes, new commands, or documentation improvements, all contributions are welcome!
📝 License MIT License - feel free to use this project for learning or building your own tools.
Built with ❤️ using Golang | Version 3.5
- 2026-02-20 — v3.5.1
- Added 11 new utility commands:
gxmd5,gxsha1,gxlines,gxcountwords,gxemptylinecount,gxreplace,gxopen,gxrenameext,gxbackup,gxtruncate,gxpermissions. - Documentation: updated README with quick reference, advanced usage examples, and badges.
- Added 11 new utility commands:
- joyal777 — maintainer, commands and docs
Contributions welcome — open an issue or submit a PR for improvements.