Skip to content

EDBCREPO/termia

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TERMIA | A Gemini CLI Chat Client (using nodepp)

ezgif-7b51292b9724d0

This is a simple command-line interface (CLI) chat client built with the nodepp framework (a C++ analogue to Node.js) designed to interact with the Google Gemini API.

It allows you to type prompts directly into your terminal and see the AI's response streamed back, character by character.

Getting Started

# Before running this client, you'll need:

- The nodepp environment and compiler (requires a C++ environment).
- A Google Gemini API Key.
g++ -o main main.cpp -I./include -lssl -lcrypto ; ./main

Windows stream::pipe( fs::std_input() ) Bug

Okay, technically this is not a bug, but officially, Windows does not let us work with standard I/O files asynchronously (thanks, Windows!). This means the line stream::pipe( fin ); might not behave as expected for non-blocking input on Windows systems.

But this is not the end! Since nodepp supports workers, it is possible to create a dedicated thread to handle incoming std_input messages asynchronously in a different thread, allowing the main event loop to remain responsive:

void worker_file_pipe( file_t file ) {
    generator::stream::pipe arg;
    worker::add( arg, file );
}

How it works

IMAGE

Click Here

About

termIA | a simple AI using nodepp + gemini in the terminal.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors