Skip to content

rust devops cli terraform terragrunt ai-tools mcp-server security-scanner clean-code automation

License

Notifications You must be signed in to change notification settings

DennySORA/Ops-Tools

Repository files navigation

DevOps CLI Toolset

A robust Rust-based CLI toolset designed for efficient DevOps workflows.

繁體中文 | 简体中文 | 日本語

Screenshot

Features

1. Terraform/Terragrunt Cache Cleaner

Intelligently cleans cache files generated by Terraform and Terragrunt:

  • .terragrunt-cache directories
  • .terraform directories
  • .terraform.lock.hcl files
  • Automatically filters duplicate sub-paths to avoid redundant deletions.

2. AI Code Assistant Upgrader

Batch upgrades for popular AI code assistants:

  • Claude Code (@anthropic-ai/claude-code)
  • OpenAI Codex (@openai/codex)
  • Google Gemini CLI (@google/gemini-cli)

3. Package Installer/Updater (macOS/Linux)

Install, remove, and update common tools with an interactive checklist:

  • nvm (installs latest Node.js)
  • pnpm
  • Rust (via rustup)
  • Go (downloads latest official archive/pkg)
  • Terraform
  • kubectl
  • kubectx
  • k9s
  • git
  • uv (installs latest Python)
  • tmux (includes TPM + tmux.conf setup)
  • vim (includes vim-plug + molokai config)
  • ffmpeg (build script on Linux, Homebrew on macOS)

4. MCP Tool Management

Manages MCP servers for Claude, Codex, and Gemini CLI:

MCP Tool Description
sequential-thinking Sequential Thinking
context7 Documentation Query
chrome-devtools Chrome DevTools
kubernetes K8s Management
github GitHub Integration
cloudflare-* Cloudflare MCP Servers (Docs/Workers/Observability/etc.)

Optional Feature Flags & MCP Credentials (build-time only via .env):

How to enable:

  1. cp .env.example .env
  2. Fill in the values you need.
  3. Build the binary (cargo build --release).

Available MCP options:

  • Context7 MCP: set CONTEXT7_API_KEY to enable the context7 tool.
  • GitHub MCP: set GITHUB_PERSONAL_ACCESS_TOKEN (required) and GITHUB_HOST (optional, default github.com) to enable the github tool.
  • Cloudflare MCP: set enable_cloudflare_mcp=true to enable cloudflare-* tools (OAuth during install).

For Codex MCP installs, build-time values for CONTEXT7_API_KEY, GITHUB_PERSONAL_ACCESS_TOKEN, and GITHUB_HOST are written into ~/.codex/config.toml, so runtime env vars aren't required. Cloudflare MCP installs use OAuth in interactive mode (stdio inherited) so URL prompts and auth codes work. On WSL, open the auth URL with wslview or run the CLI on Windows if the localhost callback cannot reach WSL. Cloudflare's MCP server catalog: https://developers.cloudflare.com/agents/model-context-protocol/mcp-servers-for-cloudflare/

5. Git Secret Scanner

Quickly installs and runs strict scans against the current Git repo:

  • gitleaks (history + working tree)
  • trufflehog (history + working tree)
  • git-secrets (history + working tree)

Auto-install tries common package managers and go install, then falls back to GitHub releases (requires curl/wget and tar/unzip). Working tree scans only include Git-tracked files and skip anything ignored by .gitignore, with raw logs printed per scan.

6. LLM Prompt Generator

Generate and execute 4-step prompts for LLM workflows:

  • Generate: Create prompt files from YAML/JSON specification files
  • Run: Interactive or automated prompt execution with Claude CLI
  • Status: View feature execution progress and status
  • Spec field verification_url may be empty to indicate no validation URL

View the Prompt Template for Feature Specifications

The 4-step workflow:

  1. P1: Requirements, implementation, and deployment
  2. P2: E2E validation in verification environment
  3. P3: Refactoring and optimization
  4. P4: E2E regression testing in verification environment

Progress is tracked per feature with session management for resumable execution.

Installation

via Install Script (Recommended - Linux/macOS)

curl -fsSL https://raw.githubusercontent.com/DennySORA/Ops-Tools/main/install.sh | bash

Manual Installation

Download the version corresponding to your system from the Releases page.

Build from Source

# Build
cargo build --release

# Configure environment variables (Optional, for MCP management features)
cp .env.example .env
# Edit .env and fill in your credentials

Usage

If installed via the script, run directly:

ops-tools

If built from source:

cargo run
# or
./target/release/tools

Select a function from the menu:

  1. Clean Terraform/Terragrunt cache files
  2. Upgrade AI code assistant tools
  3. Install/Update system packages (macOS/Linux)
  4. Upgrade Rust projects and toolchain
  5. Git secret scan (Gitleaks/TruffleHog/Git-Secrets)
  6. Manage MCP tools (Claude/Codex/Gemini)
  7. LLM Prompt Generator (4-step workflow)
  8. Language settings (English/Traditional Chinese/Simplified Chinese/Japanese)

You'll be prompted to choose a language at startup, and you can switch languages later from the menu. Language preference is saved to ~/.config/ops-tools/config.toml (Linux), ~/Library/Application Support/ops-tools/config.toml (macOS), or %APPDATA%\\ops-tools\\config.toml (Windows).

Contributing

Contributions are welcome! Please submit a Pull Request or open an Issue.

License

MIT License

About

rust devops cli terraform terragrunt ai-tools mcp-server security-scanner clean-code automation

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •