scaffold-gcp-cli
v1.0.14
Published
🧠 SCAFFOLD - Smart Cloud CLI for AI-powered Google Cloud Platform automation
Maintainers
Readme
🧠 SCAFFOLD - Smart Cloud CLI
AI-powered Google Cloud Platform automation that understands natural language commands.

✨ Features
- Natural Language Interface: Talk to your GCP infrastructure in plain English
- Intelligent Command Generation: AI converts your requests to optimal gcloud commands
- Enhanced Command Parsing: Advanced support for complex commands with pipes and filters
- Multi-Step Plan Execution: Execute comprehensive workflows with intelligent step-by-step guidance
- Smart Error Recovery: Intelligent error analysis with alternative command suggestions and recovery options
- Interactive Execution: Review and confirm commands before execution with user choice on failures
- Context Awareness: Remembers your session for better recommendations
- Shell Integration: Seamless support for complex shell operations and command chaining
- Multi-tool Support: Works with gcloud, gsutil, bq, and kubectl
🚀 Installation
Global Installation
npm install -g scaffold-gcp-cliPrerequisites
- Node.js 16+: Download here
- Google Cloud CLI: Install gcloud
- OpenAI API Key: Get your key
Setup
Set your OpenAI API key:
export OPENAI_API_KEY=your_api_key_hereAuthenticate with GCP:
gcloud auth login gcloud config set project YOUR_PROJECT_IDStart SCAFFOLD:
scaffold
💡 Usage Examples
Basic Queries
💬 SCAFFOLD ❯ show me all my compute instances
💬 SCAFFOLD ❯ list storage buckets with public access
💬 SCAFFOLD ❯ analyze my cloud costs for last month
💬 SCAFFOLD ❯ check firewall rules for security issuesAdvanced Operations
💬 SCAFFOLD ❯ create a new VM in us-east1 with 4 CPUs
💬 SCAFFOLD ❯ scale my kubernetes cluster to 5 nodes
💬 SCAFFOLD ❯ backup all my databases
💬 SCAFFOLD ❯ show me resources costing more than $100Multi-Step Workflows
💬 SCAFFOLD ❯ perform a comprehensive security audit of my project
💬 SCAFFOLD ❯ analyze firewall risks across all my networks
💬 SCAFFOLD ❯ audit IAM permissions and service accounts
💬 SCAFFOLD ❯ check for unused resources to optimize costsComplex Commands
💬 SCAFFOLD ❯ find all service accounts with editor roles
💬 SCAFFOLD ❯ list storage buckets with public access and their IAM policies
💬 SCAFFOLD ❯ show me recent error logs from all services
💬 SCAFFOLD ❯ get compute instances with their firewall rulesAvailable Commands
help- Show available commandsexamples- Display example queriesclear- Clear the screenexit- Quit SCAFFOLD
🔧 Configuration
Environment Variables
| Variable | Description | Required |
|----------|-------------|----------|
| OPENAI_API_KEY | Your OpenAI API key | ✅ Yes |
| GOOGLE_CLOUD_PROJECT | Default GCP project | No |
GCP Authentication
SCAFFOLD uses your existing gcloud configuration:
# View current config
gcloud config list
# Set project
gcloud config set project my-project-id
# Set default region/zone
gcloud config set compute/region us-central1
gcloud config set compute/zone us-central1-a🛠️ Development
Local Development
# Install dependencies
npm install
# Run locally
npm start🔒 Security
- API Keys: Never commit API keys. Use environment variables.
- Permissions: SCAFFOLD uses your existing gcloud permissions.
- Command Review: All commands are shown for confirmation before execution.
- No Data Storage: Conversation history is kept in memory only.
🐛 Troubleshooting
Common Issues
"OPENAI_API_KEY environment variable is required"
export OPENAI_API_KEY=your_key_here"gcloud CLI not found"
- Install the Google Cloud CLI
- Ensure it's in your PATH
"No GCP project configured"
gcloud config set project YOUR_PROJECT_IDCommands hanging on interactive prompts
- This is expected for component installations
- Type 'Y' when prompted to continue
Getting Help
- Type
helpin SCAFFOLD for built-in assistance
📝 License
MIT License - see LICENSE file for details.
🤝 Contributing
Contributions welcome! Please read our contributing guidelines and submit pull requests.
🔗 Links
Built with ❤️
