Package: chatcmd
ChatCMDChatCMDis an open source AI-driven CLI-based command lookup using ChatGPT to lookup relevant CLI commands based on user input and other generating and lookup features.Boost Your Productivity,Say Goodbyeto Manual SearchesFeaturesCLI-based command lookup using ChatGPT.Generate SQL query using ChatGPT.Generate a random user-agent.Generate a random password.Get your public IP address.Get a color Hex code by describing the color.Lookup HTTP Code.Lookup any port numberAuto copy command to clipboard.Disable copy feature.Store Data in Sqlite Database.Add or update ChatGPT API key.Validate ChatGPT API key.Display ChatGPT API Key.Display last command.Display last {number} of commands.Delete last Command.Delete last {number} of commands.Display the total number of commands.Clear all history records.Display the database file size.Clear and validate user inputs.Clear and validate lookup results to ensure only valid CLI commands are returned.Error handlingDisplay library information.RequirementsPython >= 3.8.9
OpenAI account and valid API key
https://platform.openai.com/signupInstallationpip3 install chatcmdIf pip not installed:python3 -m pip install chatcmdInstallation output should display:Collecting chatcmd
Using cached chatcmd-1.1.13-py3-none-any.whl (6.8 kB)
Installing collected packages: chatcmd
Successfully installed chatcmd-1.1.13Upgradepip3 install --upgrade chatcmdIf pip not installed:python3 -m pip install --upgrade chatcmdUninstallpip3 uninstall chatcmdIf pip not installed:python3 -m pip uninstall chatcmdUsageUsage:

chatcmd [options]
  
Options:
  -l, --lookup-cmd                  looking up a CLI command.
  -q, --sql-query                   generate SQL query.
  -u, --random-useragent            generate a random user-agent
  -i, --get-ip                      get your public IP address.
  -p, --random-password             generate a random password.
  -c, --color-code                  get a color Hex code.
  -a, --lookup-http-code            lookup HTTP Code by code number.
  -z, --port-lookup                 lookup any port number.
  -k, --set-key                     set or update ChatGPT API key.
  -o, --get-key                     display ChatGPT API key.
  -g, --get-cmd                     display the last command.
  -G, --get-last=<value>            display the last [number] of commands.
  -d, --delete-cmd                  delete the last command.
  -D, --delete-last-cmd=<value>     delete the last [number] of commands.
  -t, --cmd-total                   display the total number of commands.
  -r, --clear-history               clear all history records.
  -s, --db-size                     display the database size.
  -n, --no-copy                     disable copy feature.
  -h, --help                        display this screen.
  -v, --version                     display ChatCMD version.
  -x, --library-info                display library information.Error CodesInclude an exception message for each error if occurs.CodeDescription1001General exception1002Failed to connect to database1003Failed to get API key from database1004Failed to output API key1005Failed to save API key to database1006Invalid ChatGPT API key1007Failed requesting API key1008Failed to add command1009API key is invalid or missing1010OpenAI API error occurred1011Lookup exception occurred1012Failed to add command1013Failed to get last command1014Failed to get list of command1015Failed deleting last command1016Failed to get last command1017Failed clearing history1018Failed to copy commandLinux copy command issueIn order to perform a Graphics-related job in a Unix environment,
the DISPLAY variable needs to be set initially.
An error can occur when connecting to Linux via SSH, particularly if there is no copy/paste mechanism like Xclip installed.
To resolve this, you can try installing Xclip using the following command: "sudo apt-get install xclip".
Additionally, you need to export the DISPLAY variable by running: "export DISPLAY=:0.0".To avoid the error message, you can use the "-no-copy" option when looking up a command, as it disables the copy feature.ScreenshotsHelp screen:Library Info:Command Lookup screen:Tested on:Ubuntu 22.04Windows Server 2022macOS Ventura 13.0SupportIssuesDeveloped and maintained by:Naif Alshayehttps://naif.ionaif@naif.ioLicenseThe MIT License (MIT). Please see License FileMIT Licensefor more information.