Skip to content

dyode setup: guided setup in dialog boxes, hooked into install.sh - #2

Merged
nc-intezra merged 4 commits into
mainfrom
setup-wizard
Oct 27, 2026
Merged

nc-intezra merged 4 commits into
mainfrom
setup-wizard

Conversation

@nc-intezra

Copy link
Copy Markdown
Owner

Brings back DYODE (Python) 1.5's guided setup, as dyode setup, built into the binary.

What it does

  • Dialog boxes in the classic dialog/whiptail look, drawn with termios + ANSI (no ncurses dependency), so it works from the offline bundle, over ssh and on serial consoles. Plain numbered questions when there is no usable terminal, or with --plain.
  • One question per screen; Esc goes back everywhere; nothing is written before the review screen, which shows warnings, the plan and the full config.yaml.
  • The result is validated by config::parse (the service's own loader) before it can be written; existing files are backed up.
  • Import from another box's config.yaml keeps every option it does not ask about; the key beside it can be copied.
  • New compared with 1.5: lidi ports (suggested from CPU count) and rate cap screens; diode-card warnings (no link, default route, address mismatch); a key step; an Advanced screen per module covering every option the loader accepts, with defaults and validation.
  • On the output box, picking the diode card sets dyode_out.mac from that card (and warns if that changes an imported file).

install.sh

  • Asks offline or online first (same dialog look, drawn by the bundle's binary; plain prompt without one) when neither flag is given on a terminal.
  • Runs the guided setup on every interactive install (--no-wizard skips, --import-config FILE starts from a file), then writes the systemd unit from the config it produced instead of config.example.yaml.

Testing

  • 53 tests pass (11 for setup: scripted full runs of both UIs, Esc/validation, presets, import, apply with backup + key, advanced defaults accepted by the loader).
  • Real pty runs of dyode setup and of install.sh --dry-run (mode question → wizard), terminal restored on exit.
  • cargo fmt --check, cargo clippy --all-targets -D warnings clean.
  • Not yet run on diode hardware.

Generated by Claude Code

A port of DYODE (Python) 1.5's curses setup, built into the binary with
no ncurses dependency: termios raw mode and ANSI drawing (src/tui.rs),
with a plain-question fallback for pipes and dumb terminals.

- one question per screen, Esc back everywhere, nothing written before
  the review; the result is validated by config::parse
- import keeps every option it does not ask about; backups on write
- new lidi ports/rate screens, diode-card warnings, key step
- install.sh runs it when no config.yaml exists (--wizard, --no-wizard,
  --import-config) and builds the unit from the config it wrote

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QXjQsiWnwLMndr5XU9g5LJ
- every module gets an Advanced screen (after its main fields, and from
  its menu) with each option the loader accepts, its default and checks
- install.sh asks offline/online before installing anything, drawn by the
  dyode binary in the same dialog look (plain prompt without a binary)
- install.sh runs the guided setup on every interactive install

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QXjQsiWnwLMndr5XU9g5LJ
- folder modules: parallel_files (1-16) files of a batch in flight at
  once, each its own lidi transfer; max_clients defaults to the modules'
  concurrent transfers + 2
- dyode check: compares the installed dyode-in/out.service with
  config.yaml (NIC, command, config path), suggests lidi ports for the
  CPU count, warns when an explicit max_clients is too small
- packaging/systemd/reference/: v1/v2 units for both sides, kept equal to
  the generator by a test
- setup: parallel_files on the folder Advanced screen
- loopback test with 4 files in flight over 2 lidi ports

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QXjQsiWnwLMndr5XU9g5LJ
2.0.2: parallel_files, unit/NIC check in dyode check, lidi port hints, reference units
@nc-intezra
nc-intezra merged commit d12dcc7 into main Oct 27, 2026
23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants