commandeft


Namecommandeft JSON
Version 0.6.1 PyPI version JSON
download
home_page
SummaryCommanDeft is a CLI tool that converts natural language prompts into executable commands or scripts using OpenAI's chat models.
upload_time2023-11-15 01:29:10
maintainer
docs_urlNone
author
requires_python<=3.11.6,>=3.8.1
licenseMIT
keywords commandeft cli tool shell commands prompt-based command generation natural language prompts shell commands shell scripts shell command generation intelligent code generation language-to-code conversion developer-friendly simplified scripting code efficiency streamline workflow intelligent suggestions efficient command composition gpt-3.5-turbo gpt-4 shell command suggestion interactive mode guided prompt command execution
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # CommanDeft

CommanDeft is a simple Python CLI tool designed to generate useful shell commands based on user prompts. It utilizes OpenAI's chat models to provide intelligent suggestions and help users compose shell commands quickly and efficiently.

## Requirements

- In order to use CommanDeft you will need an OpenAI API Key which will be asked of you during the initial configuration.
  You can easily get one from [HERE](https://platform.openai.com/account/api-keys)

-If you are using Linux you might have to install `xclip` using your package manager.  
For example, in Debian:
`sudo apt-get install xclip`

## Installation

To install CommanDeft, you can use the following command:

```sh
pip install commandeft
```


### Example Usage

1.  Generate a shell command based on a prompt:

    ```sh
    commandeft --prompt "list all files in the current directory"
    OR
    commandeft -p "list all files in the current directory"
    ```
    

    This will provide a shell command suggestion based on the given prompt:

    ```sh
    > ls -a
    ```


2.  Run CommanDeft in interactive mode:

    `commandeft --interactive`

    This will start CommanDeft in interactive mode, allowing you to input prompts and receive command suggestions directly within the CLI.

3.  Re-configure:

    `commandeft --configure`

    This will run the configuration flow for CommanDeft, allowing you to set up your preferences and customize the behavior of the tool.

## Configuration

During the initial configuration or when running:

```sh
commandeft --configure (or -c)
```

- You can choose the generated answer's `temperature`. Because this tool is geared towards code generation, lower temperatures perform better.
  More information about temeratures [HERE](https://community.openai.com/t/cheat-sheet-mastering-temperature-and-top-p-in-chatgpt-api-a-few-tips-and-tricks-on-controlling-the-creativity-deterministic-output-of-prompt-responses/172683)
- You can choose the `max_token` value.  
  ⚠️ Keep in Mind that the guided prompt(assistant role prompt + user role prompt without user's prompt) consumes ~70 tokens. The value you specify won't include these tokens.
- You will also be asked about the action that will be performed every time when you accept a generated command when running in interactive mode.  
  The available actions are:

1. Running the generated command
2. Copying it to the clipboard

Don't worry though, after this you will be asked to apply your selected action on every generation.

## Options

Once installed, you can run CommanDeft using the `commandeft` command. Here are the available options:

- `-h, --help`: Show the help message and exit.
- `-v, --version`: Show the version information and exit.
- `-c, --configure`: Configure CommanDeft (Like the one on the first run).
- `-i, --interactive`: Run CommanDeft in interactive mode.
- `-p, --prompt "TEXT"`: Specify your prompt inline.

## Contributing

Contributions to CommanDeft are welcome! If you encounter any issues, have suggestions for improvements, or would like to contribute code, please check out the project repository on GitHub: [Repo](https://https://github.com/Ferrum-Citadel/commandeft)

## License

This project is licensed under the MIT License. See the [LICENSE](https://github.com/Ferrum-Citadel/commandeft/blob/main/LICENSE) file for more details.

## Feedback

If you find CommanDeft useful or have any feedback, I would love to hear from you! Please feel free to reach out and let me know how I can make this tool even better.

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "commandeft",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "<=3.11.6,>=3.8.1",
    "maintainer_email": "",
    "keywords": "commandeft cli tool shell commands prompt-based command generation natural language prompts shell commands shell scripts shell command generation intelligent code generation language-to-code conversion developer-friendly simplified scripting code efficiency streamline workflow intelligent suggestions efficient command composition gpt-3.5-turbo gpt-4 shell command suggestion interactive mode guided prompt command execution",
    "author": "",
    "author_email": "Petros Sidirokastritis <sidirope@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/d6/45/40e15571b942e4fd82b0946a9a2b792f12937ed5bfd99cc10bd7842a5bf1/commandeft-0.6.1.tar.gz",
    "platform": null,
    "description": "# CommanDeft\n\nCommanDeft is a simple Python CLI tool designed to generate useful shell commands based on user prompts. It utilizes OpenAI's chat models to provide intelligent suggestions and help users compose shell commands quickly and efficiently.\n\n## Requirements\n\n- In order to use CommanDeft you will need an OpenAI API Key which will be asked of you during the initial configuration.\n  You can easily get one from [HERE](https://platform.openai.com/account/api-keys)\n\n-If you are using Linux you might have to install `xclip` using your package manager.  \nFor example, in Debian:\n`sudo apt-get install xclip`\n\n## Installation\n\nTo install CommanDeft, you can use the following command:\n\n```sh\npip install commandeft\n```\n\n\n### Example Usage\n\n1.  Generate a shell command based on a prompt:\n\n    ```sh\n    commandeft --prompt \"list all files in the current directory\"\n    OR\n    commandeft -p \"list all files in the current directory\"\n    ```\n    \n\n    This will provide a shell command suggestion based on the given prompt:\n\n    ```sh\n    > ls -a\n    ```\n\n\n2.  Run CommanDeft in interactive mode:\n\n    `commandeft --interactive`\n\n    This will start CommanDeft in interactive mode, allowing you to input prompts and receive command suggestions directly within the CLI.\n\n3.  Re-configure:\n\n    `commandeft --configure`\n\n    This will run the configuration flow for CommanDeft, allowing you to set up your preferences and customize the behavior of the tool.\n\n## Configuration\n\nDuring the initial configuration or when running:\n\n```sh\ncommandeft --configure (or -c)\n```\n\n- You can choose the generated answer's `temperature`. Because this tool is geared towards code generation, lower temperatures perform better.\n  More information about temeratures [HERE](https://community.openai.com/t/cheat-sheet-mastering-temperature-and-top-p-in-chatgpt-api-a-few-tips-and-tricks-on-controlling-the-creativity-deterministic-output-of-prompt-responses/172683)\n- You can choose the `max_token` value.  \n  \u26a0\ufe0f Keep in Mind that the guided prompt(assistant role prompt + user role prompt without user's prompt) consumes ~70 tokens. The value you specify won't include these tokens.\n- You will also be asked about the action that will be performed every time when you accept a generated command when running in interactive mode.  \n  The available actions are:\n\n1. Running the generated command\n2. Copying it to the clipboard\n\nDon't worry though, after this you will be asked to apply your selected action on every generation.\n\n## Options\n\nOnce installed, you can run CommanDeft using the `commandeft` command. Here are the available options:\n\n- `-h, --help`: Show the help message and exit.\n- `-v, --version`: Show the version information and exit.\n- `-c, --configure`: Configure CommanDeft (Like the one on the first run).\n- `-i, --interactive`: Run CommanDeft in interactive mode.\n- `-p, --prompt \"TEXT\"`: Specify your prompt inline.\n\n## Contributing\n\nContributions to CommanDeft are welcome! If you encounter any issues, have suggestions for improvements, or would like to contribute code, please check out the project repository on GitHub: [Repo](https://https://github.com/Ferrum-Citadel/commandeft)\n\n## License\n\nThis project is licensed under the MIT License. See the [LICENSE](https://github.com/Ferrum-Citadel/commandeft/blob/main/LICENSE) file for more details.\n\n## Feedback\n\nIf you find CommanDeft useful or have any feedback, I would love to hear from you! Please feel free to reach out and let me know how I can make this tool even better.\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "CommanDeft is a CLI tool that converts natural language prompts into executable commands or scripts using OpenAI's chat models.",
    "version": "0.6.1",
    "project_urls": {
        "Homepage": "https://github.com/Ferrum-Citadel/commandeft"
    },
    "split_keywords": [
        "commandeft",
        "cli",
        "tool",
        "shell",
        "commands",
        "prompt-based",
        "command",
        "generation",
        "natural",
        "language",
        "prompts",
        "shell",
        "commands",
        "shell",
        "scripts",
        "shell",
        "command",
        "generation",
        "intelligent",
        "code",
        "generation",
        "language-to-code",
        "conversion",
        "developer-friendly",
        "simplified",
        "scripting",
        "code",
        "efficiency",
        "streamline",
        "workflow",
        "intelligent",
        "suggestions",
        "efficient",
        "command",
        "composition",
        "gpt-3.5-turbo",
        "gpt-4",
        "shell",
        "command",
        "suggestion",
        "interactive",
        "mode",
        "guided",
        "prompt",
        "command",
        "execution"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "27a8a0d1dc27a01bac0bb1f03d236c5a7abde7a6c212934d4aca79e2557a995a",
                "md5": "84b13e97a0236334ca1df398db19d389",
                "sha256": "23f80e5ce9212c644d7da3d7691e1fa37fb9a8956e1ee1950df3124e84e903cb"
            },
            "downloads": -1,
            "filename": "commandeft-0.6.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "84b13e97a0236334ca1df398db19d389",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<=3.11.6,>=3.8.1",
            "size": 18353,
            "upload_time": "2023-11-15T01:29:09",
            "upload_time_iso_8601": "2023-11-15T01:29:09.008349Z",
            "url": "https://files.pythonhosted.org/packages/27/a8/a0d1dc27a01bac0bb1f03d236c5a7abde7a6c212934d4aca79e2557a995a/commandeft-0.6.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "d64540e15571b942e4fd82b0946a9a2b792f12937ed5bfd99cc10bd7842a5bf1",
                "md5": "f15951e5e76f7a601ade2b1f941538a2",
                "sha256": "b3cc69445fdf4dc4847991b7faf3ed78ecd8493ab03a0a4f1af52e4e6f26ce37"
            },
            "downloads": -1,
            "filename": "commandeft-0.6.1.tar.gz",
            "has_sig": false,
            "md5_digest": "f15951e5e76f7a601ade2b1f941538a2",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<=3.11.6,>=3.8.1",
            "size": 20660,
            "upload_time": "2023-11-15T01:29:10",
            "upload_time_iso_8601": "2023-11-15T01:29:10.881668Z",
            "url": "https://files.pythonhosted.org/packages/d6/45/40e15571b942e4fd82b0946a9a2b792f12937ed5bfd99cc10bd7842a5bf1/commandeft-0.6.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-11-15 01:29:10",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "Ferrum-Citadel",
    "github_project": "commandeft",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "commandeft"
}
        
Elapsed time: 0.14094s