sysaidmin


Namesysaidmin JSON
Version 0.2.2 PyPI version JSON
download
home_pagehttps://github.com/skorokithakis/sysaidmin/
SummaryA GPT-powered sysadmin.
upload_time2024-08-31 22:53:32
maintainerNone
docs_urlNone
authorStavros Korokithakis
requires_python>=3.8.1
licenseAGPL-3.0-or-later
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Sysaidmin

Sysaidmin is a GPT-powered sysadmin for your machine. You can ask it to solve a problem,
and it will run commands on your system (with your permission) to debug what's going on.

![](misc/demo.gif)


## Installation

Using `pipx` (recommended):

```bash session
$ pipx install sysaidmin
```

Using `pip` (less recommended, but still good):

```bash session
$ pip install sysaidmin
```

Specify your OpenAI API key:

```bash session
$ export OPENAI_API_KEY=sk-youropenaiapikeygoeshere
```

Then run Sysaidmin with your issue:

```bash session
$ sysaidmin "The foo process is emailing me and I don't know why."
```


## Sample run:

    $ sysaidmin "Whenever I try to SSH to localhost on port 22, it doesn't work. Can you fix it?"

    ==============================
    Running command: ssh localhost
    ==============================
    Press any key to continue, Ctrl-C to terminate...

    ssh: connect to host localhost port 22: Connection refused


    ==============================
    Running command: systemctl status sshd
    ==============================
    Press any key to continue, Ctrl-C to terminate...

    ● ssh.service - OpenBSD Secure Shell server
         Loaded: loaded (/lib/systemd/system/ssh.service; enabled; vendor preset: enabled)
         Active: active (running) since Sun 2023-11-26 18:40:45 EET; 25s ago
           Docs: man:sshd(8)
                 man:sshd_config(5)
        Process: 92469 ExecStartPre=/usr/sbin/sshd -t (code=exited, status=0/SUCCESS)
       Main PID: 92471 (sshd)
          Tasks: 1 (limit: 18824)
         Memory: 1.7M
            CPU: 9ms
         CGroup: /system.slice/ssh.service
                 └─92471 "sshd: /usr/sbin/sshd -D [listener] 0 of 10-100 startups"

    Νοε 26 18:40:45 zeus systemd[1]: Starting OpenBSD Secure Shell server...
    Νοε 26 18:40:45 zeus sshd[92471]: Server listening on 0.0.0.0 port 8122.
    Νοε 26 18:40:45 zeus sshd[92471]: Server listening on :: port 8122.
    Νοε 26 18:40:45 zeus systemd[1]: Started OpenBSD Secure Shell server.


    ==============================
    It appears that your SSH server is running, but it is not listening on the default SSH
    port 22. Instead, it is listening on port 8122 for both IPv4 and IPv6 connections, as
    indicated by the line "Server listening on 0.0.0.0 port 8122" and "Server listening on
    :: port 8122."

    To connect via SSH to localhost, you need to specify port 8122. You can do that by using
    the following command:

    ```bash
    ssh -p 8122 localhost
    ```

    Try running this command, and it should allow you to connect to the SSH server running
    on your local machine.
    ==============================

    Your response: No, please change the port

    ==============================
    Running command: sudo sed -i 's/#Port 22/Port 22/' /etc/ssh/sshd_config && sudo systemctl restart ssh
    ==============================
    Press any key to continue, Ctrl-C to terminate...
    ^C


            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/skorokithakis/sysaidmin/",
    "name": "sysaidmin",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8.1",
    "maintainer_email": null,
    "keywords": null,
    "author": "Stavros Korokithakis",
    "author_email": "hi@stavros.io",
    "download_url": "https://files.pythonhosted.org/packages/59/01/4f961856c3cfb32136782b119b3944466df81fb542dc6c214dc3386245f0/sysaidmin-0.2.2.tar.gz",
    "platform": null,
    "description": "# Sysaidmin\n\nSysaidmin is a GPT-powered sysadmin for your machine. You can ask it to solve a problem,\nand it will run commands on your system (with your permission) to debug what's going on.\n\n![](misc/demo.gif)\n\n\n## Installation\n\nUsing `pipx` (recommended):\n\n```bash session\n$ pipx install sysaidmin\n```\n\nUsing `pip` (less recommended, but still good):\n\n```bash session\n$ pip install sysaidmin\n```\n\nSpecify your OpenAI API key:\n\n```bash session\n$ export OPENAI_API_KEY=sk-youropenaiapikeygoeshere\n```\n\nThen run Sysaidmin with your issue:\n\n```bash session\n$ sysaidmin \"The foo process is emailing me and I don't know why.\"\n```\n\n\n## Sample run:\n\n    $ sysaidmin \"Whenever I try to SSH to localhost on port 22, it doesn't work. Can you fix it?\"\n\n    ==============================\n    Running command: ssh localhost\n    ==============================\n    Press any key to continue, Ctrl-C to terminate...\n\n    ssh: connect to host localhost port 22: Connection refused\n\n\n    ==============================\n    Running command: systemctl status sshd\n    ==============================\n    Press any key to continue, Ctrl-C to terminate...\n\n    \u25cf ssh.service - OpenBSD Secure Shell server\n         Loaded: loaded (/lib/systemd/system/ssh.service; enabled; vendor preset: enabled)\n         Active: active (running) since Sun 2023-11-26 18:40:45 EET; 25s ago\n           Docs: man:sshd(8)\n                 man:sshd_config(5)\n        Process: 92469 ExecStartPre=/usr/sbin/sshd -t (code=exited, status=0/SUCCESS)\n       Main PID: 92471 (sshd)\n          Tasks: 1 (limit: 18824)\n         Memory: 1.7M\n            CPU: 9ms\n         CGroup: /system.slice/ssh.service\n                 \u2514\u250092471 \"sshd: /usr/sbin/sshd -D [listener] 0 of 10-100 startups\"\n\n    \u039d\u03bf\u03b5 26 18:40:45 zeus systemd[1]: Starting OpenBSD Secure Shell server...\n    \u039d\u03bf\u03b5 26 18:40:45 zeus sshd[92471]: Server listening on 0.0.0.0 port 8122.\n    \u039d\u03bf\u03b5 26 18:40:45 zeus sshd[92471]: Server listening on :: port 8122.\n    \u039d\u03bf\u03b5 26 18:40:45 zeus systemd[1]: Started OpenBSD Secure Shell server.\n\n\n    ==============================\n    It appears that your SSH server is running, but it is not listening on the default SSH\n    port 22. Instead, it is listening on port 8122 for both IPv4 and IPv6 connections, as\n    indicated by the line \"Server listening on 0.0.0.0 port 8122\" and \"Server listening on\n    :: port 8122.\"\n\n    To connect via SSH to localhost, you need to specify port 8122. You can do that by using\n    the following command:\n\n    ```bash\n    ssh -p 8122 localhost\n    ```\n\n    Try running this command, and it should allow you to connect to the SSH server running\n    on your local machine.\n    ==============================\n\n    Your response: No, please change the port\n\n    ==============================\n    Running command: sudo sed -i 's/#Port 22/Port 22/' /etc/ssh/sshd_config && sudo systemctl restart ssh\n    ==============================\n    Press any key to continue, Ctrl-C to terminate...\n    ^C\n\n",
    "bugtrack_url": null,
    "license": "AGPL-3.0-or-later",
    "summary": "A GPT-powered sysadmin.",
    "version": "0.2.2",
    "project_urls": {
        "Homepage": "https://github.com/skorokithakis/sysaidmin/",
        "Repository": "https://github.com/skorokithakis/sysaidmin/"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "1604b0e935abf529c3e0a8d6881b3fb2dd62ffc3ceb32985234887abf19e7709",
                "md5": "55715f7989e16d9eeec8f733ee13041b",
                "sha256": "44eb5fc69875cad5ed38f768a5a61de3bbd95dcc43e35de19aacd5d94049c7b8"
            },
            "downloads": -1,
            "filename": "sysaidmin-0.2.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "55715f7989e16d9eeec8f733ee13041b",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8.1",
            "size": 17134,
            "upload_time": "2024-08-31T22:53:30",
            "upload_time_iso_8601": "2024-08-31T22:53:30.911234Z",
            "url": "https://files.pythonhosted.org/packages/16/04/b0e935abf529c3e0a8d6881b3fb2dd62ffc3ceb32985234887abf19e7709/sysaidmin-0.2.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "59014f961856c3cfb32136782b119b3944466df81fb542dc6c214dc3386245f0",
                "md5": "debe1f9c0d3887219cbb4b91994afc29",
                "sha256": "1bb2b343a0dffb9282e9a2ebddbb825e416b1cc0e9821ed25ded756c86362f47"
            },
            "downloads": -1,
            "filename": "sysaidmin-0.2.2.tar.gz",
            "has_sig": false,
            "md5_digest": "debe1f9c0d3887219cbb4b91994afc29",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8.1",
            "size": 16292,
            "upload_time": "2024-08-31T22:53:32",
            "upload_time_iso_8601": "2024-08-31T22:53:32.435679Z",
            "url": "https://files.pythonhosted.org/packages/59/01/4f961856c3cfb32136782b119b3944466df81fb542dc6c214dc3386245f0/sysaidmin-0.2.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-08-31 22:53:32",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "skorokithakis",
    "github_project": "sysaidmin",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "sysaidmin"
}
        
Elapsed time: 0.36036s