Skip to content

eda-labs/eda-tui

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

EDA Textual TUI

Python Textual TUI that mirrors the core workflows from the VS Code EDA extension:

  • Connect to an EDA target with Keycloak auth
  • VS Code-style left explorer tree (Dashboards + Resources + Kubernetes)
  • Target selection through a modal (Ctrl+R)
  • Stream-driven updates (no manual refresh buttons)
  • Load selected resource to YAML editor, then apply / dry-run / add-to-basket
  • Commit/dry-run/discard transaction basket (Transactions user storage file)
  • Transaction details, revert, restore
  • Deviation accept/reject/reject-all
  • Keyboard-first shortcuts with context-aware footer hints

Keyboard-first navigation

  • Ctrl+G explorer tree focus
  • Ctrl+D dashboard focus (query input for Queries, table otherwise)
  • Ctrl+L editor focus
  • Ctrl+F2 explorer filter focus
  • Ctrl+F6/Ctrl+F7 expand/collapse explorer
  • Ctrl+F8 toggle activity log
  • Ctrl+R open targets
  • Ctrl+J open jump launcher
  • Ctrl+F1 open keyboard help for current context
  • Ctrl+F9 open omni search
  • Ctrl+F10 open resource browser
  • Ctrl+F3 details action
  • Ctrl+Shift+F3 primary action
  • Ctrl+Shift+F6 secondary action
  • Ctrl+Shift+F7 tertiary action
  • 1..9 and 0 trigger the currently visible footer actions
  • Explorer ergonomics: h/j/k/l aliases (h/l collapse-expand, j/k move)
  • Dashboard table ergonomics:
    • j/k/h/l aliases for table movement
    • Home/End jump to first/last row, PageUp/PageDown jump by 12 rows
    • Enter opens row details for standard dashboards
    • Pods dashboard: Left/Right or Tab/Shift+Tab choose inline action column, Enter runs it

Project layout

  • eda_tui/core/: runtime config, env flags, paths, logging helpers.
  • eda_tui/domain/: domain models and target loading.
  • eda_tui/services/api/: API client, API models, and stream transport.
  • eda_tui/services/repository.py: service-level repository boundary.
  • eda_tui/ui/screens/: dashboard + modal screen components.
  • eda_tui/ui/widgets/: reusable UI widgets/builders.
  • eda_tui/ui/actions/: tree/connection action handlers.
  • eda_tui/ui/state/: focused UI state models.
  • eda_tui/ui/styles/app.tcss: Textual CSS.
  • eda_tui/app.py and eda_tui/client.py: compatibility facades for existing entrypoints/imports.

Install and run with uv

cd /root/projects/vscode-eda/eda-textual-tui
uv sync
uv run eda-tui
curl eda.dev/uvx | sh -s -- https://github.com/eda-labs/eda-tui/archive/refs/heads/main.zip

Lint and format (ruff)

Run these commands locally before committing:

uv run ruff format .
uv run ruff check .
uv run pylint eda_tui

Optional auto-fix pass:

uv run ruff check --fix .

Nerd Font icons

The UI now uses Nerd Font glyphs for explorer nodes, dashboard labels, and action buttons.

If you need plain ASCII labels (for unsupported terminals), disable icons:

EDA_TUI_USE_NERD_FONTS=0 uv run eda-tui

Targets configuration

The app can load targets from:

  • ./targets.json when running from a checked-out repo
  • ~/.config/eda-tui/targets.json for installed usage (or $EDA_TUI_TARGETS_FILE override)
  • Environment variables (EDA_TUI_TARGET_URL, EDA_TUI_EDA_USERNAME, EDA_TUI_CLIENT_ID, ...), so targets.json is optional

Expected file shape is intentionally close to the extension:

{
  "https://eda.example.local": {
    "context": "kubernetes-admin@kubernetes",
    "edaUsername": "admin",
    "clientId": "eda",
    "kcUsername": "admin",
    "skipTlsVerify": true,
    "coreNamespace": "eda-system"
  }
}

Supported keys per target:

  • context
  • edaUsername
  • clientId
  • kcUsername
  • skipTlsVerify
  • coreNamespace

Notes:

  • Keep secrets out of inline target fields. Store credentials from the target modal (Ctrl+R).
  • Legacy inline secret keys (edaPassword, clientSecret, kcPassword) are still read, but save/update flows remove them.
  • If clientSecret is blank but Keycloak admin credentials are available, the app can fetch the client secret from Keycloak.
  • Explorer data updates via WebSocket + SSE stream registrations.
  • The app no longer writes .last-target.json; it only auto-connects when exactly one target is configured.

First-run auth flow

Run the app:

uv run eda-tui

If no targets exist, the app opens the target modal automatically. In that modal you can:

  • Create/edit target metadata
  • Select Kubernetes context from kubeconfig contexts
  • Save target config
  • Delete targets
  • Credentials are always saved inside ~/.eda-tui/targets.json when provided
  • Retrieve client secret from Keycloak (URL + KC admin credentials)
  • Connect immediately

(eda-tui with no subcommand also runs the app.)

Headless/CI token auth

For non-interactive automation you can provide an access token at runtime:

export EDA_TUI_TOKEN='...'
# or
export EDA_TUI_TOKEN_FILE=/path/to/token.txt

Tokens are read at runtime and are not persisted by the app.

For fileless target metadata you can also set:

export EDA_TUI_TARGET_URL=https://eda.example.local
export EDA_TUI_EDA_USERNAME=admin
export EDA_TUI_CLIENT_ID=eda
export EDA_TUI_CREDENTIALS_REF=eda-example-local

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages