xontrib-uhu


Namexontrib-uhu JSON
Version 0.1.3.post0 PyPI version JSON
download
home_pagehttps://github.com/uninstall-your-browser/uhu_util
SummaryXonsh command shortener
upload_time2024-11-03 10:40:28
maintainerNone
docs_urlNone
authorYour Name
requires_python<4.0,>=3.10
licenseWTFPL
keywords xontrib xonsh
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # uhu utility

## generate a name using unpaid human labour

```xsh
@ buildsystem --build --clean --config ../config/custom/static/1.0.0/custom.yml -o test_build/ webapp/
🔨 Doing some shit...
😴 Wow that was hard
@ uhu b
✨ Last command shorened to 'b'
@ b
🔨 Doing some shit...
😴 Wow that was hard
```

## generate a name using unpaid robot labour

```xsh
@ buildsystem --build --clean --config ../config/custom/static/1.0.0/custom.yml -o test_build/ webapp/
🔨 Doing some shit...
😴 Wow that was hard
@ uhu # Shorten the command. May take a while the first time, as ollama has to load the model
✨ Last command shorened to 'buildcustom'
@ buildcustom  # Use the shortened name!
🔨 Doing some shit...
😴 Wow that was hard
```

## rename an alias

```xsh
@ buildsystem blah blah
🔨 Doing some shit...
😴 Wow that was hard
@ uhu
✨ Last command shorened to 'blowupyourcomputer'
@ uhu build # Don't like the name? Rename it!
✨ Renamed 'blowupyourcomputer' to 'build'
```


# install and config

```xsh
xpip install xontrib-uhu
```

```xsh
# $XONSH_UHU_SYSTEM_PROMPT = "..." # Optional! Only change if you know what you're doing!
# $XONSH_UHU_MAX_LLM_TRIES = 3  # Optional! 
# $XONSH_UHU_OLLAMA_URL = "http://ollama.myserver.internal" # Optional!

# MANDATORY (if you want to use it with ollama)! Using a coder model will likely help. 7b is probably enough.
$XONSH_UHU_MODEL_NAME = "qwen2.5-coder:7b"

xontrib load uhu
```

# limitations

Subprocess capture with uhu aliases doesn't work

# what does uhu even mean

> users hate unreasonablylongcommands

(Not really, I just wanted something which had a short name with the keys close together)



            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/uninstall-your-browser/uhu_util",
    "name": "xontrib-uhu",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<4.0,>=3.10",
    "maintainer_email": null,
    "keywords": "xontrib, xonsh",
    "author": "Your Name",
    "author_email": "you@example.com",
    "download_url": "https://files.pythonhosted.org/packages/26/8c/10e26f2e5eaf482b458c914bb3c80b4e1b36e5ab37431fc5816640440e79/xontrib_uhu-0.1.3.post0.tar.gz",
    "platform": null,
    "description": "# uhu utility\n\n## generate a name using unpaid human labour\n\n```xsh\n@ buildsystem --build --clean --config ../config/custom/static/1.0.0/custom.yml -o test_build/ webapp/\n\ud83d\udd28 Doing some shit...\n\ud83d\ude34 Wow that was hard\n@ uhu b\n\u2728 Last command shorened to 'b'\n@ b\n\ud83d\udd28 Doing some shit...\n\ud83d\ude34 Wow that was hard\n```\n\n## generate a name using unpaid robot labour\n\n```xsh\n@ buildsystem --build --clean --config ../config/custom/static/1.0.0/custom.yml -o test_build/ webapp/\n\ud83d\udd28 Doing some shit...\n\ud83d\ude34 Wow that was hard\n@ uhu # Shorten the command. May take a while the first time, as ollama has to load the model\n\u2728 Last command shorened to 'buildcustom'\n@ buildcustom  # Use the shortened name!\n\ud83d\udd28 Doing some shit...\n\ud83d\ude34 Wow that was hard\n```\n\n## rename an alias\n\n```xsh\n@ buildsystem blah blah\n\ud83d\udd28 Doing some shit...\n\ud83d\ude34 Wow that was hard\n@ uhu\n\u2728 Last command shorened to 'blowupyourcomputer'\n@ uhu build # Don't like the name? Rename it!\n\u2728 Renamed 'blowupyourcomputer' to 'build'\n```\n\n\n# install and config\n\n```xsh\nxpip install xontrib-uhu\n```\n\n```xsh\n# $XONSH_UHU_SYSTEM_PROMPT = \"...\" # Optional! Only change if you know what you're doing!\n# $XONSH_UHU_MAX_LLM_TRIES = 3  # Optional! \n# $XONSH_UHU_OLLAMA_URL = \"http://ollama.myserver.internal\" # Optional!\n\n# MANDATORY (if you want to use it with ollama)! Using a coder model will likely help. 7b is probably enough.\n$XONSH_UHU_MODEL_NAME = \"qwen2.5-coder:7b\"\n\nxontrib load uhu\n```\n\n# limitations\n\nSubprocess capture with uhu aliases doesn't work\n\n# what does uhu even mean\n\n> users hate unreasonablylongcommands\n\n(Not really, I just wanted something which had a short name with the keys close together)\n\n\n",
    "bugtrack_url": null,
    "license": "WTFPL",
    "summary": "Xonsh command shortener",
    "version": "0.1.3.post0",
    "project_urls": {
        "Homepage": "https://github.com/uninstall-your-browser/uhu_util",
        "Repository": "https://github.com/uninstall-your-browser/uhu_util"
    },
    "split_keywords": [
        "xontrib",
        " xonsh"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "fc8da391f044c8c1d617b033fd96f4f2a48826d9d68dc193b95c9ad66cf0c362",
                "md5": "34f9d6a1988f6e1d1d859d3fe6eab95d",
                "sha256": "ea8e9193f7d6fb521aba4e8cb5f7cb9ce45ed23bbbbc1a10cd29a4b3624d2764"
            },
            "downloads": -1,
            "filename": "xontrib_uhu-0.1.3.post0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "34f9d6a1988f6e1d1d859d3fe6eab95d",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.10",
            "size": 6150,
            "upload_time": "2024-11-03T10:40:26",
            "upload_time_iso_8601": "2024-11-03T10:40:26.774032Z",
            "url": "https://files.pythonhosted.org/packages/fc/8d/a391f044c8c1d617b033fd96f4f2a48826d9d68dc193b95c9ad66cf0c362/xontrib_uhu-0.1.3.post0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "268c10e26f2e5eaf482b458c914bb3c80b4e1b36e5ab37431fc5816640440e79",
                "md5": "6f88724cfcbdc8d08752b48fc8f6ceee",
                "sha256": "fc639f5b77361b77a6289344d4e1ac6ffe489b4f15bcbaa37c3aad7e59ab06b3"
            },
            "downloads": -1,
            "filename": "xontrib_uhu-0.1.3.post0.tar.gz",
            "has_sig": false,
            "md5_digest": "6f88724cfcbdc8d08752b48fc8f6ceee",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.10",
            "size": 5309,
            "upload_time": "2024-11-03T10:40:28",
            "upload_time_iso_8601": "2024-11-03T10:40:28.515826Z",
            "url": "https://files.pythonhosted.org/packages/26/8c/10e26f2e5eaf482b458c914bb3c80b4e1b36e5ab37431fc5816640440e79/xontrib_uhu-0.1.3.post0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-11-03 10:40:28",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "uninstall-your-browser",
    "github_project": "uhu_util",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "xontrib-uhu"
}
        
Elapsed time: 0.59015s