Skip to main content

An intelligent AI-powered shell for macOS

Project description

๐Ÿš€ Goutham Shell

A custom interactive shell for macOS that combines the power of a standard terminal with personalized built-in commands.

Installation

# 1. Clone the repository
git clone <repo-url>
cd gc-shell

# 2. Create a .env file with your Groq API key
echo 'GROQ_API_KEY=your_key_here' > .env

# 3. Install the shell
pip install .

# 4. Launch it!
gc-shell

Note: You need a Groq API key for the AI features. Sign up for free at groq.com, create an API key, and paste it in the .env file.

Development Mode

If you're working on the code and want changes to take effect immediately:

pip install -e .

Quick Start

$ goutham
๐Ÿš€ Welcome to Goutham Shell v0.1.0
   Type help for commands, exit to quit.

๐Ÿ’ก No app registry found. Run scan to discover installed applications.

goutham ~ โฏ scan
๐Ÿ” Scanning for applications...
โœ“ Found 142 applications
โœ“ Registry saved to ~/.goutham/apps.json

goutham ~ โฏ open chrome
โ–ถ Opening Google Chrome...

goutham ~ โฏ running
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚   Running Applications       โ”‚
โ”œโ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚  # โ”‚ Application             โ”‚
โ”œโ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚  1 โ”‚ Finder                  โ”‚
โ”‚  2 โ”‚ Google Chrome           โ”‚
โ”‚  3 โ”‚ Terminal                โ”‚
โ””โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

goutham ~ โฏ ls -la
total 32
drwxr-xr-x  8 user staff 256 Jun 26 12:00 .
...

Features

System Commands

All standard terminal commands work transparently โ€” they're forwarded to your system's zsh shell:

  • ls, pwd, cat, grep, echo
  • git status, git commit, git push
  • python app.py, node server.js
  • docker ps, npm run dev
  • Pipes (|), redirection (>), chaining (&&)

Custom Commands

Command Description
scan Scan /Applications and build the app registry
open <app> Open an application by name (fuzzy matching)
close <app> Close a running application
apps List all registered applications
running List currently running GUI applications
tree [path] Display a directory tree (--depth N)
preview <file> Preview a file with syntax highlighting (--lines N)
mkp <dir> Create nested directories (like mkdir -p)
search <pattern> Find files by glob pattern (--path <dir>)
help Show all available commands
exit / quit Exit the shell

App Management

On first run, use scan to discover installed applications. Then use open and close with fuzzy name matching โ€” no need to type the full name:

goutham ~ โฏ open chrome      # Opens "Google Chrome"
goutham ~ โฏ open code        # Opens "Visual Studio Code"
goutham ~ โฏ close spotify    # Closes "Spotify"

The open command is smart โ€” paths, URLs, and flags are forwarded to the system open:

goutham ~ โฏ open .               # Opens current dir in Finder
goutham ~ โฏ open https://x.com   # Opens URL in default browser
goutham ~ โฏ open -a Safari       # System open with flags

Architecture

Goutham Shell is a wrapper shell โ€” it intercepts custom commands while forwarding everything else transparently to zsh.

User Input โ†’ Command Parser โ†’ Custom Command? โ†’ Execute Handler
                                    โ†“ No
                            Forward to zsh via subprocess

Key design decisions:

  • Shell state is maintained in-process: cd updates current_directory so subsequent commands run in the right place.
  • No hardcoded paths: All app paths come from the scanned registry at ~/.goutham/apps.json.
  • shell=True forwarding: Preserves pipes, redirection, globbing, and chaining โ€” users get the full power of zsh.

Requirements

  • macOS 10.15+
  • Python 3.9+
  • Rich (installed automatically)

Configuration

All configuration is stored in ~/.goutham/:

File Purpose
apps.json Application registry (generated by scan)

Project Structure

goutham-shell/
โ”œโ”€โ”€ main.py          # Entry point
โ”œโ”€โ”€ shell.py         # Interactive REPL loop
โ”œโ”€โ”€ executor.py      # Command routing & shell state
โ”œโ”€โ”€ commands/
โ”‚   โ”œโ”€โ”€ apps.py      # open, close, apps, running
โ”‚   โ””โ”€โ”€ files.py     # tree, preview, mkp, search
โ”œโ”€โ”€ registry/
โ”‚   โ””โ”€โ”€ scanner.py   # macOS app scanner
โ”œโ”€โ”€ ai/              # Phase 5+ (AI commands)
โ”œโ”€โ”€ utils/
โ”œโ”€โ”€ pyproject.toml
โ””โ”€โ”€ README.md

Roadmap

  • Phase 1 โ€” Interactive shell skeleton
  • Phase 2 โ€” System command forwarding with persistent state
  • Phase 3 โ€” Custom built-in commands (app management)
  • Phase 4 โ€” File utility commands
  • Phase 5 โ€” AI commands (ai explain, ai generate, ai summarize)
  • Phase 6 โ€” LangGraph agent workflows

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gc_shell-0.1.2.tar.gz (16.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

gc_shell-0.1.2-py3-none-any.whl (17.4 kB view details)

Uploaded Python 3

File details

Details for the file gc_shell-0.1.2.tar.gz.

File metadata

  • Download URL: gc_shell-0.1.2.tar.gz
  • Upload date:
  • Size: 16.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.9

File hashes

Hashes for gc_shell-0.1.2.tar.gz
Algorithm Hash digest
SHA256 096bed07ecd645da67ea03f1346b1ab058a196bccfa922638d413f15c4099ec7
MD5 388e4c67260fd2576d290f73ed0dba0b
BLAKE2b-256 b99273dbb4bbc80a543944410a6111c34c49673387c047d5e5d5bdd5f3451595

See more details on using hashes here.

File details

Details for the file gc_shell-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: gc_shell-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 17.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.9

File hashes

Hashes for gc_shell-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 0dcc428a75105376272dfd76970829f6482328315cd7d7e74904bd5be64dc816
MD5 c1ae4501bfc2b507d5f2da88cfe70914
BLAKE2b-256 20668ed4dce2f5151f8c6fa4f391f48cf0bd9491026b31f69d519e9c95b1c368

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page