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

diggit

v0.0.7

Published

Generate git commands from natural language

Downloads

19

Readme

Diggit

Generates git commands from natural language

Install and Setup

$ npm install -g diggit

Choose your ai provider by setting the config keys or environment variables. By default a local running version of ollama is expected.

OpenAI Setup

Set your api key as (global) OPENAI_API_KEY-env-variable. The default model is gpt-4o.

Ollama

Install oolama with llama3 (ollama run llama3).

Other models

For more models and configurations, see Configuraion.

Usage and examples

$ diggit - Unstage the file docker-compose.yml
git reset HEAD docker-compose.yml
$ diggit - Add and commit lines of the file docker-compose.yml interactively
git add -p docker-compose.yml && git commit
$ diggit - Change last commit message
git commit --amend

Use your project files for context, to generate more project specific prompts:

$ diggit -- Add and commit all models
git add app/models && git commit

Generate short commit messages:

$ diggit --message - Refined html template for newsletter mailer to improve external user experience
Improve HTML template for newsletter mailer

To list available options:

$ diggit -h

yolo

If you have nothing to lose, feel free to execute the command directly and accept the potential consequences:

$ diggit - Your potential dangerous prompt for the git command|sh
$ git commit -m "$(diggit -m - Generating a short commit message from a long text message)"

Configuration

Create a .diggit.json in your home directory and set your desired config values.

Configurable values are:

{
  "openai_key": "sk-…",             // or OPENAI_API_KEY
  "openai_model": "gpt-4-turbo",    // or OPENAI_API_MODEL
  "ollama_model": "mistral"         // or OLLAMA_MODEL
}

License

MIT