... is hard easy.
naming is a Command-Line Interface (CLI) tool designed to help you find meaningful names for various symbols within your code. This enhances code readability and contributes to the happiness of your colleagues, including your future self.
naming --config ./naming/gtp_instruction_config.json \
--lang Golang \
--symbol variable \
--type integer \
--unit secongs \
--description 'time spent to come up with a good variable name' \
--num 5
1. variableNamingTimeInHours
2. goodVariableNameTimeHours
3. namingTimeHours
4. variableNamingDurationHours
5. timeSpentOnNamingInHoursgo install github.com/fabenan-f/namingYou need to export your OpenAI api key.
export OPENAI_API_KEY=<YOUR_KEY>Or you can setup your (local) OSS GPT and point to it (saves costs)
export OSS_GTP_ADDR=http://localhost:8080
Also, please download these GPT instructions and define the path to the file in --config to improve your results
curl -O https://github.com/fabenan-f/naming/blob/main/naming/gtp_instruction_config.json
| flag | purpose | default | required |
|---|---|---|---|
| --config value, -c value | GPT pre instructions | yes | |
| --lang value, -l value | programming language | yes | |
| --mutable, -m | mutable | false | no |
| --symbol value, -s value | identifier for variable, function, class etc. names | yes | |
| --type value, -t value | data type | no | |
| --unit value, -u value | unit | no | |
| --description value, -d value | description | yes | |
| --num value, -n value | number of suggestions | 0 | yes |
| --help, -h | show help | no |