npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

jarvis-sh

v1.1.4

Published

An AI-powered command-line assistant for your terminal, compatible with both local AI models via Ollama and OpenAI. It not only supports executing commands but also intelligently suggests and finds commands from its own knowledge base or a predefined list

Downloads

534

Readme

Jarvis-sh

An AI-powered command-line assistant for your terminal, compatible with both local AI models via Ollama and OpenAI. It not only supports executing commands but also intelligently suggests and finds commands from its own knowledge base or a predefined list, taking your productivity as a developer or DevOps engineer to the next level.

Prerequisites

Before installing Jarvis-sh, ensure you have the following:

  • Node.js: Version 19 or higher is recommended. This is required for running Jarvis-sh.
  • Ollama (Optional): If you want to use local open-source AI models, you'll need to install Ollama, a runtime for large language models. You can install it from here.
  • AI Model (Optional): A local AI model compatible with Ollama. We recommend using llama3.2. Make sure the model is downloaded and available for use.

Installing Ollama

Follow the instructions on the Ollama website to install Ollama on your system.

Installing the AI Model

After installing Ollama, install the llama3.2 model by running:

ollama pull llama3.2

Installation jarvis-sh

Install Jarvis-sh globally using npm:

npm install -g jarvis-sh

This will make the jarvis command available globally on your system.

Configuration

AI Service

First, you need to configure the AI service you will use:

jarvis --service <service>

Currently, we support ollama and openai. More services, such as Gemini and Claude, will be added soon.

AI Model

Next, configure the AI model you want to use:

jarvis --model <model>

For OpenAI, the available models are those supported by the OpenAI API. We recommend using gpt-4o-mini for its low cost. For Ollama, the models are those you have installed locally. You can use the command ollama list to see all installed models.

API Key (For OpenAI)

If you're using a closed service like OpenAI, you need to set your API key. You can obtain this key from the OpenAI website.

jarvis --service-api-key <api-key>

Usage

Once installed, you can use Jarvis-sh by typing jarvis followed by your question or command in the terminal.

Ask a Question

To ask a question:

jarvis Hello

Jarvis-sh will provide an answer directly in the terminal.

If you want to use the ? symbol at the end of your questions to Jarvis, you need to apply the following configuration in your terminal.

Execute Commands

If your input relates to terminal commands, Jarvis-sh will suggest commands that you can execute.

jarvis show me the commands to generate an apk?

You will be presented with a list of commands to choose from. Select the desired command to execute it.

Edit Custom Commands

You can add or edit custom commands that Jarvis-sh will consider when generating suggestions.

jarvis --commands

This will open a text editor (default is nano unless specified in the EDITOR environment variable) where you can add your custom commands.

Tools

Currently, we offer a tool called /commit, which generates the title and description of your staged changes in your Git repository using the Conventional Commits format. To use it, simply run the following command:

jarvis /commit

Example response:

Title: feat: update README with new configuration options and services
Description: Enhanced the README.md by adding new sections for AI service configuration, model configuration, and API key setup for OpenAI. Updated prerequisites to clarify the installation requirements for Node.js and Ollama. Improved descriptions for features and included instructions for service options, enhancing overall clarity and usability.
Do you want to commit with this message? (y/n)

More tools will be added soon.

Troubleshooting

Ollama is Not Initialized

If you encounter the error:

Ollama is not initialized.

Ensure that Ollama is running. Start Ollama by running:

ollama serve

Model Not Found

If the AI model is not installed, you will see an error message indicating that the model does not exist.

Install the required model using:

ollama pull <model-name>

For example:

ollama pull llama3.2

Contributing

Contributions are welcome! Please open an issue or submit a pull request on GitHub.