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

https://github.com/hueidou/telepresence-manager

A cross-platform desktop GUI tool for managing Telepresence connections.
https://github.com/hueidou/telepresence-manager

dev gui kubectl manager telepresence ui

Last synced: 16 days ago
JSON representation

A cross-platform desktop GUI tool for managing Telepresence connections.

Awesome Lists containing this project

README

          

# Telepresence Manager

A cross-platform desktop GUI tool for managing [Telepresence](https://www.telepresence.io/) connections. Built with Python + pywebview (WebView).

[δΈ­ζ–‡ζ–‡ζ‘£](README.zh.md)

## Features

- πŸ” **Smart config scanning** β€” Auto-scan `~/.kube/` for K8s config files (config, *.txt, *.yaml, multi-document YAML)
- πŸ“‹ **Context cards** β€” Display all contexts as a card list (name, cluster, server, source file)
- ▢️ **One-click connect / disconnect** β€” Toggle Telepresence connection per context
- πŸ“Š **On-demand status** β€” Connection state, node count, Traffic Manager status (parallel queries)
- πŸ“¦ **Traffic Manager management** β€” Install / upgrade with one click
- πŸ’» **Context-aware shell** β€” Open a terminal window pre-configured for the selected context
- πŸ”§ **Tool auto-detect** β€” Finds telepresence & kubectl on all platforms (PATH, Homebrew, Snap, WinGet)
- πŸ”Ž **Search & filter** β€” Filter contexts by name, cluster, server, or source file (`Ctrl+F`)
- πŸ”„ **Auto-refresh** β€” Connection status auto-refreshes at configurable interval (default 30s)
- 🌍 **i18n: Chinese + English** β€” Auto-detects system language, switch anytime in βš™ Settings
- βš™ **Settings panel** β€” Language selector + refresh interval configuration
- πŸ†• **Auto-update** β€” Checks GitHub Releases on startup, one-click update with auto-restart
- ⌨️ **Keyboard shortcuts** β€” `Ctrl+R` scan, `Ctrl+F` search, `Esc` close panels
- πŸ“‹ **Copy context name** β€” One-click copy to clipboard
- πŸͺ΅ **File logging** β€” Operation log at `~/.kube/telepresence-manager.log`

## Screenshot

![Screenshot](./assets/screenshot.png)

## Prerequisites

| Platform | Requirements |
|----------|-------------|
| **Windows** | Windows 10/11, Edge WebView2 Runtime (built-in) |
| **macOS** | macOS 12+, WebKit (built-in) |
| **Linux** | X11/Wayland, WebKit2GTK (`apt install libwebkit2gtk-4.1-dev`) |

**Required on all platforms:**
- [telepresence](https://www.telepresence.io/) v2.x
- [kubectl](https://kubernetes.io/docs/tasks/tools/)

## Installation

### Download (Recommended)

Download the latest release from [GitHub Releases](https://github.com/hueidou/telepresence-manager/releases):

| Artifact | Platform | Description |
|----------|----------|-------------|
| `TelepresenceManager.exe` | Windows | Standalone executable |
| `*-win.zip` | Windows | Portable package |
| `*-Setup.exe` | Windows | Inno Setup installer |
| `TelepresenceManager` | macOS | Binary for macOS |
| `*-macos.tar.gz` | macOS | Portable package |
| `*.dmg` | macOS | Disk image with .app bundle |
| `TelepresenceManager` | Linux | Binary for Linux |
| `*-linux.tar.gz` | Linux | Portable package |
| `*.deb` | Linux (Debian/Ubuntu) | Debian package |

### From Source

```bash
git clone https://github.com/hueidou/telepresence-manager.git
cd telepresence-manager
pip install -r requirements.txt
python main.py
```

### Build Locally

```bash
pip install pyinstaller
python scripts/build.py
```

The executable will be generated in `dist/`.

## Project Structure

```
telepresence-manager/
β”œβ”€β”€ main.py # Entry point, creates pywebview window
β”œβ”€β”€ VERSION # Version string
β”œβ”€β”€ requirements.txt # Python dependencies
β”œβ”€β”€ telepresence_manager.spec # PyInstaller build spec
β”œβ”€β”€ LICENSE # MIT License
β”œβ”€β”€ README.md # English documentation
β”œβ”€β”€ README.zh.md # Chinese documentation
β”œβ”€β”€ app/ # Python backend
β”‚ β”œβ”€β”€ __init__.py
β”‚ β”œβ”€β”€ api.py # pywebview JS API bridge
β”‚ β”œβ”€β”€ config.py # Configuration management (~/.kube/tp-config.json)
β”‚ β”œβ”€β”€ kubeconfig.py # Kubeconfig discovery & parsing
β”‚ β”œβ”€β”€ logger.py # File logging (~/.kube/tp-manager.log)
β”‚ β”œβ”€β”€ telepresence.py # Telepresence / kubectl CLI wrappers
β”‚ └── updater.py # Version check & auto-update
β”œβ”€β”€ web/ # Frontend UI
β”‚ β”œβ”€β”€ index.html # Page structure
β”‚ β”œβ”€β”€ style.css # Dark theme styles
β”‚ β”œβ”€β”€ app.js # Frontend logic
β”‚ └── i18n.js # Internationalization (zh/en)
β”œβ”€β”€ scripts/
β”‚ └── build.py # Cross-platform build script
β”œβ”€β”€ installer/
β”‚ β”œβ”€β”€ setup.iss # Inno Setup installer script (Windows)
β”‚ β”œβ”€β”€ build-linux.sh # Linux packaging helper
β”‚ └── build-macos.sh # macOS packaging helper
└── .github/workflows/
└── release.yml # CI/CD: multi-platform build & release
```

## How It Works

```
WebView window (web/)
↕ pywebview JS API bridge
Python backend (app/api.py)
β”œβ”€ config.py Manages user settings (~/.kube/tp-config.json)
β”œβ”€ kubeconfig.py Scans ~/.kube/, parses YAML configs
β”œβ”€ telepresence.py Wraps telepresence / kubectl subprocess calls
└─ updater.py Checks GitHub Releases for updates
```

- Backend calls `telepresence` and `kubectl` CLI via `subprocess`
- All long-running operations execute in background threads (ThreadPoolExecutor)
- Tool paths are auto-searched on each platform (Homebrew, Snap, WinGet, etc.)
- Supports multi-document YAML, .txt files, and other config formats
- Auto-update downloads new binary and restarts via platform-appropriate script
- Logging to `~/.kube/telepresence-manager.log` with rotation (5 MB, 3 backups)

## Configuration

Settings are stored at `~/.kube/telepresence-manager.json`:

```json
{
"language": "auto",
"refreshInterval": 30
}
```

- **language**: `"auto"` (detect from system), `"zh"`, or `"en"`
- **refreshInterval**: Status auto-refresh interval in seconds (15/30/60/120)

Edit the file manually or use the βš™ Settings panel in the app.

## Keyboard Shortcuts

| Shortcut | Action |
|----------|--------|
| `Ctrl+R` / `F5` | Scan kubeconfigs |
| `Ctrl+F` | Focus search box |
| `Esc` | Close panels / dialogs |

## License

[MIT](LICENSE)