Skip to content

feat(presets): install apt presets and OpenCode - #22

Open
abrahdev wants to merge 1 commit into
mainfrom
feat/presets
Open

abrahdev wants to merge 1 commit into
mainfrom
feat/presets

Conversation

@abrahdev

@abrahdev abrahdev commented Nov 6, 2026

Copy link
Copy Markdown
Owner

Summary

Implements the preset and OpenCode part of #7.

  • Map the four preset groups to apt packages:
    • Essentials: git, curl, wget, build-essential.
    • Editors: neovim plus OpenCode.
    • Languages: python3, nodejs, npm, golang, rustc, cargo.
    • Utilities: htop, ripgrep, fd-find, jq, tmux.
  • PresetInstaller runs apt-get update and apt-get install inside the environment through
    ProotCommand, then installs OpenCode with the official installer and verifies it on PATH.
  • CommandRunner now accepts an onLine callback so the UI can stream the output.
  • The environment card installs its stored presets and shows the output in a dialog.
  • 7 unit tests cover the package mapping and the generated scripts.

Notes

  • apt requires kernel >= 4.11 (see P1.0: validate runtime execution with targetSdk 37 #4); the UI does not block older kernels.
  • Live cancellation of apt is not wired yet; the dialog is read-only while the install runs.
  • The advanced apt runner and apt-cache search remain for a follow-up commit.

Test plan

  • ./gradlew ktlintCheck lintStandardDebug testStandardDebugUnitTest assembleStandardDebug passes.
  • Manual on device: environment with essentials selected, tap "Install presets", verify
    git --version in the terminal.

- Map the four preset groups to apt packages.
- PresetInstaller runs apt-get update and install inside the
  environment through ProotCommand, then installs OpenCode with the
  official installer and verifies it on PATH.
- CommandRunner accepts an onLine callback for live output.
- The environment card installs its presets and shows the output in a
  dialog.
- 7 unit tests for the package mapping and scripts.

This branch has not been deployed

No deployments
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