11# Penify CLI Tool
22
3- A CLI tool to generate Documentation, Commit-summary , and more.
3+ A CLI tool to generate smart commit messages, code documentation , and more.
44
55## Installation
66
@@ -12,90 +12,108 @@ pip install penifycli
1212
1313## Usage
1414
15- Penify CLI provides several subcommands for different functionalities:
15+ Penify CLI provides several subcommands for different functionalities, organized into basic commands (no login required) and advanced commands (login required).
1616
17- ### Login
17+ ## Basic Commands (No login required)
1818
19- To log in and obtain an API token:
19+ ### Commit
20+
21+ Generate smart commit messages using local LLM:
2022
2123``` bash
22- penifycli login
24+ penifycli commit [-m " Optional message " ] [-e] [-d]
2325```
2426
25- This command will open a browser window for authentication. After successful login, the API key will be saved locally for future use.
27+ Options:
28+ - ` -m, --message ` : Optional custom commit message
29+ - ` -e, --terminal ` : Open editor to modify commit message before committing
30+ - ` -d, --description ` : Generate commit message with both title and description (without this flag, only title is generated)
2631
27- ### Install Git Hook
32+ ### Config
2833
29- To install the Git post-commit hook :
34+ Configure local LLM and JIRA settings :
3035
3136``` bash
32- penifycli install-hook -l /path/to/git/repo
33- ```
37+ # Configure LLM settings
38+ penifycli config llm --model MODEL_NAME [--api-base API_URL] [--api-key API_KEY]
3439
35- - ` -l, --location ` : The path to the Git repository where you want to install the hook.
40+ # Configure LLM settings through web interface
41+ penifycli config llm-web
3642
37- ### Uninstall Git Hook
43+ # Configure JIRA settings
44+ penifycli config jira --url JIRA_URL --username USERNAME --api-token TOKEN [--verify]
3845
39- To uninstall the Git post-commit hook:
40-
41- ``` bash
42- penifycli uninstall-hook -l /path/to/git/repo
46+ # Configure JIRA settings through web interface
47+ penifycli config jira-web
4348```
4449
45- - ` -l, --location ` : The path to the Git repository from which you want to uninstall the hook.
50+ ## Advanced Commands (Login required)
4651
47- ### Generate Documentation
52+ ### Login
4853
49- To generate documentation for files or folders :
54+ To log in and obtain an API token :
5055
5156``` bash
52- penifycli docgen [options]
57+ penifycli login
5358```
5459
55- Options:
56- - ` -fl, --file_path ` : Path to a specific file for which to generate documentation.
57- - ` -cf, --complete_folder_path ` : Path to a folder for which to generate documentation for all files.
58- - ` -gf, --git_folder_path ` : Path to a Git repository to generate documentation for modified files. Defaults to the current directory.
60+ This command will open a browser window for authentication. After successful login, the API key will be saved locally for future use.
5961
60- ### Commit Code
62+ ### Documentation Generation
6163
62- To commit code with an automatically generated commit message :
64+ Generate documentation for Git diff, files or folders :
6365
6466``` bash
65- penifycli commit -gf /path/to/git/repo [-m " Optional message" ] [-e True/False]
67+ # Generate documentation for latest Git commit diff
68+ penifycli docgen
69+
70+ # Generate documentation for specific file or folder
71+ penifycli docgen -l /path/to/file/or/folder
6672```
6773
68- - ` -gf, --git_folder_path ` : Path to the Git repository. Defaults to the current directory.
69- - ` -m, --message ` : Optional commit message. If not provided, a default message will be used.
70- - ` -e, --terminal ` : Set to "True" to open the terminal for editing the commit message. Defaults to "False".
74+ Options:
75+ - ` -l, --location ` : Path to specific file or folder for documentation generation (defaults to current directory)
7176
72- ### JIRA Integration
77+ ### Git Hook Management
7378
74- To integrate with JIRA and automate issue tracking :
79+ Install or uninstall Git post-commit hooks :
7580
7681``` bash
77- penifycli jira [options]
82+ # Install Git hook
83+ penifycli docgen install-hook [-l /path/to/repo]
84+
85+ # Uninstall Git hook
86+ penifycli docgen uninstall-hook [-l /path/to/repo]
7887```
7988
8089Options:
81- - ` -u, --url ` : JIRA instance URL.
82- - ` -p, --project ` : JIRA project key.
83- - ` -i, --issue ` : JIRA issue key.
84- - ` -a, --assignee ` : Assignee for the JIRA issue.
90+ - ` -l, --location ` : Path to the Git repository (defaults to current directory)
8591
8692## Authentication
8793
88- Penify CLI uses an API token for authentication. The token is obtained and used in the following priority:
94+ Penify CLI uses an API token for authentication with advanced features.
95+
96+ If no token is available and you try to access an advanced feature, you'll be prompted to log in.
97+
98+ ## Local LLM Configuration
8999
90- 1 . Command-line argument: ` -t ` or ` --token `
91- 2 . Environment variable: ` PENIFY_API_TOKEN `
92- 3 . Stored credentials: ` ~/.penify ` file (created after successful login)
100+ For commit message generation, Penify can use a local LLM. Configure it using:
93101
94- If no token is available, you'll be prompted to log in or provide a token.
102+ ``` bash
103+ penifycli config llm --model MODEL_NAME --api-base API_URL --api-key API_KEY
104+ ```
105+
106+ Common configurations:
107+ - OpenAI: ` --model gpt-3.5-turbo --api-base https://api.openai.com/v1 --api-key YOUR_KEY `
108+ - Anthropic: ` --model claude-2 --api-base https://api.anthropic.com --api-key YOUR_KEY `
95109
96- ## Environment Variables
110+ ## JIRA Integration
97111
98- - ` PENIFY_API_TOKEN ` : You can set this environment variable with your API token to avoid passing it as an argument each time.
112+ Configure JIRA integration to enhance commit messages with issue details:
113+
114+ ``` bash
115+ penifycli config jira --url https://your-domain.atlassian.net --username your-email@example.com --api-token YOUR_API_TOKEN
116+ ```
99117
100118## Development
101119
0 commit comments