@tsg-dsp/adp-client-tui
v0.19.0
Published
Terminal User Interface for the Analytics Data Plane (Client Mode)
Downloads
299
Readme
ADP Client TUI
Terminal User Interface for the Analytics Data Plane in client mode.
Features
- File Management — List, upload, preview, and delete files
- Algorithm Instances — Browse all algorithm instances with status overview
- Bridge Status — Inspect WebSocket bridge connectivity, last message activity, and reconnect state
- Instance Detail — View instance info, participants, and events (algorithm + internal) with filtering and event data download
- Authentication — Supports bearer tokens, username/password login via SSO Bridge, and browser-based OAuth PKCE flow
Prerequisites
- Node.js >= 22
- A running Analytics Data Plane instance
Installation
pnpm install
pnpm buildUsage
# Basic usage (no auth)
pnpm dev -- --url http://localhost:3552/api
# With a bearer token
pnpm dev -- --url http://localhost:3552/api --token <your-token>
# With username/password login (will prompt for credentials)
pnpm dev -- --url http://localhost:3552/api --sso-url http://localhost:3700
# With username/password provided via CLI (non-interactive)
pnpm dev -- --url http://localhost:3552/api --sso-url http://localhost:3700 --username alice --password secret
# With a custom OAuth client ID
pnpm dev -- --url http://localhost:3552/api --sso-url http://localhost:3700 --client-id my-tui-clientEnvironment Variables
| Variable | Description |
| ----------- | ------------------------------------- |
| ADP_TOKEN | Bearer token (alternative to --token) |
CLI Options
| Flag | Description | Default |
| ----------------- | ----------------------------------------- | ---------------- |
| -u, --url | ADP API base URL (required) | - |
| -t, --token | Bearer token for authentication | - |
| -s, --sso-url | SSO Bridge URL for login | - |
| -c, --client-id | OAuth client ID | adp-client-tui |
| --username | SSO Bridge username (prompted if omitted) | - |
| --password | SSO Bridge password (prompted if omitted) | - |
Navigation
Main Menu
↑↓orj/k— Navigate menu itemsEnter— Selectq— Quit
Files Screen
↑↓orj/k— Navigate file listu— Upload a file (enter file path)d— Delete selected fileporEnter— Preview selected filer— Refresh file listborEscape— Back to main menu
Algorithm Instances Screen
↑↓orj/k— Navigate instance listEnter— View instance detailsr— Refresh listborEscape— Back to main menu
Bridge Status Screen
r— Refresh bridge statusborEscape— Back to main menu
Instance Detail Screen
↑↓orj/k— Navigate eventsEnter— View event datas— Save event data to filea— Filter: algorithm events onlyi— Filter: internal events only*— Filter: show all eventsr— Refresh instance & eventsborEscape— Back to instances list
Authentication
When auth is disabled
The TUI proceeds without authentication automatically.
Token-based auth
Provide a bearer token via:
--token <token>CLI flagADP_TOKENenvironment variable
Username/password login (recommended for SSH/VM)
Requires --sso-url pointing to the SSO Bridge. The TUI will:
- Prompt for username and password in the terminal (or accept
--username/--password) - Authenticate against the SSO Bridge's OAuth endpoint
- Receive a bearer token without needing a browser
This is the recommended approach when running the TUI on a headless VM via SSH.
Browser-based OAuth (PKCE) flow
The browser-based PKCE flow is also available via performPKCEFlow() in the auth module,
but the default with --sso-url is the headless username/password flow.
SSO Bridge Client Registration
Add the TUI client to your SSO Bridge configuration:
initClients:
- clientId: adp-client-tui
redirectUris:
- "^http://127\\.0\\.0\\.1:\\d+/callback$"
permissions:
- "read:adp.file"
- "create:adp.file"
- "update:adp.file"
- "delete:adp.file"
- "read:adp.algorithm"
- "read:adp.orchestration"
- "read:adp.dataplane"Development
# Run in development mode with tsx
pnpm dev -- --url http://localhost:3552/api
# Build for production
pnpm build
# Run the built version
pnpm start -- --url http://localhost:3552/api