Metadata-Version: 2.4
Name: akv-tui
Version: 0.1.1
Summary: Simple TUI to search Azure KeyVault
Author-email: Jonathan Kößler <mail@jonathan-koessler.de>
License: MIT License
        
        Copyright (c) 2025 Jonathan Kößler
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
License-File: LICENSE
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Requires-Python: <3.14,>=3.11
Requires-Dist: azure-identity>=1.23.0
Requires-Dist: azure-keyvault>=4.2.0
Requires-Dist: azure-mgmt-keyvault>=11.0.0
Requires-Dist: azure-mgmt-resource>=24.0.0
Requires-Dist: pyperclip>=1.9.0
Requires-Dist: textual>=3.4.0
Description-Content-Type: text/markdown

# 🔐 AKV-TUI — Azure Key Vault Explorer
[![CI](https://github.com/jkoessle/akv-tui/actions/workflows/release.yml/badge.svg)](https://github.com/jkoessle/akv-tui/actions/workflows/release.yml)
[![PyPI - Version](https://img.shields.io/pypi/v/akv-tui)](https://pypi.org/project/akv-tui/)
![PyPI - Python Version](https://img.shields.io/pypi/pyversions/akv-tui)
[![License](https://img.shields.io/badge/license-MIT-green)](./LICENSE)

**AKV-TUI** is a fast and intuitive terminal-based UI (TUI) for browsing secrets, keys, and certificates in your Azure Key Vaults. Built with [Textual](https://github.com/Textualize/textual), it lets you quickly search, preview, and copy values from your vaults — all from your terminal.

## ✨ Features

- 🔍 Browse secrets, keys, and certificates from any Azure subscription
- 📋 Copy values to clipboard with one click
- 🔐 Authenticate with `az login` or interactive browser login
- ⌨️ Keyboard navigation with intuitive shortcuts

## 🚀 Installation

We recommend using [uv](https://github.com/astral-sh/uv) or [pipx](https://pipx.pypa.io/stable/installation/) for isolated CLI apps.

### Using `pipx`
```bash
pipx install akv-tui
```

### With `uv`:
```bash
uv venv
source .venv/bin/activate
uv pip install .
```

## 🧪 Requirements

- Python 3.10+
- [Azure CLI](https://learn.microsoft.com/en-us/cli/azure/install-azure-cli?view=azure-cli-latest) if you want to use `az login` for authentication
- Clipboard tool:
  - macOS: pbcopy & pbpaste (built-in)
  - Linux: xclip (recommended) or xsel

## 🛠️ Usage

Simply start the app in the terminal of your choice:

```bash
akv-tui
```

Or if you cloned the repository locally:

```bash
python -m akv_tui
```

### Keyboard Shortcuts

| Key             | Action                          |
| --------------- | ------------------------------- |
| `q`             | Quit the application            |
| `d`             | Toggle dark/light theme         |
| `↑`/`↓`         | Navigate list items             |
| `←`/`→`         | Switch between input/list       |
| `Enter`         | Copy selected value             |
| `Tab`           | Navigate widgets clockwise      |
| `Shift` + `Tab` | Navigate widgets anti-clockwise |

## 🧩 How It Works

- Tries to authenticate using DefaultAzureCredential
- Falls back to InteractiveBrowserCredential if needed
- Fetches Key Vaults from all accessible subscriptions
- Loads and filters secrets, keys, or certificates based on selection
- Copies values to clipboard on selection

## 🛡️ Security

This tool does not store credentials or secrets locally. It uses Azure's official authentication flow and only accesses values that your identity has permission to read.

To use this app effectively, make sure your Azure account has at least:
- Reader or Key Vault Reader role on your subscriptions
- Secret Reader, Key Reader, or Certificate Reader permissions on the vault
