Xiaochen's cloud shell.
A unified, cross-platform shell enhancement toolkit that brings powerful commands and AI-assisted functionality to your terminal experience on macOS, Windows, and Linux.
- Cross-platform compatibility - Works seamlessly on macOS, Windows, and Linux
- AI-powered command generation - Natural language to shell commands using OpenAI/Azure OpenAI
- Fuzzy search integration - Enhanced command history and discovery with
fzf - Git workflow shortcuts - Simplified git operations
- Path utilities - Cross-platform path manipulation tools
- Command history management - Advanced history search and filtering
iwr pwsh.xccc.me | iex-
Clone the repository:
git clone <repository-url> ~/.cloud_shell cd ~/.cloud_shell
-
Run the initialization script:
# On macOS/Linux ./init.sh # On Windows .\init.ps1
-
Install Python dependencies:
pip install -r requirements.txt
-
(Optional) Configure AI features:
cp openai_config.yml.example openai_config.yml # Edit openai_config.yml with your API credentials
x- Interactive command browser with fuzzy searchhist- Search and execute from command history
to <description>- Generate and execute commands from natural languageto "find all python files larger than 1MB" to "compress this folder to zip"
gitc <message>- Quick commit with message (no quotes needed)gitcc <message>- Add all and commitgs- Enhanced git statusga- Interactive git add with fzfmulti_pull- Step-by-step pulling for large repositories
ospath <path>- Convert paths to OS-appropriate formatslashpath <path>- Normalize path separators to forward slashes
reloadpath- Refresh PATH environment variableupdate_cloud_shell- Update this toolkit to latest version
- Python 3.6+
- fzf (for fuzzy searching)
- git (for git-related commands)
pyperclip- Clipboard operationsdistro- Linux distribution detectionopenai- AI command generationpyyaml- Configuration file parsing
-
Copy the example config:
cp openai_config.yml.example openai_config.yml
-
Edit
openai_config.ymlwith your credentials:api_type: azure # or 'openai' api_base: https://your-endpoint.openai.azure.com/ api_key: your-api-key-here api_model: gpt-4 api_version: 2023-05-15
cloud_shell/
├── local_commands/ # Platform-specific executables
├── pwsh/ # PowerShell implementations
├── py/ # Python implementations
├── sh/ # Shell script implementations
├── shellrc/ # Shell configuration files
└── tools/ # Development utilities
The toolkit uses a hybrid approach:
- Simple utilities - Implemented in shell scripts (bash/PowerShell)
- Complex features - Implemented in Python for cross-platform compatibility
- Fuzzy search - Powered by
fzffor enhanced user experience
- Fork the repository
- Create a feature branch
- Make your changes
- Test across platforms if possible
- Submit a pull request
This project is open source. See the repository for license details.
- Commands not found: Ensure the installation script completed successfully and restart your shell
- AI features not working: Check your
openai_config.ymlconfiguration - fzf not working: Install fzf using your package manager (
brew install fzf,apt install fzf, etc.)
For more details on all available commands, see full_commands.md.