Interactive TUI shell for inspecting and controlling the Kryten ecosystem
Project description
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 serverdisconnect- Disconnect from serverchannel [name]- Join channel or show currentdiscover- Discover available channels
Chat
msg <message>- Send a chat message
Playlist
playlist- Show playlistnowplaying- Show current videoskip- Skip current video
KV Store
kv buckets- List KV bucketskv get <bucket> <key>- Get a valuekv keys <bucket>- List keys in bucket
Utility
help [command]- Show helpclear- Clear current viewrefresh- Refresh current viewfilter [pattern]- Filter events by typestatus- Show connection statusquit- 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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
kryten_shell-0.1.4.tar.gz
(45.5 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file kryten_shell-0.1.4.tar.gz.
File metadata
- Download URL: kryten_shell-0.1.4.tar.gz
- Upload date:
- Size: 45.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.2.1 CPython/3.12.11 Windows/11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6623eb0db94eb1c166c5b27fab7d62057813004fde144ed1456079522714c4dd
|
|
| MD5 |
0ff2a06123bfc3bfd4e8fe384033c992
|
|
| BLAKE2b-256 |
4a4977db50a64072d60c8ae7cf75d3de8e82d90e592209e98c9c48eba1b05a11
|
File details
Details for the file kryten_shell-0.1.4-py3-none-any.whl.
File metadata
- Download URL: kryten_shell-0.1.4-py3-none-any.whl
- Upload date:
- Size: 54.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.2.1 CPython/3.12.11 Windows/11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ebe531cad1e1d46e565b47259ec441da6d8865567acf9ec4ff54cfc8a8a621a9
|
|
| MD5 |
cdf56c901e1d4d06235fc0034faaa20b
|
|
| BLAKE2b-256 |
a1d419897b9bcebdc9a99ff2f8fc0ec754f9857fb77946fa4eb114c374dc0267
|