Skip to content

Add __INPUT__ alternative for input from args only, not stdin #1196

@edshamis

Description

@edshamis

Is your feature request related to a problem? Please describe.

Sometimes we need to differentiate between stdin and input from args.

For example:
With trans role:

---
name: translate
model: openrouter:google/gemini-2.0-flash-001
---
prompt: >
  Translate to __INPUT__.
  Be as clear as possible.

input:

Command:
echo home | aichat --dry-run -r trans DE

Yields:

prompt: >
  Translate to DE
home
.
  Be as clear as possible.

input:

Describe the solution you'd like

Maybe we can have INPUT_ARGS that takes input from the args and not from stdin. In this case stdin would be attached to the end:

---
name: translate
model: openrouter:google/gemini-2.0-flash-001
---
prompt: >
  Translate to __INPUT_ARGS__.
  Be as clear as possible.

input:

Yields:

prompt: >
  Translate to DE
  Be as clear as possible.

input:
home

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions