Skip to content
This repository was archived by the owner on Jan 21, 2026. It is now read-only.
This repository was archived by the owner on Jan 21, 2026. It is now read-only.

[Feature request] Add a non-interactive mode or support for 'expect' program #60

Description

@mcastillof

I recently found your program and it works awesome, but I would also love to make a bash script that could use or interact with it.

Maybe allow arguments like:

./duckduckgo-chat-cli_v1.2.2_linux_amd64 -prompt="Hello"
Hello, how are you?

./duckduckgo-chat-cli_v1.2.2_linux_amd64 -model="gpt-4o-mini" -prompt="Hello"
Hi, how can I assist you today?

Another way could be add support to interacting with 'expect', something like:

#!/usr/bin/expect -f

set timeout -1

spawn ./duckduckgo-chat-cli_v1.2.2_linux_amd64

# Esperar prompt
expect "You: "

# Enviar texto
send "Hello\r"

# Capturar respuesta entre prompts
expect {
    -re {gpt-4o-mini: (.*)\r?\nYou: } {
        set respuesta $expect_out(1,string)
        puts "RESPUESTA CAPTURADA:"
        puts $respuesta
    }
}

ChatGPT said something like if it was a GO program it was needed to remove TUI mode, and force reading from stdin. I have never done programming in GO, so I don't know what is that TUI mode, but reading from stdin make sense to allow interaction with 'expect'.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions