feat(alias): support shell scripts and Android alias editing #329

Merged
kfickel merged 4 commits from 326_shell-command-aliases into main 2026-10-25 10:50:25 +01:00
Collaborator

Closes #326.

Aliases now accept exactly one of command (a configured streamd command) or shell (a script). For example, a [commands.sync] alias with shell = "git pull --rebase && git push" runs from the stream folder using $SHELL -c, with sh as the fallback.

  • Pass trailing arguments separately as $1, $2, … and "$@", including flags and whitespace; inherit stdio, set the absolute STREAMD_BASE_FOLDER, and return the script's exit code.
  • Keep validation errors at their field or table, reject empty scripts and aliases of either alias kind, and leave shell code untouched by command renames. Shell defaults do not execute in the interactive picker.
  • Bind both alias kinds through UniFFI. Android can edit them through a kind selector and multiline script field with a CLI-only notice; aliases remain unavailable in All, pins and navigation.
  • Add a commented sync example to streamd init and update README, requirements and agent documentation. No dependencies changed.

Validation:

  • nix flake check: passed, including 1,734 Rust tests, architecture checks, clippy, formatting, audit and 102 Kotlin binding checks.
  • Android configuration unit tests: passed, including preserving text when switching alias kinds.
  • Screenshot references recorded; all six new/changed light and dark images inspected.
  • nix build .#streamd-app: passed for commit 6d3f097, including the offline APK build, app unit tests with the native bindings, and exact screenshot comparison.
Closes #326. Aliases now accept exactly one of `command` (a configured streamd command) or `shell` (a script). For example, a `[commands.sync]` alias with `shell = "git pull --rebase && git push"` runs from the stream folder using `$SHELL -c`, with `sh` as the fallback. - Pass trailing arguments separately as `$1`, `$2`, … and `"$@"`, including flags and whitespace; inherit stdio, set the absolute `STREAMD_BASE_FOLDER`, and return the script's exit code. - Keep validation errors at their field or table, reject empty scripts and aliases of either alias kind, and leave shell code untouched by command renames. Shell defaults do not execute in the interactive picker. - Bind both alias kinds through UniFFI. Android can edit them through a kind selector and multiline script field with a CLI-only notice; aliases remain unavailable in All, pins and navigation. - Add a commented sync example to `streamd init` and update README, requirements and agent documentation. No dependencies changed. Validation: - `nix flake check`: passed, including 1,734 Rust tests, architecture checks, clippy, formatting, audit and 102 Kotlin binding checks. - Android configuration unit tests: passed, including preserving text when switching alias kinds. - Screenshot references recorded; all six new/changed light and dark images inspected. - `nix build .#streamd-app`: passed for commit `6d3f097`, including the offline APK build, app unit tests with the native bindings, and exact screenshot comparison.
docs(alias): add sync script example and document shell aliases
All checks were successful
Continuous Integration / Build Package (push) Successful in 2m14s
Continuous Integration / Conventional Commits (push) Successful in 27s
Continuous Integration / Lint, Check & Test (push) Successful in 1m53s
6d3f097c3a
kfickel deleted branch 326_shell-command-aliases 2026-10-25 10:50:26 +01:00
Sign in to join this conversation.
No reviewers
No labels
android
cli
epic
planned
tui
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
kfickel/streamd!329
No description provided.