Skip to content

vikramjb/gaunt-sloth-assistant

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Gaunt Sloth Assistant

Tests and Lint Integration Tests (Anthropic)

Gaunt GSloth Assistant is a lightweight command line AI assistant built with TypeScript (JavaScript) and distributed via NPM with minimum dependencies.

GSloth Banner

Based on LangChain.js

Why?

There are many Open Source command line AI assistants available, such as Aider and Goose; there are great non-open source options such as Claude Code.

Gaunt Sloth does not intend to be your "Daily Driver" and is not aiming to replace your Cursor. What it promises is that it is small, extendable, cross-platform and can itself be a dependency in your project.

The GSloth was initially built as a code review tool, fetching PR contents and Jira contents before feeding them to the LLM, but we ourselves found many more use cases which we initially did not anticipate; for example, we may have it as a dependency in an MCP project, allowing us to quickly spin it up to simulate or test some use cases.

The promise of Gaunt Sloth:

  • Minimum dependencies. Ideally, we aim to only have CommanderJS and some packages from LangChainJS and LangGraphJS.
  • Extensibility. Feel free to write some JS and create your Tool, Provider or connect to the MCP server of your choice.
  • No vendor lock-in. Just BYO API keys.
  • Easy installation via NPM.
  • All prompts are editable via markdown files.
  • No UI. Command Line only, with intent to be used as a dependency, potentially in your build pipeline. Of course, you can use Gaunt Sloth as a dependency and hook your own UI.

What GSloth does:

  • Reviews code;
    • Suggests bug fixes;
    • Explains provided code
  • Reviews Diffs provided with pipe (|);
    • You can ask GSloth to review your own code before committing (git --no-pager diff | gsloth review).
  • Reviews Pull Requests (PRs) (gsloth pr 42);
    • Fetches descriptions (requirements) from Github issue or Jira (gsloth pr 42 12);;
  • Answers questions about provided code;
  • Writes code;
  • Connects to MCP server;
  • Saves all responses in .md file in the project directory;
  • Anything else you need, when combined with other command line tools.

To make GSloth work, you need an API key from some AI provider, such as:

  • Google Vertex AI;
  • Anthropic;
  • Groq;
  • DeepSeek;
  • OpenAI (and other providers using OpenAI format, such as Inception).

* Any other provider supported by LangChain.JS should also work with JS config.

Commands Overview

gth and gsloth commands are used interchangeably, both gsloth pr 42 and gth pr 42 do the same thing.

For detailed information about all commands, see docs/COMMANDS.md.

Available Commands:

  • init - Initialize Gaunt Sloth in your project with a specific AI provider
  • pr - ⚠️ This feature requires GitHub CLI to be installed. Review pull requests with optional requirement integration (GitHub issues or Jira).
  • review - Review any diff or content from various sources
  • ask - Ask questions about code or programming topics
  • chat - Start an interactive chat session
  • code - Write code interactively with full project context

Quick Examples:

Initialize project:

gsloth init anthropic

Review PR with requirements:

gsloth pr 42 23  # Review PR #42 with GitHub issue #23

Review local changes:

git --no-pager diff | gsloth review

Review changes between a specific tag and the HEAD:

git --no-pager diff v0.8.3..HEAD | gth review

Ask questions:

gsloth ask "What does this function do?" -f utils.js

Write release notes:

git --no-pager diff v0.8.3..HEAD | gth ask "inspect existing release notes in assets/release-notes/v0_8_2.md; inspect provided diff and write release notes to v0_8_4.md"

To write this to filesystem, you'd need to add filesystem access to the ask command in .gsloth.config.json.

{"llm": {"type": "vertexai", "model": "gemini-2.5-pro"}, "commands": {"ask": {"filesystem": "all"}}}

*You can improve this significantly by modifying project guidelines in .gsloth.guidelines.md or maybe with keeping instructions in file and feeding it in with -f.

Interactive sessions:

gsloth chat  # Start chat session
gsloth code  # Start coding session

Installation

Tested with Node 22 LTS.

NPM

npm install gaunt-sloth-assistant -g

Configuration

Gaunt Sloth currently only functions from the directory which has a configuration file (.gsloth.config.js, .gsloth.config.json, or .gsloth.config.mjs) and .gsloth.guidelines.md. Global configuration to invoke gsloth anywhere is in ROADMAP.

Configuration can be created with gsloth init [vendor] command. Currently, vertexai, anthropic, groq, deepseek and openai can be configured with gsloth init [vendor]. For OpenAI-compatible providers like Inception, use gsloth init openai and modify the configuration.

More detailed information on configuration can be found in CONFIGURATION.md

Google Vertex AI

cd ./your-project
gsloth init vertexai
gcloud auth login
gcloud auth application-default login

Anthropic

cd ./your-project
gsloth init anthropic

Make sure you either define ANTHROPIC_API_KEY environment variable or edit your configuration file and set up your key.

Groq

cd ./your-project
gsloth init groq

Make sure you either define GROQ_API_KEY environment variable or edit your configuration file and set up your key.

DeepSeek

cd ./your-project
gsloth init deepseek

Make sure you either define DEEPSEEK_API_KEY environment variable or edit your configuration file and set up your key. It is recommended to obtain API key from DeepSeek official website rather than from a reseller.

OpenAI

cd ./your-project
gsloth init openai

Make sure you either define OPENAI_API_KEY environment variable or edit your configuration file and set up your key.

OpenAI-compatible providers (Inception, etc.)

For providers using OpenAI-compatible APIs:

cd ./your-project
gsloth init openai

Then edit your configuration to add custom base URL and API key. See CONFIGURATION.md for examples.

Other AI providers

Any other AI provider supported by Langchain.js can be configured with js Config.

MCP (Model Context Protocol) Servers

Gaunt Sloth supports connecting to MCP servers, including those requiring OAuth authentication.

This has been tested with the Atlassian Jira MCP server.
See the MCP configuration section for detailed setup instructions.

Contributing

Contributors are needed! Feel free to create a PR. If you are not sure where to start, look for issues with a "good first issue" label.

Building from repo

See DEVELOPMENT.md

License

License is MIT. See LICENSE

About

CLI AI assistant doing your code reviews

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 97.2%
  • JavaScript 2.8%