Gaunt Sloth Assistant is a lightweight command line AI assistant built with TypeScript (JavaScript) and distributed via NPM with minimum dependencies.
Based on LangChain.js
Documentation | Official Site | NPM | GitHub
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:
git --no-pager diff | gsloth review
).gsloth pr 42
);
gsloth pr 42 12
);;*
Any other provider supported by LangChain.JS should also work with JS config.
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.
init
- Initialize Gaunt Sloth in your project with a specific AI providerpr
- ⚠️ 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 sourcesask
- Ask questions about code or programming topicschat
- Start an interactive chat sessioncode
- Write code interactively with full project contextInitialize 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
**Review diff between head and previous release and head using a specific requirements provider (GitHub issue 38), not the one which is configured by default:
git --no-pager diff v0.8.10 HEAD | npx gth review --requirements-provider github -r 38
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
Tested with Node 22 LTS.
npm install gaunt-sloth-assistant -g
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
. Configuration files can be located in the project root or in the.gsloth/.gsloth-settings/
directory.You can also specify a path to a configuration file directly using the
-c
or--config
global flag, for examplegth -c /path/to/your/config.json ask "who are you?"
Note, however, is that project guidelines are going to be used from current directory if they exist and simple install dir prompt is going to be used if nothing found.
Configuration can be created with gsloth init [vendor]
command.
Currently, openrouter, anthropic, groq, deepseek, openai, google-genai, vertexai and xai 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
cd ./your-project
gsloth init google-genai
Make sure you either define GOOGLE_API_KEY
environment variable or edit your configuration file and set up your key.
It is recommended to obtain API key from Google AI Studio official website rather than from a reseller.
cd ./your-project
gsloth init vertexai
gcloud auth login
gcloud auth application-default login
cd ./your-project
gsloth init openrouter
Make sure you either define OPEN_ROUTER_API_KEY
environment variable or edit your configuration file and set up your key.
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.
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.
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.
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.
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.
cd ./your-project
gsloth init xai
Make sure you either define XAI_API_KEY
environment variable or edit your configuration file and set up your key.
Any other AI provider supported by Langchain.js can be configured with js Config. For example, Ollama can be set up with JS config (some of the models, see https://github.com/Galvanized-Pukeko/gaunt-sloth-assistant/discussions/107)
Example GitHub workflows integration can be found in .github/workflows/review.yml; this example workflow performs AI review on any pushes to Pull Request, resulting in a comment left by, GitHub actions bot.
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.
Uninstall global NPM package:
npm uninstall -g gaunt-sloth-assistant
Remove global config (if any)
rm -r ~/.gsloth
Remove configs from project (if necessary)
rm -r ./.gsloth*
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.
See DEVELOPMENT.md