sysaidmin


Namesysaidmin JSON
Version 0.2.0 PyPI version JSON
download
home_pagehttps://github.com/skorokithakis/sysaidmin/
SummaryA GPT-powered sysadmin.
upload_time2023-12-05 00:20:40
maintainer
docs_urlNone
authorStavros Korokithakis
requires_python>=3.7.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": "",
    "docs_url": null,
    "requires_python": ">=3.7.1",
    "maintainer_email": "",
    "keywords": "",
    "author": "Stavros Korokithakis",
    "author_email": "hi@stavros.io",
    "download_url": "https://files.pythonhosted.org/packages/1d/20/83d3990757074c4e43f29da3f306d3ab5e25edcb4bf31aca14ebb4591e4a/sysaidmin-0.2.0.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.0",
    "project_urls": {
        "Homepage": "https://github.com/skorokithakis/sysaidmin/",
        "Repository": "https://github.com/skorokithakis/sysaidmin/"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "5b04c1611ebe4b2ba81d35d4c0f12d1508a1d5f164c41070cd0393c7046507ab",
                "md5": "cd75747f9716f0af479cf90112ea06b8",
                "sha256": "2bfa32866d9b17160574c298383c1bed5512d210526e7cfedc282cc14ec9b1c1"
            },
            "downloads": -1,
            "filename": "sysaidmin-0.2.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "cd75747f9716f0af479cf90112ea06b8",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7.1",
            "size": 17021,
            "upload_time": "2023-12-05T00:20:38",
            "upload_time_iso_8601": "2023-12-05T00:20:38.882703Z",
            "url": "https://files.pythonhosted.org/packages/5b/04/c1611ebe4b2ba81d35d4c0f12d1508a1d5f164c41070cd0393c7046507ab/sysaidmin-0.2.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "1d2083d3990757074c4e43f29da3f306d3ab5e25edcb4bf31aca14ebb4591e4a",
                "md5": "06c474c032f9b848dedb83ff4f752730",
                "sha256": "7e91afa743d60b1b7c9bb5ff6d9b5edc0774bafb687e9b7e550fda0e3acf5aed"
            },
            "downloads": -1,
            "filename": "sysaidmin-0.2.0.tar.gz",
            "has_sig": false,
            "md5_digest": "06c474c032f9b848dedb83ff4f752730",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7.1",
            "size": 16174,
            "upload_time": "2023-12-05T00:20:40",
            "upload_time_iso_8601": "2023-12-05T00:20:40.180635Z",
            "url": "https://files.pythonhosted.org/packages/1d/20/83d3990757074c4e43f29da3f306d3ab5e25edcb4bf31aca14ebb4591e4a/sysaidmin-0.2.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-12-05 00:20:40",
    "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.16333s