.TH CGIP 1 "2024-06-20" "version 0.2.11" "CGIP MAN PAGE" .SH NAME cgip \- interact with ChatGPT based on contextual input from files or standard input. .SH SYNOPSIS .B cgip [OPTIONS] [QUERY] | [COMMAND] .SH DESCRIPTION Terminal client for interacting with Chat GPT that allows you to build and manipulate contexts. Queries can be piped in through stdin and will be added to the context first. The query passed in as the first argument will then be added to the context second. Files read using \fB\-f\fR will be added last to the context. .SH COMMANDS .TP \fBview\fR Render the context without running a query against the model. .TP \fBconfig\fR Set or get default configuration values with your config.toml. .TP \fBsession\fR Used for continuous chat session management and shell integration. To enable session caching in your terminal, add the following to your .bashrc or .zshrc: .P .RS export CGIP_SESSION_NAME=$(uuid) # for each new terminal session to be unique export CGIP_SESSION_NAME=$(date -I) # for a session that will be the same for the entire day .P .RE .SH ARGUMENTS .TP \fB[QUERY]\fR Optional. The primary query to send to the model. This is added to the context after stdin and file input. .SH OPTIONS .TP \fB\-f\fR, \fB\-\-file=FILE\fR Read query from a file. If a query is present, it is added to the prompt after the query. If this option is present, stdin is ignored. .TP \fB\-s\fR, \fB\-\-system\-prompt=SYSTEM_PROMPT\fR Specify a system prompt. .TP \fB\-M\fR, \fB\-\-model=MODEL\fR Specify the model to use. Defaults to `gpt-4`. .TP \fB\-l\fR, \fB\-\-list\-models\fR List all the available models. .TP \fB\-p\fR, \fB\-\-show\-progress\fR Show the progress indicator (might interfere with stdout). .TP \fB\-c\fR, \fB\-\-show\-context\fR Output the full context used in the query, including chat context with all assistant and user messages. .TP \fB\-m\fR, \fB\-\-markdown\fR Show context in a human-readable table. .TP \fB\-n\fR, \fB\-\-no\-session\fR Don't use messages from the session in this request. .TP \fB\-h\fR, \fB\-\-help\fR Print help (see more with '--help'). .TP \fB\-V\fR, \fB\-\-version\fR Print version. .SH EXAMPLES .P To pipe input from 'ls' and query about the files: .P .RS ls | \fBcgip\fR "What can you tell me about these files?" .P .RE To debug a failing build output: .P .RS cargo build 2>&1 | \fBcgip\fR "What does this error mean?" .RE .SH AUTHOR Written by Divan Visagie and Anna L. Smith. .SH "SEE ALSO" .BR ls(1), .BR cat(1), .BR echo(1), .BR tree(1)