Skip to content

Commit d25b043

Browse files
feat: adding new feature that can install all the supported tools as opart of the ops0 onboarding
1 parent a3e112b commit d25b043

8 files changed

Lines changed: 117 additions & 0 deletions

File tree

README.de.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,18 @@ und die richtigen Befehle generiert, wodurch DevOps-Management zugänglicher und
2626

2727
## Schnellstart
2828

29+
### Alle Tools mit einem Befehl installieren
30+
31+
![CLI Install All Tools](assets/cli-install.png)
32+
33+
Sie können jetzt alle unterstützten DevOps-Tools mit nur einem Befehl installieren:
34+
35+
```bash
36+
ops0 --install
37+
```
38+
39+
Damit werden Terraform, Ansible, kubectl, Docker, Helm, AWS CLI, gcloud und Azure CLI automatisch installiert und deren Versionen in einer Übersichtstabelle angezeigt.
40+
2941
### Installation
3042
```bash
3143
curl -fsSL https://raw.githubusercontent.com/ops0-ai/ops0-cli/main/install.sh | bash

README.es.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,18 @@ y generando los comandos correctos, haciendo la gestión DevOps más accesible y
2626

2727
## Inicio Rápido
2828

29+
### Instala todas las herramientas con un solo comando
30+
31+
![CLI Instalar Todas las Herramientas](assets/cli-install.png)
32+
33+
Ahora puedes instalar todas las herramientas DevOps soportadas con un solo comando:
34+
35+
```bash
36+
ops0 --install
37+
```
38+
39+
Esto instalará automáticamente Terraform, Ansible, kubectl, Docker, Helm, AWS CLI, gcloud y Azure CLI, y mostrará sus versiones en una tabla resumen.
40+
2941
### Instalación
3042
```bash
3143
curl -fsSL https://raw.githubusercontent.com/ops0-ai/ops0-cli/main/install.sh | bash

README.fr.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,18 @@ et en générant les bonnes commandes, rendant la gestion DevOps plus accessible
2626

2727
## Démarrage Rapide
2828

29+
### Installer tous les outils en une seule commande
30+
31+
![CLI Installer Tous les Outils](assets/cli-install.png)
32+
33+
Vous pouvez désormais installer tous les outils DevOps supportés avec une seule commande :
34+
35+
```bash
36+
ops0 --install
37+
```
38+
39+
Cela installera automatiquement Terraform, Ansible, kubectl, Docker, Helm, AWS CLI, gcloud et Azure CLI, puis affichera leurs versions dans un tableau récapitulatif.
40+
2941
### Installation
3042
```bash
3143
curl -fsSL https://raw.githubusercontent.com/ops0-ai/ops0-cli/main/install.sh | bash

README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,18 @@ and generating the right commands, making DevOps management more accessible and
2626

2727
## Quick Start
2828

29+
### Install All Tools at Once
30+
31+
![CLI Install All Tools](assets/cli-install.png)
32+
33+
You can now install all supported DevOps tools with a single command:
34+
35+
```bash
36+
ops0 --install
37+
```
38+
39+
This will automatically install Terraform, Ansible, kubectl, Docker, Helm, AWS CLI, gcloud, and Azure CLI, and show their versions in a summary table.
40+
2941
### Installation
3042
```bash
3143
curl -fsSL https://raw.githubusercontent.com/ops0-ai/ops0-cli/main/install.sh | bash

README.pt-BR.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,18 @@ e gerando os comandos corretos, tornando o gerenciamento DevOps mais acessível
2626

2727
## Início Rápido
2828

29+
### Instale todas as ferramentas com um único comando
30+
31+
![CLI Instalar Todas as Ferramentas](assets/cli-install.png)
32+
33+
Agora você pode instalar todas as ferramentas DevOps suportadas com um único comando:
34+
35+
```bash
36+
ops0 --install
37+
```
38+
39+
Isso instalará automaticamente Terraform, Ansible, kubectl, Docker, Helm, AWS CLI, gcloud e Azure CLI, e mostrará suas versões em uma tabela de resumo.
40+
2941
### Instalação
3042
```bash
3143
curl -fsSL https://raw.githubusercontent.com/ops0-ai/ops0-cli/main/install.sh | bash

README.zh-CN.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,18 @@ ops0 是一个智能命令行工具,可以将自然语言转换为 DevOps 命
2626

2727
## 快速开始
2828

29+
### 一键安装所有工具
30+
31+
![CLI 一键安装所有工具](assets/cli-install.png)
32+
33+
现在,您可以通过一条命令安装所有支持的 DevOps 工具:
34+
35+
```bash
36+
ops0 --install
37+
```
38+
39+
该命令会自动安装 Terraform、Ansible、kubectl、Docker、Helm、AWS CLI、gcloud 和 Azure CLI,并在最后以表格形式显示所有工具的版本。
40+
2941
### 安装
3042
```bash
3143
curl -fsSL https://raw.githubusercontent.com/ops0-ai/ops0-cli/main/install.sh | bash

assets/cli-install.png

212 KB
Loading

main.go

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,15 +94,22 @@ func main() {
9494
var aiMode bool
9595
var troubleshoot bool
9696
var showStats bool
97+
var installAll bool
9798

9899
flag.BoolVar(&showVersion, "version", false, "show version information")
99100
flag.BoolVar(&displayHelp, "help", false, "show help information")
100101
flag.StringVar(&message, "m", "", "natural language command message")
101102
flag.BoolVar(&aiMode, "ai", false, "use AI mode for advanced command generation")
102103
flag.BoolVar(&troubleshoot, "troubleshoot", false, "troubleshooting mode with context analysis")
103104
flag.BoolVar(&showStats, "stats", false, "show usage statistics")
105+
flag.BoolVar(&installAll, "install", false, "install all supported tools")
104106
flag.Parse()
105107

108+
if installAll {
109+
installAllTools()
110+
return
111+
}
112+
106113
if displayHelp {
107114
showHelp()
108115
return
@@ -220,6 +227,7 @@ func showHelp() {
220227
fmt.Println(" -troubleshoot Enable troubleshooting mode with context analysis")
221228
fmt.Println(" -version Show version information")
222229
fmt.Println(" -help Show this help message")
230+
fmt.Println(" -install Install all supported tools and display their versions")
223231

224232
// Supported Tools
225233
fmt.Println("\n🛠️ Supported Tools:")
@@ -1727,4 +1735,41 @@ func simpleLogAnalysis(logs string) string {
17271735
}
17281736
b.WriteString("\nRecommendation: Investigate the above issues.\n")
17291737
return b.String()
1738+
}
1739+
1740+
func installAllTools() {
1741+
tools := []string{"terraform", "ansible", "kubectl", "docker", "helm", "aws", "gcloud", "az"}
1742+
fmt.Println("🔧 Installing all supported tools...")
1743+
for _, name := range tools {
1744+
tool := &Tool{
1745+
Name: name,
1746+
CheckCmd: name + " --version",
1747+
InstallCmd: getInstallCommand(name),
1748+
}
1749+
if checkToolInstalled(tool) {
1750+
fmt.Printf("✅ %s is already installed.\n", getToolDisplayName(name))
1751+
continue
1752+
}
1753+
fmt.Printf("🔧 Installing %s...\n", getToolDisplayName(name))
1754+
if installTool(tool) {
1755+
fmt.Printf("✅ %s installed successfully!\n", getToolDisplayName(name))
1756+
} else {
1757+
fmt.Printf("❌ Failed to install %s. Please install it manually.\n", getToolDisplayName(name))
1758+
}
1759+
}
1760+
fmt.Println("🎉 All tools processed.")
1761+
1762+
// Display table of installed tools and versions
1763+
fmt.Println("\n📦 Installed Tools:")
1764+
fmt.Println("────────────────────────────────────────────")
1765+
fmt.Printf("%-18s | %-20s\n", "Tool", "Version")
1766+
fmt.Println(strings.Repeat("-", 42))
1767+
for _, name := range tools {
1768+
ver := getToolVersion(name)
1769+
if ver == "" {
1770+
ver = "Not installed"
1771+
}
1772+
fmt.Printf("%-18s | %-20s\n", getToolDisplayName(name), ver)
1773+
}
1774+
fmt.Println(strings.Repeat("-", 42))
17301775
}

0 commit comments

Comments
 (0)