{"id":31799837,"url":"https://github.com/juspay/shelly","last_synced_at":"2026-01-20T16:38:12.337Z","repository":{"id":316193120,"uuid":"1061805983","full_name":"juspay/shelly","owner":"juspay","description":null,"archived":false,"fork":false,"pushed_at":"2025-10-06T17:16:28.000Z","size":60947,"stargazers_count":0,"open_issues_count":16,"forks_count":1,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-10-06T19:13:57.404Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/juspay.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-09-22T12:09:18.000Z","updated_at":"2025-10-06T17:08:35.000Z","dependencies_parsed_at":"2025-09-23T08:34:26.192Z","dependency_job_id":"7a351835-423e-41d3-a45b-e5ededfd1127","html_url":"https://github.com/juspay/shelly","commit_stats":null,"previous_names":["juspay/shelly"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/juspay/shelly","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/juspay%2Fshelly","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/juspay%2Fshelly/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/juspay%2Fshelly/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/juspay%2Fshelly/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/juspay","download_url":"https://codeload.github.com/juspay/shelly/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/juspay%2Fshelly/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279005458,"owners_count":26083902,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-10T02:00:06.843Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-10-10T22:50:25.247Z","updated_at":"2025-10-10T22:50:29.990Z","avatar_url":"https://github.com/juspay.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Shelly\n\nAn intelligent CLI assistant that analyzes your command-line history to provide smart, AI-powered suggestions for failed commands. Shelly helps you debug and fix errors without leaving your terminal, boosting productivity with advanced repository organization and AI-assisted development features.\n\n## Features\n\n### 🔍 Core Error Analysis\n- **Smart Error Analysis**: Uses AI to analyze command failures and suggest fixes\n- **Multi-Shell Support**: Works with bash, zsh, tcsh\n- **Real-time History Access**: Reliably gets the last command from your shell\n- **Command Suggestions**: Suggests similar commands when you mistype\n- **Cross-Platform**: macOS and Linux support\n\n### 🏗️ Repository Organization\n- **AI-Powered Scaffolding**: Complete project structure generation\n- **GitHub Integration**: Automated templates, workflows, and issue templates\n- **Package Enhancement**: Automatic @juspay/ prefix and metadata optimization\n- **File Organization**: Smart file placement and cleanup with `--move` option\n- **Configuration Setup**: ESLint, Prettier, Commitlint, and more\n\n### 🧠 Memory Bank System\n- **AI Context Management**: Persistent project context for AI assistants\n- **Organized Documentation**: Structured project knowledge base\n- **Neurolink Integration**: Advanced AI content generation\n- **Development Continuity**: Seamless context across development sessions\n- **Team Collaboration**: Shared project understanding\n\n## Getting Started\n\nChoose your installation method based on your needs:\n\n### 🚀 For End Users (Recommended)\n\nIf you want to use Shelly as a command-line tool, install it globally:\n\n```bash\nnpm install -g @juspay/shelly\n```\n\n**📖 Next Steps:** Follow the [Quick Start Guide](docs/QUICK_START.md) for complete setup instructions including shell integration and API configuration.\n\n### 🛠️ For Developers \u0026 Contributors\n\nIf you want to contribute to the project or run it locally for development:\n\n```bash\n# Clone and navigate to project directory\ngit clone https://github.com/juspay/shelly.git\n```\n\n**📖 Next Steps:** Follow the [Complete Setup Guide](docs/SETUP.md) for detailed local development instructions.\n\n## Usage\n\n\u003e **Important:** Shelly uses a dual CLI architecture with two distinct usage modes:\n\u003e \n\u003e 1. **Error Analysis Mode:** `shelly` (no arguments) - Analyzes the last failed command from your shell history\n\u003e 2. **Repository Management Mode:** `shelly \u003ccommand\u003e` - Uses specific commands like `organize`, `memory`, `init`, `status`\n\u003e \n\u003e These are handled by different internal systems, so the commands work differently.\n\n### 🔍 Error Analysis (Core Feature)\n\nAfter setup, simply run `shelly` after any failed command:\n\n```bash\n$ grp \"hello\" file.txt\ngrp: command not found\n\n$ shelly\nAnalyzing previous command: \"grp \"hello\" file.txt\"\n\nMaybe you meant: grep \"hello\" file.txt\n\n--- Neurolink Analysis ---\nThe error \"grp: command not found\" indicates that the shell could not find the 'grp' command.\nThe correct command is likely 'grep' which is used for searching text patterns in files.\n--------------------------\n\nDid you mean one of these?\n- grep\n- git\n- gcc\n```\n\n### 🏗️ Repository Organization\n\nTransform any project into a publication-ready repository:\n\n```bash\n# Organize current project with full scaffolding\nshelly organize\n\n# Force overwrite existing files\nshelly organize --force\n\n# Only add missing files, preserve existing ones\nshelly organize --update\n\n# Move misplaced files to correct directories\nshelly organize --move\n\n# Organize a specific directory\nshelly organize --directory /path/to/project\n\n# Check repository organization status\nshelly status\n\n# Initialize a brand new project\nshelly init my-new-project\nshelly init my-project --template typescript --directory ~/projects\n```\n\n### 🧠 Memory Bank Management\n\nCreate and maintain AI-assisted development context:\n\n```bash\n# Initialize Memory Bank for the current project\nshelly memory init\n\n# Force reinitialize existing Memory Bank\nshelly memory init --force\n\n# Check Memory Bank status and files\nshelly memory status\n\n# List all Memory Bank files with details\nshelly memory list\n\n# View specific Memory Bank file content\nshelly memory show projectbrief.md\nshelly memory show current/activeContext.md\n\n# Update all Memory Bank files with latest project state\nshelly memory update\n\n# Update only a specific file\nshelly memory update --file progress.md\n```\n\n### 🔧 Advanced Error Analysis Options\n\n#### Debug Mode\n\nEnable detailed logging for troubleshooting:\n\n```bash\nSHELLY_DEBUG=true shelly\n```\n\n#### Analyze Specific Commands\n\nYou can analyze specific commands directly:\n\n```bash\nshelly \"your-failed-command\"\n# Or for local setup: node src/main.js \"your-failed-command\"\n```\n\n#### Shell Override\n\nForce detection of a specific shell:\n\n```bash\nSHELL_OVERRIDE=bash shelly\n```\n\n## Supported Platforms and Shells\n\n### Supported Shells\n\n- ✅ **Bash** - Full support with real-time history access\n- ✅ **Zsh** - Full support with real-time history access (default on macOS Catalina+)\n- ✅ **Tcsh/Csh** - Full support with direct alias integration\n- 🔄 **Fish** - Partial support with fallback mode\n\n### Platform Support\n\n- **macOS**: Fully supported (Zsh/Bash/Tcsh)\n- **Linux**: Fully supported (Bash/Zsh/Tcsh)\n\n## How It Works\n\n### Shell Integration Mechanisms\n\n**Bash/Zsh**: Uses the `fc` command with dynamic function generation for real-time history access.\n\n**Tcsh**: Uses `history 2` command with direct alias definition for reliable access to command history.\n\n**Fallback Mode**: Reads shell history files directly from disk and uses process tree analysis to detect shell type.\n\n### Analysis Process\n\n1. **Shell Integration**: Captures your last command directly from shell memory or history\n2. **Command Analysis**: Analyzes the failed command and its error output\n3. **AI-Powered Suggestions**: Uses advanced analysis to suggest corrections and alternatives\n\n## Features in Detail\n\n### 🔍 Error Analysis\n\n- **AI Analysis**: Intelligent error interpretation and suggestions using NeuroLink\n- **Command Correction**: Suggests likely intended commands for typos\n- **History Context**: Uses command history for better analysis\n- **Pattern Recognition**: Learns from common error patterns and user corrections\n\n### 🏗️ Repository Organization\n\n- **Smart Scaffolding**: Creates complete project structure with industry best practices\n- **GitHub Templates**: Automated issue templates, PR templates, and workflow setup\n- **Configuration Management**: ESLint, Prettier, Commitlint, and semantic-release setup\n- **Package Optimization**: Enhances package.json with @juspay/ scoping and metadata\n- **File Classification**: Intelligent file organization with `--move` option\n- **Project Templates**: Support for different project types (React, TypeScript, CLI tools)\n\n### 🧠 Memory Bank System\n\n- **Project Context**: Maintains comprehensive project understanding for AI assistants\n- **Structured Documentation**: Organized into project, technical, and current state files\n- **AI Integration**: Seamless integration with Cline and other AI development tools\n- **Neurolink Content**: Advanced AI-generated documentation using Google Vertex AI\n- **Development Continuity**: Preserves context across development sessions and team changes\n- **Knowledge Management**: Central repository for project decisions and evolution\n\n### 🐚 Shell Integration\n\n- **Multi-shell Support**: Native support for bash, zsh, and tcsh\n- **History Access**: Retrieves commands from shell history or live session\n- **Process Tree Analysis**: Intelligently detects your current shell\n- **Alias Generation**: Automatic shell integration setup\n\n## Troubleshooting\n\n### Common Issues\n\n#### \"Could not retrieve the last command from history\"\n\nThis usually means the shell integration isn't set up correctly.\n\n**Solutions:**\n\n```bash\n# For Bash - ensure history is enabled\necho 'HISTSIZE=1000' \u003e\u003e ~/.bashrc\necho 'SAVEHIST=1000' \u003e\u003e ~/.bashrc\n\n# For Zsh - check history settings\necho 'HISTSIZE=1000' \u003e\u003e ~/.zshrc\necho 'SAVEHIST=1000' \u003e\u003e ~/.zshrc\n\n# For Tcsh - ensure history is enabled\necho 'set history = 1000' \u003e\u003e ~/.tcshrc\necho 'set savehist = 1000' \u003e\u003e ~/.tcshrc\n```\n\n#### \"shelly: command not found\"\n\n**Cause:** The alias wasn't set up correctly or shell config wasn't reloaded.\n\n**Solutions:**\n\n1. Check that you added the correct line to your shell configuration file\n2. Restart your terminal or run `source ~/.bashrc` (or equivalent for your shell)\n3. For global installation, ensure the package is installed: `npm list -g @juspay/shelly`\n4. For local development, ensure you're using the correct commands from the [Complete Setup Guide](SETUP.md)\n\n#### Commands not being analyzed\n\nEnsure you're running `shelly` immediately after the failed command. The tool analyzes the most recent command in your shell history.\n\n#### Tcsh Path Issues\n\n**Cause:** The absolute path in the tcsh alias is incorrect.\n\n**Solution:** Use `pwd` in the project directory to get the correct path and update your alias.\n\n### Debug Information\n\nEnable debug mode to see detailed information about what the tool is doing:\n\n```bash\nSHELLY_DEBUG=true shelly\n```\n\n## Quick Reference\n\n### One-Time Setup Commands\n\n**Bash:**\n\n```bash\necho 'eval \"$(shelly --alias)\"' \u003e\u003e ~/.bashrc \u0026\u0026 source ~/.bashrc\n```\n\n**Zsh:**\n\n```bash\necho 'eval \"$(shelly --alias)\"' \u003e\u003e ~/.zshrc \u0026\u0026 source ~/.zshrc\n```\n\n**Fish:**\n\n```bash\necho 'shelly --alias | source' \u003e\u003e ~/.config/fish/config.fish \u0026\u0026 source ~/.config/fish/config.fish\n```\n\n### Usage Workflow\n\n1. Run a command (it may fail)\n2. Type `shelly`\n3. Get AI-powered analysis and suggestions\n4. Apply the suggested fix\n\n## Configuration\n\nThe tool automatically detects your shell and adapts its behavior accordingly. No additional configuration is required for basic usage.\n\n## Contributing\n\nContributions are welcome! Please feel free to submit issues and enhancement requests.\n\n## Uninstallation\n\n### Remove Shell Integration\n\nRemove the `eval \"$(shelly --alias)\"` line from your shell configuration file and reload your shell.\n\n## License\n\nMIT License\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjuspay%2Fshelly","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjuspay%2Fshelly","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjuspay%2Fshelly/lists"}