How projectdiscovery/aix works
AIx is a command-line client for querying OpenAI language models. The main workflow parses prompt and model options, sends a chat or model-list request, then formats or saves the result; streaming responses use a pipe to stdout. The README also documents model selection, system context, JSONL/file output, and update options. Source excerpts show the CLI-to-runner flow and response handling; no separate storage service is present, and update behavior is only partially evidenced.
Main entry points: main.go AIx command · options.go Input options · runner.go Request runner · result.go Response result
Components 10
CLI interaction
- AIx command
cmd/aix/main.go - Input options
internal/runner/options.go - Startup banner
internal/runner/banner.go - Terminal output
- Output file
Request and results
- Request runner
internal/runner/runner.go - OpenAI API
- Response result
internal/runner/result.go - Update service
Other components
- CLI user
Connections 10
- CLI user → AIx command: runs
README.md - AIx command → Input options: parses options
cmd/aix/main.go - Input options → Startup banner: shows banner
internal/runner/options.go - AIx command → Request runner: creates and runs
cmd/aix/main.go - Request runner → OpenAI API: requests models or chat
internal/runner/runner.go - Request runner → Response result: builds response
internal/runner/runner.go - AIx command → Response result: formats response
cmd/aix/main.go - AIx command → Terminal output: prints or streams
cmd/aix/main.go - AIx command → Output file: writes output
cmd/aix/main.go - Input options → Update service: checks version
internal/runner/options.go