Skip to content

Migrate CLI from picocli to aesh with REPL console mode#166

Draft
stalep wants to merge 1 commit into
Hyperfoil:mainfrom
stalep:aesh
Draft

Migrate CLI from picocli to aesh with REPL console mode#166
stalep wants to merge 1 commit into
Hyperfoil:mainfrom
stalep:aesh

Conversation

@stalep

@stalep stalep commented Jul 3, 2026

Copy link
Copy Markdown
Member

Replace the picocli-based single-command CLI with an aesh interactive REPL (Read-Eval-Print Loop) shell. Users can now run multiple commands in a single session with tab completion, history, and folder context.

Entity-centric command structure:
folder — add, list, remove, upload, export, import, structure,
recalculate, purge, values
node — add (jq/js/jsonata/sqlpath/sqlpathall/split/fixedthreshold/
relativedifference/stddev), list, remove, update
view — list, show, create, remove, update (--add/--remove/--reorder)
run — list, show, upload
notification — add, list, remove
legacy — load-tests, load-runs, verify
admin — create-user, create-team, add-member, list-users, list-teams,
create-api-key, list-api-keys, revoke-api-key
cd — set active folder context
upload — top-level shortcut for folder upload

Key features:

  • Folder context: 'cd myFolder' sets context, subsequent commands omit --to/--from
  • Tab completion for commands, folder names, and node names
  • acceptNameWithoutDashes on all options (picocli-compatible syntax)
  • @arguments for positional args matching original CLI syntax
  • Default limit of 50 on list commands to prevent OOM
  • Ctrl-C interrupt support (InterruptedException on all commands)
  • generateHelp on all commands (--help shows usage)
  • Views: create views, add/remove node columns, show pivoted data
  • Runs: list uploads, show raw JSON data, per-node value inspection
  • H5mCommandRegistryFactory filters top-level commands for clean tab completion
  • Graceful startup recovery on SQLite (handles missing tables)
  • Upload command awaits CompletableFuture completion before returning
  • Uses aesh Table utility for formatted output
  • NodeNameCompleter for node name tab completion in view/run commands

Replace the picocli-based single-command CLI with an aesh interactive
REPL (Read-Eval-Print Loop) shell. Users can now run multiple commands
in a single session with tab completion, history, and folder context.

Entity-centric command structure:
  folder  — add, list, remove, upload, export, import, structure,
            recalculate, purge, values
  node    — add (jq/js/jsonata/sqlpath/sqlpathall/split/fixedthreshold/
            relativedifference/stddev), list, remove, update
  view    — list, show, create, remove, update (--add/--remove/--reorder)
  run     — list, show, upload
  notification — add, list, remove
  legacy  — load-tests, load-runs, verify
  admin   — create-user, create-team, add-member, list-users, list-teams,
            create-api-key, list-api-keys, revoke-api-key
  cd      — set active folder context
  upload  — top-level shortcut for folder upload

Key features:
- Folder context: 'cd myFolder' sets context, subsequent commands omit --to/--from
- Tab completion for commands, folder names, and node names
- acceptNameWithoutDashes on all options (picocli-compatible syntax)
- @arguments for positional args matching original CLI syntax
- Default limit of 50 on list commands to prevent OOM
- Ctrl-C interrupt support (InterruptedException on all commands)
- generateHelp on all commands (--help shows usage)
- Views: create views, add/remove node columns, show pivoted data
- Runs: list uploads, show raw JSON data, per-node value inspection
- H5mCommandRegistryFactory filters top-level commands for clean tab completion
- Graceful startup recovery on SQLite (handles missing tables)
- Upload command awaits CompletableFuture completion before returning
- Uses aesh Table utility for formatted output
- NodeNameCompleter for node name tab completion in view/run commands
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.

1 participant