Metadata-Version: 2.4
Name: up-tray
Version: 0.4.0
Summary: Qt6 system-tray replacement for Upbound's up CLI
Project-URL: Homepage, https://github.com/upbound/up-tray
Project-URL: Repository, https://github.com/upbound/up-tray
Project-URL: Issues, https://github.com/upbound/up-tray/issues
Author: Johnny Boero
License-Expression: Apache-2.0
License-File: LICENSE
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: X11 Applications :: Qt
Classifier: Intended Audience :: System Administrators
Classifier: Operating System :: POSIX :: Linux
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Topic :: System :: Systems Administration
Requires-Python: >=3.9
Requires-Dist: keyring>=24.0
Requires-Dist: kubernetes>=29.0
Requires-Dist: pyqt6>=6.5
Requires-Dist: pyyaml>=6.0
Requires-Dist: requests>=2.31
Provides-Extra: ai
Requires-Dist: anthropic>=0.40; extra == 'ai'
Provides-Extra: render
Requires-Dist: docker>=7.0; extra == 'render'
Requires-Dist: grpcio>=1.60; extra == 'render'
Requires-Dist: protobuf>=4.25; extra == 'render'
Description-Content-Type: text/markdown

# up-tray

A Qt6 system-tray app that replaces Upbound's `up` CLI without the 250 MB Go binary.

Talks directly to `api.upbound.io` for cloud ops and to your Spaces clusters via
the Kubernetes API. Composition render is supported either natively (Docker +
gRPC, requires `[render]` extras and proto stubs) or by falling through to the
upstream `crossplane` CLI when present.

It also ships an optional **AI assistant** (new in 0.4) — diagnose unhealthy
resources, chat with a Crossplane expert, and one-click remediation — using
Claude or any local OpenAI-compatible endpoint.
See [AI assistant](#ai-assistant-optional-opt-in).

> **Open source, use at your own risk.** up-tray is a community, open-source
> project licensed under Apache-2.0. It is provided "as is", without warranty
> of any kind; you assume all risk from its use. It is not an official Upbound
> product and is not covered by any Upbound support agreement.

> **Vibe coded with Claude.** This app was largely vibe-coded in close pairing
> with Anthropic's Claude (via Claude Code), which dramatically accelerated the
> Upbound/Crossplane learning curve and turned ideas into working PyQt6 features
> fast. Review the code before you rely on it.

## Running it

[up-tray.webm](https://github.com/user-attachments/assets/8b994faf-a9c0-4bcd-8a68-04e073e1e571)

```sh
./run.sh              # system Python + dnf-installed deps. If anything's
                      # missing it prints the dnf line and exits.
./run.sh --install    # dnf install missing deps, then run
./run.sh --venv       # force a local venv (for code iteration or non-Fedora)
./run.sh --help       # the rest of the flags
```

[Qt must be installed.](https://doc.qt.io/qt-6/get-and-install-qt.html) 

For installed-on-disk daily use use `pip` or build the RPM:
```sh
pip install up-tray
```
or RPM:
```sh
./build-srpm.sh
rpmbuild --rebuild build/srpm/up-tray-*.src.rpm
sudo dnf install ~/rpmbuild/RPMS/noarch/up-tray-*.rpm
up-tray &
```

The RPM is noarch and depends on `python3-pyqt6`, `python3-requests`,
`python3-pyyaml`, `python3-kubernetes`, with `python3-keyring` recommended.
No venv anywhere on the install path.

Fedora/EL users can also get it from the
[`upbound` COPR](https://copr.fedorainfracloud.org/coprs/boeroboy/upbound/):
```sh
sudo dnf copr enable boeroboy/upbound
sudo dnf install up-tray
```

## AI assistant (optional, opt-in)

up-tray 0.4 adds an opt-in AI assistant:

- **🤖 Ask a Crossplane expert** — a general chat, from the top of the tray menu.
- **🤖 AI Help** — on any unhealthy resource: it diagnoses the problem and
  proposes a fix you can apply.

It's **bring-your-own-model** and works two ways:

- **Claude** — your own Anthropic API key. Install the extra with
  `pip install 'up-tray[ai]'` (or the `python3-anthropic` package). The key is
  stored in your OS keyring, never in a config file.
- **Any OpenAI-compatible endpoint** — vLLM, Ollama, llama.cpp, LM Studio, or a
  private gateway. No key needed and nothing leaves your network — the
  local/airgapped path, which needs nothing beyond the core dependencies.

Safety model:

- Cluster read access is **opt-in** and **read-only by default**; the state sent
  to the model is **redacted** (secrets, tokens and keys stripped) first.
- A separate, clearly-labelled opt-in enables **cluster-modify** mode. Even then
  the assistant only *proposes* a `kubectl` command or manifest — generation
  halts at the proposal, up-tray shows it and flags anything destructive, and it
  runs **only after you confirm**, feeding the real output back so the model can
  continue. Nothing is ever applied automatically.

Configure it under **Settings ▸ 🤖 AI assistant**.

## Status

Alpha. Cloud, Spaces, kubeconfig, and xpkg paths are wired natively against
the Upbound REST API and the Kubernetes Python client. Composition render
currently shells to `crossplane` until proto stubs are compiled into the
package.
