0.0.7 • Published 11 months ago

diggit v0.0.7

Weekly downloads
-
License
MIT
Repository
github
Last release
11 months ago

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

0.0.7

11 months ago

0.0.6

11 months ago

0.0.5

11 months ago

0.0.4

11 months ago

0.0.3

11 months ago

0.0.2

11 months ago

0.0.1

11 months ago