Expand description
ebman — k9s-style TUI for AWS Elastic Beanstalk.
The crate is split lib + bin: this library holds the testable logic
(all the modules below), and src/main.rs is a thin binary entry
point that wires argv parsing, logging, the TUI lifecycle, and
dispatch into the lib. See CLAUDE.md for working rules and
BACKLOG.md for the milestone plan.
Splitting lib + bin lets integration tests and a sibling crate
(tui-common planned for a workspace with pgman) use ebman::…
the internal types instead of re-implementing them.
Modules§
- app
- audit
- Audit log: writers, parser, renderer, filter.
- aws
- cli
ebman <verb>non-interactive subcommands.- commands
- Single source of truth for
:commandmetadata. - config
- control
- Optional Unix-socket control plane. When
ebmanis launched with--control-socket PATH, this module opens a listener at PATH and accepts one-shot requests: - cost_
cache - On-disk cache for Cost Explorer results.
- demo_
fixture - Hand-crafted demo data for
ebman --demo. Builds a believable fleet for the fictionalpoly(Polymorphism) account so VHS / asciinema captures and screenshots can be reproduced without touching a real AWS account. - deploy_
poll - Wait-for-Green polling state machine shared between the CLI
([
crate::cli::action::run_deploy] /run_rollout) and the TUI (App::spawn_rollout_dispatch). - eb_cli
- EB CLI compatibility: read
<repo>/.elasticbeanstalk/config.ymlfor default profile / region / application. - font_
probe - Detect whether the current terminal’s font renders Powerline / Nerd
glyphs as a single cell. We can’t actually inspect the font from a TUI,
but we can write a known Powerline triangle (
U+E0B0) and ask the terminal where the cursor ended up. A patched font draws the glyph in one cell — cursor advances by 1. An unpatched font usually substitutes the placeholder block which most terminals render as a “wide” character, advancing the cursor by 2 — or, more commonly, falls back to the tofu/replacement character which most terminals render in one cell but at an obviously wrong baseline (we can’t tell from here, but the cell count is at least stable). We treat advance-by-1 as “supported” and anything else as “not supported”. - form
- Modal forms — reusable scaffolding for multi-field option-settings
editors. The first concrete consumer is
:capacity(MinSize / MaxSize / InstanceType / Cooldown); the Network / Security pickers will follow once we add a multi-select field kind. - lint
- Rule-based diagnostic engine. Drives three surfaces:
- llm
- LLM-backed explanations for lint issues.
- mode_
action - Modal action flow — the
:aactions menu and everything it spawns. - mode_
detail - Per-env drill-down mode — the tabbed view (Events / Instances /
Metrics / Queue / Logs / Config) the operator gets on
Enter. - mode_
dlq - DLQ inspection mode — viewer for the worker tier’s main + dead-letter SQS queues with peek / delete / purge / resend flows.
- overlay
- Centred-overlay sizing for ratatui popups.
- plugins
- profiles
- project
- Project-level configuration:
<repo>/.ebman/ebman.toml. - report_
bug - Bug-report payload builder.
- saved_
config - Parser for the EB CLI saved-config YAML format
(
.elasticbeanstalk/saved_configs/*.cfg.yml). The on-disk shape: - shell
- Embedded shell pane — spawns a subprocess inside a pseudo-terminal we
own, feeds its output through
vt100to maintain a virtual terminal buffer, and exposes a render path that paints that buffer into a ratatuiBuffer. The user types into ebman, ebman writes the bytes to the PTY master, the subprocess sees them as if they were typed directly. - splash
- Pixel-art splash scene — a beanstalk growing out of its pot
(the
ebman= Elastic Beanstalk gag: watch the thing sprout). Used by the boot splash and the:aboutoverlay. - sso
- state
- terraform
- Terraform integration: discover
terraform.tfstate, parse it foraws_elastic_beanstalk_environmentresources, and compute drift between the operator’s tf-declared intent and the live EB state. Drives three surfaces in 0.13: - theme
- ui
- update_
check - Check crates.io for a newer release of
ebman. The check fires once at startup and writes its result to the App via anAppMsg::UpdateCheck. We don’t pull inreqwestfor this —curlis already a dependency of the log-tail feature, so a one-shot subprocess fits in the same budget. - util
- App-specific path helpers for ebman. The generic bits
(
parse_bool,write_atomic) live intui-common::utiland are re-exported here so existingcrate::util::*call sites keep working unchanged.
Type Aliases§
- LogReload
Handle - Handle for live-reloading the log filter from the running app.
Constructed by
main::init_loggingand threaded ontoAppso:loglevelcan mutate the active subscriber at runtime. - Tui
- Concrete
ratatuiterminal we drive through the alt-screen. Lives in the lib soapp::Appcan hold a mutable reference to it through long-running operations (embedded shell,$EDITORhand-off).