autocommit

Main module for autocommit

The toplevel module for autocommit mainly contains the command line interface.

Functions

argument_parser(parser)

The main argument parser for the autocommit command line interface

build_ragdb_argument_parser(parser)

Argument parser for the autocommit build-ragdb command

cleanup_argument_parser(parser)

Argument parser for the autocommit cleanup command

configure_logging(loglevel[, logfile])

Configures the logging for the program

generate_commit_message(repo, key_file[, ...])

The main function for autocommit,

git_post_commit_argument_parser(parser)

Argument parser for the autocommit git_post_commit command

git_prepare_commit_msg_argument_parser(parser)

Argument parser for the autocommit git_prepare_commit_msg command

main()

Chooses the action to take based on the command line arguments

run_argument_parser(parser)

Argument parser for the autocommit run command

setup_argument_parser(parser)

Argument parser for the autocommit setup command

autocommit.run_argument_parser(parser: ArgumentParser | None)[source]

Argument parser for the autocommit run command

autocommit.setup_argument_parser(parser: ArgumentParser | None)[source]

Argument parser for the autocommit setup command

autocommit.cleanup_argument_parser(parser: ArgumentParser | None)[source]

Argument parser for the autocommit cleanup command

autocommit.build_ragdb_argument_parser(parser: ArgumentParser | None)[source]

Argument parser for the autocommit build-ragdb command

autocommit.git_prepare_commit_msg_argument_parser(parser: ArgumentParser | None)[source]

Argument parser for the autocommit git_prepare_commit_msg command

autocommit.git_post_commit_argument_parser(parser: ArgumentParser | None)[source]

Argument parser for the autocommit git_post_commit command

autocommit.argument_parser(parser: ArgumentParser | None)[source]

The main argument parser for the autocommit command line interface

autocommit.configure_logging(loglevel, logfile=None)[source]

Configures the logging for the program

Enables logging (either to stderr or to a file) for the following packages:

  • autocommit

  • basic_rag

  • mistral_tools

with the specified log level

Parameters:
  • loglevel (int) – The log level

  • logfile (Path, optional) – The file to log to. Defaults to None.

autocommit.main()[source]

Chooses the action to take based on the command line arguments

autocommit.generate_commit_message(repo, key_file, use_rag=True, use_tools=False)[source]

The main function for autocommit,

called when runninng autocommit run from the command line.

This is a wrapper around autocommit.mistral_model.main() that loads the api key, and prints the commit message to stdout.

Modules

build_ragdb

commands

config

Configuration for autocommit

git_hooks

Git Hooks

mistral_model

setup

utils

Miscellaneous utilities for autocommit