GoShell is an interactive shell written in Go, extended into a powerful automation hub. 🚀
It connects a lightweight terminal interface directly to the n8n.io workflow automation engine, allowing you to trigger complex, multi-step automations across platforms like GitHub, Discord, and AI services with simple, memorable commands.
This version is configured to work with the aakaru/goshell repository and sends notifications to a pre-configured Discord server.
<img src="goshell-screenshot.png" alt="GoShell Screenshot" width="500" >
- Fast Go-based Shell: A lightweight and responsive interactive prompt.
- Smart Tab Completion: Quickly find commands and files.
- Core Shell Built-ins: Includes
cd,pwd,echo,type, andexit. - Automation Engine: A powerful
flowcommand that acts as a remote control for your n8n workflows.
The core of this project is the flow command, which turns your terminal into a command center for all your developer tasks.
- You type a command like
flow create-issue "Fix new bug"in GoShell. - GoShell sends this command to a local n8n instance via a secure webhook.
- n8n receives the command, uses a Switch Node to identify the task, and executes a pre-built workflow.
- The workflow interacts with external APIs (like GitHub and Hugging Face) and sends status notifications to a pre-configured Discord channel.
- Go (1.16+)
- Docker and Docker Compose
- A free Hugging Face account and API key.
This project includes a docker-compose.yml file to run a local n8n instance. From the project root, run:
sudo docker-compose up -dAccess n8n in your browser at http://localhost:5678 to set up your account. You will need to build the workflows as described in the project documentation and add your personal Discord Webhook URL and Hugging Face API Key to the respective nodes.
Navigate to the go/ directory. You will need to add your n8n production webhook URL to the flowCommand function in builtins.go.
cd go
go build./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] |
flow |
Utilize the n8n automations | flow deploy [version] |
Once running, you can use the following commands to trigger automations for the aakaru/goshell repository.
Triggers a "deployment" by creating an official release tag on the aakaru/goshell GitHub repository and posts a success message to Discord.
> flow deploy v1.2.0
--> Triggering n8n workflow...
<-- {"message":"Workflow was started"}Creates a new issue directly in the aakaru/goshell repository and posts a confirmation with a link to Discord.
> flow create-issue "Add a new color scheme"
--> Triggering n8n workflow...
<-- {"message":"Workflow was started"}Uses a Hugging Face AI model to read the latest pull requests in the aakaru/goshell repository and posts an AI-generated summary to Discord.
> flow summarize
--> Triggering n8n workflow...
<-- {"message":"Workflow was started"}.
├── go/ # All Go source code
│ ├── 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
├── docker-compose.yml # Configuration to run the n8n engine
└── n8n-data/ # Persistent data for your n8n workflows
- 🧩 github.com/c-bata/go-prompt - Interactive prompt library
Contributions are welcome! 🎉 Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.
- Thanks to the Go community for their amazing tools and libraries
- Special thanks to the creators of go-prompt for making this shell possible