Skip to main content

A penify cli tool to generate Documentation, Commit-summary and Hooks to automate git workflows.

Project description

Penify CLI

Penify CLI is a command-line tool for managing Git hooks, generating documentation, and streamlining the development workflow. It provides functionality to install and uninstall Git post-commit hooks, generate documentation for files or folders, perform Git commits with automated message generation, and manage authentication.

Installation

You can install Penify CLI using pip:

pip install penify-cli

Usage

Penify CLI provides several subcommands for different functionalities:

Login

To log in and obtain an API token:

penify-cli login

This command will open a browser window for authentication. After successful login, the API key will be saved locally for future use.

Install Git Hook

To install the Git post-commit hook:

penify-cli install-hook -l /path/to/git/repo
  • -l, --location: The path to the Git repository where you want to install the hook.

Uninstall Git Hook

To uninstall the Git post-commit hook:

penify-cli uninstall-hook -l /path/to/git/repo
  • -l, --location: The path to the Git repository from which you want to uninstall the hook.

Generate Documentation

To generate documentation for files or folders:

penify-cli doc-gen [options]

Options:

  • -fl, --file_path: Path to a specific file for which to generate documentation.
  • -cf, --complete_folder_path: Path to a folder for which to generate documentation for all files.
  • -gf, --git_folder_path: Path to a Git repository to generate documentation for modified files. Defaults to the current directory.

Commit Code

To commit code with an automatically generated commit message:

penify-cli commit -gf /path/to/git/repo [-m "Optional message"] [-e True/False]
  • -gf, --git_folder_path: Path to the Git repository. Defaults to the current directory.
  • -m, --message: Optional commit message. If not provided, a default message will be used.
  • -e, --terminal: Set to "True" to open the terminal for editing the commit message. Defaults to "False".

Authentication

Penify CLI uses an API token for authentication. The token is obtained and used in the following priority:

  1. Command-line argument: -t or --token
  2. Environment variable: PENIFY_API_TOKEN
  3. Stored credentials: ~/.penify file (created after successful login)

If no token is available, you'll be prompted to log in or provide a token.

Environment Variables

  • PENIFY_API_TOKEN: You can set this environment variable with your API token to avoid passing it as an argument each time.

Development

To set up the development environment:

  1. Clone the repository:

    git clone https://github.com/SingularityX-ai/penify-cli.git
    
  2. Install the package in editable mode:

    pip install -e .
    

License

This project is licensed under the MIT License.

Author

Suman Saurabh (ss.sumansaurabh92@gmail.com)

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Issues

If you encounter any problems or have suggestions, please file an issue on the GitHub repository.

Support

For automated API Documentation, Architecture Documentation, Code Documentation, Pull Request Documentation, or if you need a demo, please join our Discord support channel.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

penify_cli-0.1.4.tar.gz (11.9 kB view details)

Uploaded Source

Built Distribution

penify_cli-0.1.4-py3-none-any.whl (15.3 kB view details)

Uploaded Python 3

File details

Details for the file penify_cli-0.1.4.tar.gz.

File metadata

  • Download URL: penify_cli-0.1.4.tar.gz
  • Upload date:
  • Size: 11.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.6

File hashes

Hashes for penify_cli-0.1.4.tar.gz
Algorithm Hash digest
SHA256 be147c309b409268e256d550c433acc2fcff2ddb1cfe9de737fe685b53e68cf6
MD5 4db579355e86782f73b82f38aac58efb
BLAKE2b-256 ce4a3d19f91e4e19882bb0b2229b8095762f5be0eaa02f7e9e6d070e1e446847

See more details on using hashes here.

File details

Details for the file penify_cli-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: penify_cli-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 15.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.6

File hashes

Hashes for penify_cli-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 f141116e2530087f8a589ea86cd70682dbf5d580c663c7e60314409a73e6d554
MD5 5e26841a6a8174f896e7fc303d690ded
BLAKE2b-256 030bfe73d6359c845a4c095a2d5843643b69e1c3f66d80e5cc9ceded2ce83c46

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page