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.1.tar.gz (17.8 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.1-py3-none-any.whl (19.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: gc_shell-0.1.1.tar.gz
  • Upload date:
  • Size: 17.8 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.1.tar.gz
Algorithm Hash digest
SHA256 6fb1e1c3adc77969febd3fa2297d81853c74017c531191ac449f3c16a2fbb009
MD5 74b390dc25729438a30c83307c116140
BLAKE2b-256 a301e52312afc8947a703955b2a3d98e84ddd532773a2671b4cfff5d5af68b23

See more details on using hashes here.

File details

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

File metadata

  • Download URL: gc_shell-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 19.1 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 badc4b0923c287a2f4632ea55a2ce522e22f82b4c79a8fc91abaddb041251a80
MD5 2611d6927cd2e18132503312fc3da5a5
BLAKE2b-256 79336a2c7aaa1d870244036ad0d5114543118e3782c593a212dadd07a4b6feea

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