Skip to content

feat: port apfel demos into aichat#1505

Open
renato-umeton wants to merge 1 commit into
sigoden:mainfrom
renato-umeton:feat/apfel-demo-roles
Open

feat: port apfel demos into aichat#1505
renato-umeton wants to merge 1 commit into
sigoden:mainfrom
renato-umeton:feat/apfel-demo-roles

Conversation

@renato-umeton
Copy link
Copy Markdown
Contributor

@renato-umeton renato-umeton commented Apr 3, 2026

Summary

  • Add 7 built-in roles ported from apfel demos: oneliner, explain, naming, wtd, port, gitsum, mac-narrator
  • Add bash/zsh shell functions (scripts/shell-integration/demos.{bash,zsh}) that gather context and pipe to the appropriate role, plus cmd as an alias for aichat -e
  • Skip cmd as a role since it duplicates the existing --execute / %shell% functionality

Usage

Roles work directly:

aichat -r oneliner "sum column 3 of a CSV"
aichat -r naming "function that retries HTTP requests"
aichat -r explain "curl -sSL -o /dev/null -w '%{http_code}'"

Shell functions (source demos.bash or demos.zsh) add context-gathering wrappers:

cmd "find all .log files modified today"   # alias for aichat -e
wtd ~/some/project                         # gathers dir info automatically
port 3000                                  # runs lsof, pipes to role
gitsum 20                                  # gathers git log, pipes to role
mac-narrator                               # gathers system stats, pipes to role

Test plan

  • cargo test --all -- 21 tests pass
  • cargo clippy --all --all-targets -- -D warnings -- clean
  • cargo fmt --all --check -- clean
  • Manual: aichat --list-roles shows new roles
  • Manual: aichat -r naming "function that retries HTTP" returns naming suggestions
  • Manual: source demos.zsh and run gitsum in a git repo

Closes #1504

Port apfel demo utilities as built-in roles (oneliner, explain, naming,
wtd, port, gitsum, mac-narrator) and shell functions that gather context
and pipe to the appropriate role. Adds cmd as an alias for aichat -e.

Closes sigoden#1504
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.

Port apfel demos into aichat

1 participant