terminal-copilot


Nameterminal-copilot JSON
Version 1.5.3 PyPI version JSON
download
home_pagehttps://github.com/Methexis-Inc/terminal-copilot
SummaryA smart terminal assistant that helps you find the right command
upload_time2023-11-10 18:53:30
maintainer
docs_urlNone
authorMethexis
requires_python
licenseApache License 2.0
keywords terminal copilot openai gpt3 gpt4 gpt3.5
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            [![PyPI version](https://badge.fury.io/py/terminal-copilot.svg)](https://badge.fury.io/py/terminal-copilot)

# Terminal-copilot
Are you tired of Googling basic terminal commands every time you forget the syntax?
Look no further! terminal-copilot is here to help.

With terminal-copilot, you can quickly and easily access commonly used terminal commands right from the command line. Simply type copilot followed by your desired command in natural language and let terminal-copilot do the rest.

For example, if you want to find a file ending in .txt, simply type:
```copilot find a file ending in .txt```
terminal-copilot will then display the correct syntax for the command you need:
```find . -name "*.txt"```
With options to execute, copy, or explain the proposed terminal command.

You can also use the copilot to ask a general question to gpt4 from your command line using the -q option
```copilot -q "What is the best drink for late night coding?"```

### Installation
To use terminal-copilot, you must first install it on your system. The easiest way to do this is using pip:
```pip install terminal-copilot```
Once terminal-copilot is installed, you can access it from the command line by typing copilot followed by your question.
### Example Usage
terminal-copilot is designed to be simple and intuitive to use. Simply type copilot followed by your question and terminal-copilot will display the correct syntax for the command you need.

Here are some examples of how you can use terminal-copilot:

1. `copilot list the compute instances in gcloud`
2. `copilot find all mp3 files in my home directory`
3. `copilot install the openai package for python`
4. `copilot clean up my docker images`

or you can ask a general question to gpt4 from your command line using the -q option
`copilot -q Why is 42 the meaning of life`
(note that question marks are not supported atm..)

### Arguments
Terminal-copilot can be called with optional command line arguments:

- `-a`, `--alias`: Enables the inclusion of aliases in the prompt sent to the OpenAI API. May potentially send sensitive information to OpenAI.
- `-v`, `--verbose`: Increases output verbosity of the tool.
- `-g`, `--git`: This flag enables the inclusion of Git context in the prompt sent to the OpenAI API. This can be useful for users working with Git repositories and may include the current branch name, repository status, recent commit messages, and file history.
- `-hist`, `--history`: Enables the inclusion of terminal history in the prompt sent to the OpenAI API. May potentially send sensitive information to OpenAI and increase the number of tokens used.
- `-j`, `--json`: Output data as JSON instead of using an interactive prompt.
- `-c`, `--count`: The number of commands to output when JSON output is specified.
- `-m`, `--model`: The model to use. Defaults to gpt-3.5-turbo.
- `-ns`, `--no-stream`: Disable streaming the command into the terminal (by default, streaming is enabled).

### Requirements
Python 3.7+
Mac Os, Windows, or Linux

### Sensitive Information
Please note that terminal-copilot has the ability to send sensitive information to OpenAI as part of the prompt used to generate terminal commands. This includes the `--alias`,`--history`, `--git` command line arguments, which may include sensitive information such as aliases and terminal history. If you are concerned about the potential for sensitive information to be sent to OpenAI, we recommend not using these flags. We recommend that users exercise caution when using these optional features and consider the potential risks before enabling them.

## Development
### Contributing
We welcome contributions to terminal-copilot! If you have an idea for a new feature or have found a bug, please open an issue. If you would like to contribute code, please open a pull request!

Thank you for considering contributing to terminal-copilot! Together, we can make it an even better tool for accessing terminal commands.

### Local Installation
1. Clone the repo
2. `python -m venv .venv && source .venv/bin/activate && pip install -r requirements.txt`
3. `python setup.py install`

### Packaging for PyPi
First make sure you have `pip install wheel` and `pip install twine` installed.
Then run the following commands:
0. Modify version in `setup.py`
1. `rm -rf dist`
2. `python setup.py sdist bdist_wheel`
3. `twine upload dist/*`

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/Methexis-Inc/terminal-copilot",
    "name": "terminal-copilot",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "terminal copilot openai gpt3 gpt4 gpt3.5",
    "author": "Methexis",
    "author_email": "joelkronander@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/5b/af/476aeb0658d0164ae440d480736b793155c31a650a31cf620e1c5159050f/terminal-copilot-1.5.3.tar.gz",
    "platform": null,
    "description": "[![PyPI version](https://badge.fury.io/py/terminal-copilot.svg)](https://badge.fury.io/py/terminal-copilot)\n\n# Terminal-copilot\nAre you tired of Googling basic terminal commands every time you forget the syntax?\nLook no further! terminal-copilot is here to help.\n\nWith terminal-copilot, you can quickly and easily access commonly used terminal commands right from the command line. Simply type copilot followed by your desired command in natural language and let terminal-copilot do the rest.\n\nFor example, if you want to find a file ending in .txt, simply type:\n```copilot find a file ending in .txt```\nterminal-copilot will then display the correct syntax for the command you need:\n```find . -name \"*.txt\"```\nWith options to execute, copy, or explain the proposed terminal command.\n\nYou can also use the copilot to ask a general question to gpt4 from your command line using the -q option\n```copilot -q \"What is the best drink for late night coding?\"```\n\n### Installation\nTo use terminal-copilot, you must first install it on your system. The easiest way to do this is using pip:\n```pip install terminal-copilot```\nOnce terminal-copilot is installed, you can access it from the command line by typing copilot followed by your question.\n### Example Usage\nterminal-copilot is designed to be simple and intuitive to use. Simply type copilot followed by your question and terminal-copilot will display the correct syntax for the command you need.\n\nHere are some examples of how you can use terminal-copilot:\n\n1. `copilot list the compute instances in gcloud`\n2. `copilot find all mp3 files in my home directory`\n3. `copilot install the openai package for python`\n4. `copilot clean up my docker images`\n\nor you can ask a general question to gpt4 from your command line using the -q option\n`copilot -q Why is 42 the meaning of life`\n(note that question marks are not supported atm..)\n\n### Arguments\nTerminal-copilot can be called with optional command line arguments:\n\n- `-a`, `--alias`: Enables the inclusion of aliases in the prompt sent to the OpenAI API. May potentially send sensitive information to OpenAI.\n- `-v`, `--verbose`: Increases output verbosity of the tool.\n- `-g`, `--git`: This flag enables the inclusion of Git context in the prompt sent to the OpenAI API. This can be useful for users working with Git repositories and may include the current branch name, repository status, recent commit messages, and file history.\n- `-hist`, `--history`: Enables the inclusion of terminal history in the prompt sent to the OpenAI API. May potentially send sensitive information to OpenAI and increase the number of tokens used.\n- `-j`, `--json`: Output data as JSON instead of using an interactive prompt.\n- `-c`, `--count`: The number of commands to output when JSON output is specified.\n- `-m`, `--model`: The model to use. Defaults to gpt-3.5-turbo.\n- `-ns`, `--no-stream`: Disable streaming the command into the terminal (by default, streaming is enabled).\n\n### Requirements\nPython 3.7+\nMac Os, Windows, or Linux\n\n### Sensitive Information\nPlease note that terminal-copilot has the ability to send sensitive information to OpenAI as part of the prompt used to generate terminal commands. This includes the `--alias`,`--history`, `--git` command line arguments, which may include sensitive information such as aliases and terminal history. If you are concerned about the potential for sensitive information to be sent to OpenAI, we recommend not using these flags. We recommend that users exercise caution when using these optional features and consider the potential risks before enabling them.\n\n## Development\n### Contributing\nWe welcome contributions to terminal-copilot! If you have an idea for a new feature or have found a bug, please open an issue. If you would like to contribute code, please open a pull request!\n\nThank you for considering contributing to terminal-copilot! Together, we can make it an even better tool for accessing terminal commands.\n\n### Local Installation\n1. Clone the repo\n2. `python -m venv .venv && source .venv/bin/activate && pip install -r requirements.txt`\n3. `python setup.py install`\n\n### Packaging for PyPi\nFirst make sure you have `pip install wheel` and `pip install twine` installed.\nThen run the following commands:\n0. Modify version in `setup.py`\n1. `rm -rf dist`\n2. `python setup.py sdist bdist_wheel`\n3. `twine upload dist/*`\n",
    "bugtrack_url": null,
    "license": "Apache License 2.0",
    "summary": "A smart terminal assistant that helps you find the right command",
    "version": "1.5.3",
    "project_urls": {
        "Homepage": "https://github.com/Methexis-Inc/terminal-copilot"
    },
    "split_keywords": [
        "terminal",
        "copilot",
        "openai",
        "gpt3",
        "gpt4",
        "gpt3.5"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "6d8e4ae3f1d2ddcbd6118f9dc2b76d2732f08857060a669764dd3847899ed901",
                "md5": "b7a7e3d97bac245c0b81985ccbfa2d57",
                "sha256": "655ec639922068f112e67b56c1568858643ca9783b036518d8df107219a61d69"
            },
            "downloads": -1,
            "filename": "terminal_copilot-1.5.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "b7a7e3d97bac245c0b81985ccbfa2d57",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 20864,
            "upload_time": "2023-11-10T18:53:28",
            "upload_time_iso_8601": "2023-11-10T18:53:28.241602Z",
            "url": "https://files.pythonhosted.org/packages/6d/8e/4ae3f1d2ddcbd6118f9dc2b76d2732f08857060a669764dd3847899ed901/terminal_copilot-1.5.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "5baf476aeb0658d0164ae440d480736b793155c31a650a31cf620e1c5159050f",
                "md5": "19984f88cb243372ff69b7d4aa8740b1",
                "sha256": "0f71090559dc30653c9c31dc20cbfdb251747756a422b1511b9b1e78337fa200"
            },
            "downloads": -1,
            "filename": "terminal-copilot-1.5.3.tar.gz",
            "has_sig": false,
            "md5_digest": "19984f88cb243372ff69b7d4aa8740b1",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 18760,
            "upload_time": "2023-11-10T18:53:30",
            "upload_time_iso_8601": "2023-11-10T18:53:30.066547Z",
            "url": "https://files.pythonhosted.org/packages/5b/af/476aeb0658d0164ae440d480736b793155c31a650a31cf620e1c5159050f/terminal-copilot-1.5.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-11-10 18:53:30",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "Methexis-Inc",
    "github_project": "terminal-copilot",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [],
    "lcname": "terminal-copilot"
}
        
Elapsed time: 0.28714s