Skip to main content

Kryten Shell

Interactive TUI shell for inspecting and controlling the Kryten ecosystem.

Features

  • Live Monitoring: Watch events, chat, and playlist changes in real-time
  • Interactive Commands: Send messages, manage playlist, query state with natural syntax
  • KV Store Inspector: Browse and inspect NATS KV store contents
  • Event Streaming: View all Kryten ecosystem events with filtering
  • Solarized Dark Theme: Easy on the eyes for extended sessions
  • Command History: Persistent history across sessions with up/down navigation
  • Tab Completion: Autocomplete commands as you type

Installation

cd kryten-shell
poetry install

Usage

# Start with defaults (localhost:4222)
poetry run kryten-shell

# Or use the short alias
poetry run ksh

# Connect to specific NATS server
poetry run kryten-shell --host 192.168.1.10 --port 4222

# Join a channel on startup
poetry run kryten-shell --channel cyberia

Keyboard Shortcuts

Key Action
F1 Show help
F2 Switch to Chat tab
F3 Switch to Playlist tab
F4 Switch to Events tab
F5 Switch to KV Store tab
Ctrl+R Refresh current view
Ctrl+L Clear current log
Ctrl+Q Quit
Escape Focus command input
↑/↓ Navigate command history
Tab Autocomplete command

Commands

Connection

  • connect - Connect to NATS server
  • disconnect - Disconnect from server
  • channel [name] - Join channel or show current
  • discover - Discover available channels

Chat

  • msg <message> - Send a chat message

Playlist

  • playlist - Show playlist
  • nowplaying - Show current video
  • skip - Skip current video

KV Store

  • kv buckets - List KV buckets
  • kv get <bucket> <key> - Get a value
  • kv keys <bucket> - List keys in bucket

Utility

  • help [command] - Show help
  • clear - Clear current view
  • refresh - Refresh current view
  • filter [pattern] - Filter events by type
  • status - Show connection status
  • quit - Exit shell

Configuration

Configuration is stored in the platform-specific config directory:

  • Windows: %APPDATA%\kryten\kryten-shell\config.json
  • Linux: ~/.config/kryten-shell/config.json
  • macOS: ~/Library/Application Support/kryten-shell/config.json

Example config:

{
  "nats": {
    "host": "localhost",
    "port": 4222
  },
  "channel": "cyberia",
  "show_timestamps": true,
  "max_chat_lines": 500,
  "max_event_lines": 1000
}

Development

# Install with dev dependencies
poetry install --with dev

# Run with textual dev tools
poetry run textual run kryten_shell.app:KrytenShellApp

# Run tests
poetry run pytest

# Type checking
poetry run mypy kryten_shell

# Linting
poetry run ruff check kryten_shell

License

MIT

Release files for kryten-shell 0.1.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for kryten-shell 0.1.4
File Size Uploaded
kryten_shell-0.1.4.tar.gz 45.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for kryten-shell 0.1.4
File Interpreter ABI Platform
kryten_shell-0.1.4-py3-none-any.whl Python 3 none any Details

Total release size: 99.7 kB

Release files / kryten_shell-0.1.4.tar.gz

Download URL kryten_shell-0.1.4.tar.gz
Size 45.5 kB
Tags Source
SHA-256 checksum
How to use checksums
6623eb0db94eb1c166c5b27fab7d62057813004fde144ed1456079522714c4dd
BLAKE2b-256 checksum
How to use checksums
4a4977db50a64072d60c8ae7cf75d3de8e82d90e592209e98c9c48eba1b05a11
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.2.1 CPython/3.12.11 Windows/11

Release files / kryten_shell-0.1.4-py3-none-any.whl

Download URL kryten_shell-0.1.4-py3-none-any.whl
Size 54.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ebe531cad1e1d46e565b47259ec441da6d8865567acf9ec4ff54cfc8a8a621a9
BLAKE2b-256 checksum
How to use checksums
a1d419897b9bcebdc9a99ff2f8fc0ec754f9857fb77946fa4eb114c374dc0267
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.2.1 CPython/3.12.11 Windows/11

Release history Release notifications | RSS feed

This release

0.1.4 This release

2 release files

0.1.3

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page