Skip to content

Rudra0Panda/Gemini-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 

Repository files navigation

Converting gemini.c to an Executable

This guide explains how to compile gemini.c into an executable and install it in your local/bin directory.

Prerequisites:

  • C Compiler: You need a C compiler like GCC.
  • Libjson: Download and install the libjson library. You can find it at https://github.com/json-c/json-c.
  • Libcurl: Download and install the libcurl library. You can find it at https://curl.se/.
  • glow

Steps: 0. get a api key form https://aistudio.google.com/app/apikey replace line no 7 with the api key

  1. Compile with libjson:

    gcc gemini.c -o gemini -I/path/to/libjson/include -L/path/to/libjson/lib -ljson -lcurl
    • Replace /path/to/libjson/include with the actual path to the libjson include directory.
    • Replace /path/to/libjson/lib with the actual path to the libjson lib directory.
  2. Copy to local/bin:

    cp gemini /local/bin
  3. For Better Text Display

    1. Fish Shell

    Create or edit the function:

    nano ~/.config/fish/functions/gemini.fish   

    Add the following code:

    function gemini
        command gemini $argv | glow
    end

    Save and exit, then reload the functions:

    functions --no-reload

    2. Bash

    Open your Bash configuration file (.bashrc or .bash_profile):

    nano ~/.bashrc

    or

    nano ~/.bash_profile

    Add the following function:

    gemini() {
        command gemini "$@" | glow
    }

    Save and exit, then apply the changes:

    source ~/.bashrc   # or source ~/.bash_profile

    3. Zsh

    Open your Zsh configuration file (.zshrc):

    nano ~/.zshrc

    Add the following function:

    gemini() {
        command gemini "$@" | glow
    }

    Save and exit, then apply the changes:

    source ~/.zshrc

Important:

  • You may need to adjust the paths to libjson and libcurl depending on where you installed them.
  • If you encounter errors during compilation, ensure you have correctly configured the paths and installed the necessary libraries.

Now you should have a gemini executable in your local/bin directory, ready to use.

Future Goals

ai auto completion for terminal

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors