An open API service indexing awesome lists of open source software.

https://github.com/tankibaj/helm-browser


https://github.com/tankibaj/helm-browser

Last synced: 2 months ago
JSON representation

Awesome Lists containing this project

README

          

# ๐Ÿš€ Helm Chart Browser

A beautiful, interactive terminal UI for browsing and downloading Helm chart values. Navigate through repositories, charts, and versions with ease!

![Go Version](https://img.shields.io/badge/Go-1.21+-00ADD8?style=flat&logo=go)
![License](https://img.shields.io/badge/license-MIT-blue.svg)
![Platform](https://img.shields.io/badge/platform-macOS%20%7C%20Linux%20%7C%20Windows-lightgrey)

## โœจ Features

- ๐ŸŽฏ **Interactive Navigation** - Use arrow keys, vim keys (j/k), or number shortcuts
- ๐Ÿ“Š **Beautiful Table Layout** - Clean, aligned columns for easy scanning
- ๐Ÿ“„ **Smart Pagination** - Browse large lists with 10 items per page
- ๐ŸŽจ **Color-coded Interface** - Visual hierarchy with syntax highlighting
- โšก **Fast & Responsive** - Async operations with loading states
- ๐Ÿท๏ธ **Latest Version Badge** - Clearly identifies the newest chart version
- ๐Ÿ’พ **Auto File Naming** - Downloads as `chartname-version-default-values.yaml`
- โŒจ๏ธ **Keyboard Shortcuts** - Full keyboard navigation support

## ๐ŸŽฌ Demo

```
๐Ÿš€ Helm Chart Browser

๐Ÿš€ Select a Helm repository:

REPOSITORY URL
โ”€โ”€โ”€โ”€ โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
โ–บ 1. argo https://argoproj.github.io/argo-helm
2. external-secrets https://charts.external-secrets.io
3. apisix https://charts.apiseven.com

๐Ÿ“„ 3 repositories available

โŒจ๏ธ Navigate: โ†‘/โ†“ arrows or j/k โ€ข Select: Enter/Space or number (1-9,0) โ€ข Back: Backspace/Esc โ€ข Quit: q/Ctrl+C
๐Ÿ’ก Tip: Use arrow keys to navigate through pages of results
```

## ๐Ÿ“‹ Prerequisites

- **Go 1.21+** - [Download Go](https://golang.org/dl/)
- **Helm CLI** - [Install Helm](https://helm.sh/docs/intro/install/)
- **Configured Helm Repositories** - Add repos with `helm repo add`

## ๐Ÿš€ Quick Start

### Option 1: Download Release (Recommended)

```bash
# Download the latest release for your platform
curl -L https://github.com/tankibaj/helm-browser/releases/latest/download/helm-browser-linux -o helm-browser
chmod +x helm-browser
./helm-browser
```

### Option 2: Build from Source

```bash
# Clone the repository
git clone https://github.com/tankibaj/helm-browser.git
cd helm-browser

# Build the application
go build -o helm-browser .

# Run it
./helm-browser
```

### Option 3: Install with Go

```bash
go install github.com/tankibaj/helm-browser@latest
helm-browser
```

## ๐Ÿ› ๏ธ Development Setup

### 1. Clone and Setup

```bash
git clone https://github.com/tankibaj/helm-browser.git
cd helm-browser
```

### 2. Install Dependencies

```bash
go mod tidy
```

### 3. Run in Development Mode

```bash
go run .
```

### 4. Build for Production

```bash
# Build for current platform
go build -o helm-browser .

# Build for multiple platforms
make build-all
```

## ๐Ÿ“ฆ Build Instructions

### Single Platform Build

```bash
go build -ldflags="-s -w" -o helm-browser .
```

### Cross-Platform Builds

```bash
# Linux AMD64
GOOS=linux GOARCH=amd64 go build -ldflags="-s -w" -o helm-browser-linux .

# macOS AMD64
GOOS=darwin GOARCH=amd64 go build -ldflags="-s -w" -o helm-browser-darwin-amd64 .

# macOS ARM64 (Apple Silicon)
GOOS=darwin GOARCH=arm64 go build -ldflags="-s -w" -o helm-browser-darwin-arm64 .

# Windows AMD64
GOOS=windows GOARCH=amd64 go build -ldflags="-s -w" -o helm-browser-windows.exe .
```

### Using Makefile

```bash
# Build for all platforms
make build-all

# Clean build artifacts
make clean

# Run tests
make test
```

## ๐ŸŽฎ Usage

### Navigation Controls

|Key |Action |
|--------------------|----------------------------|
|`โ†‘/โ†“` or `j/k` |Navigate up/down |
|`Enter` or `Space` |Select item |
|`1-9`, `0` |Quick select (items 1-9, 10)|
|`Backspace` or `Esc`|Go back |
|`q` or `Ctrl+C` |Quit application |

### Workflow

1. **Start the application** - Automatically updates Helm repositories
1. **Select a repository** - Browse your configured Helm repos
1. **Choose a chart** - View all charts in the selected repository
1. **Pick a version** - See all available versions with app versions
1. **Download values** - Automatically saves `chartname-version-default-values.yaml`

### Example Session

```bash
$ ./helm-browser

# Navigate through:
# Repositories โ†’ Charts โ†’ Versions โ†’ Download

# Result:
# โœ… Successfully downloaded: argo-cd-5.46.8-default-values.yaml
```

## ๐Ÿ—๏ธ Architecture

### Key Components

- **Bubble Tea TUI** - Terminal user interface framework
- **Lipgloss Styling** - Beautiful colors and layouts
- **Helm CLI Integration** - Executes helm commands under the hood
- **Async Operations** - Non-blocking UI with loading states
- **State Management** - Clean state machine pattern

### Project Structure

```
helm-browser/
โ”œโ”€โ”€ main.go # Main application code
โ”œโ”€โ”€ go.mod # Go module dependencies
โ”œโ”€โ”€ go.sum # Dependency checksums
โ”œโ”€โ”€ README.md # This file
โ”œโ”€โ”€ LICENSE # MIT license
โ”œโ”€โ”€ Makefile # Build automation
โ””โ”€โ”€ .github/
โ””โ”€โ”€ workflows/ # CI/CD workflows
```

## ๐Ÿงช Testing

### Run Tests

```bash
go test ./...
```

### Test with Different Helm Setups

```bash
# Add test repositories
helm repo add bitnami https://charts.bitnami.com/bitnami
helm repo add stable https://charts.helm.sh/stable
helm repo update

# Run the application
./helm-browser
```

## ๐Ÿ“Š Performance

- **Startup Time**: ~2-5 seconds (includes `helm repo update`)
- **Memory Usage**: ~10-20MB
- **Chart Search**: ~200-500ms per repository
- **Version Loading**: ~1-3s for charts with 1000+ versions
- **UI Responsiveness**: 60 FPS with async operations

## ๐Ÿค Contributing

We welcome contributions! Hereโ€™s how to get started:

### 1. Fork & Clone

```bash
git clone https://github.com/tankibaj/helm-browser.git
cd helm-browser
```

### 2. Create Feature Branch

```bash
git checkout -b feature/your-feature-name
```

### 3. Make Changes

- Follow Go best practices
- Add tests for new features
- Update documentation

### 4. Test Your Changes

```bash
go test ./...
go build .
./helm-browser
```

### 5. Submit Pull Request

- Write clear commit messages
- Include description of changes
- Reference any related issues

## ๐Ÿ› Troubleshooting

### Common Issues

**โ€œhelm command not foundโ€**

```bash
# Install Helm first
curl https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash
```

**โ€œFailed to list reposโ€**

```bash
# Add some repositories first
helm repo add stable https://charts.helm.sh/stable
helm repo update
```

**โ€œNo charts foundโ€**

```bash
# Verify repositories are working
helm search repo --max-col-width=0
```

### Debug Mode

```bash
# Run with verbose output
HELM_DEBUG=true ./helm-browser
```

## ๐Ÿ“ License

This project is licensed under the MIT License - see the file for details.

## ๐Ÿ™ Acknowledgments

- [Bubble Tea](https://github.com/charmbracelet/bubbletea) - Amazing TUI framework
- [Lipgloss](https://github.com/charmbracelet/lipgloss) - Beautiful terminal styling
- [Helm](https://helm.sh/) - The package manager for Kubernetes
- [Charm](https://charm.sh/) - For creating delightful CLI tools

-----

**Made with โค๏ธ and Go**

*If you find this tool useful, please give it a โญ on GitHub!*