Welcome to the gsh tutorial! This comprehensive guide will teach you how to use gsh as your interactive shell and write powerful automation scripts.
By the end of this tutorial, you'll know how to:
- ✅ Use gsh as a POSIX-compatible interactive shell
- ✅ Configure your environment with
~/.gshrcand~/.gsh/repl.gsh - ✅ Set up generative command prediction
- ✅ Use AI agents directly in your shell
- ✅ Write and execute gsh scripts for automation
For deeper configuration topics (custom prompts, advanced SDK features, command middleware), see the SDK Guide.
Before starting, you should:
- Have a basic understanding of shell commands (
ls,cd,echo, etc.) - Have gsh installed (see main README for installation)
- Have a text editor for creating configuration files
If you're brand new to shells, you might want to quickly learn bash basics first, then come back to this tutorial.
-
Check the logs
tail -f ~/.gsh/gsh.log -
Enable debug logging
# In ~/.gsh/repl.gsh gsh.logging.level = "debug"
-
Search the relevant chapter - Most issues are covered in the detailed chapters
- GitHub Issues - Report bugs or ask questions
- Contributing - Help improve gsh! See CONTRIBUTING.md
Ready to get started? Begin with Chapter 01: Getting Started with gsh →