Package Exports
- jarvis-sh
- jarvis-sh/dist/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (jarvis-sh) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
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.1:8b
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 and Model
You can set up both the AI service and the model using the interactive setup command:
jarvis --setup
This command will guide you through selecting the AI service and model. Currently, we support the following services:
OpenAI
Anthropic
Ollama
For OpenAI and Anthropic, you will need to provide an API key, which you can obtain from the respective provider. For Ollama, the models available are those installed locally, and you can list them using ollama list
.
API Key (For OpenAI and Anthropic)
If you choose OpenAI or Anthropic as your AI service, you will be prompted to enter your API key during the setup process. Be sure to have it ready beforehand.
This is all handled automatically when using the --setup
command, so no need for additional configuration commands.
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.