Skip to content

AbdullahAdeebx/JARVIS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

JARVIS - Your Terminal AI Companion

Created by Abdullah Adeeb

JARVIS is a command-line interface (CLI) application that lets you chat with Google's Gemini AI directly from your terminal. It uses Google's Gemini API via an OpenAI-compatible interface and includes web search capabilities powered by Perplexity's Sonar model.

Here's a demo video:

Demo Video

Features

  • Interactive Chat Mode: Have a back-and-forth conversation with the AI
  • Single Query Mode: Get quick answers without entering a chat session
  • Web Search: Get real-time information with citations using Perplexity's Sonar model
  • Secure API Key Storage: Your API keys are stored securely in your home directory

Installation

   git clone https://github.com/AbdullahAdeebx/JARVIS
   cd JARVIS
   npm install
   npm link
   jarvis

Usage

Interactive Chat Mode

Start an interactive chat session with the AI:

jarvis

This will start a conversation where you can type messages and receive responses from the AI. Type exit, quit, or bye to end the session.

Single Query Mode

Get a quick answer without starting a chat session:

jarvis "What is the capital of France?"

Web Search

Get real-time information with citations using Perplexity's Sonar model in two ways:

  1. Using the search shortcut:
jarvis -s "latest developments in AI"
# or
jarvis s "latest developments in AI"
  1. Using the search command in interactive mode:
You: search latest developments in AI

The responses will include citations to source materials when available.

First-Time Setup

On your first run, JARVIS will prompt you to enter your API keys. These keys will be saved in your home directory for future use.

Google API Key

  1. Go to the Google AI Studio
  2. Create an account or sign in
  3. Navigate to the API section and create a new API key

Perplexity API Key

  1. Visit the Perplexity Labs website
  2. Sign up for an account
  3. Go to your account settings
  4. Navigate to the API section
  5. Generate an API key (it should start with 'pplx-')

Troubleshooting

API Key Issues

If you need to update your API keys, you can delete the existing key files and run JARVIS again:

  • On Windows: Delete %USERPROFILE%\.jarvis_api_key and %USERPROFILE%\.jarvis_perplexity_key
  • On macOS/Linux: Delete ~/.jarvis_api_key and ~/.jarvis_perplexity_key

For Developers

Local Development Setup

  1. Clone the repository:

    git clone https://github.com/AbdullahAdeebx/JARVIS
    cd JARVIS
  2. Install dependencies:

    npm install
  3. Link the package locally to test it:

    npm link
  4. Now you can run the CLI tool:

    jarvis

Or just run:

git clone https://github.com/AbdullahAdeebx/JARVIS
cd JARVIS
npm install
npm link
jarvis

Requirements

  • Node.js 14.0 or higher

License

MIT

About

JARVIS - Your Terminal AI Companion

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published