clicra


Nameclicra JSON
Version 0.2.4 PyPI version JSON
download
home_pageNone
SummaryA LLM command-line crafter
upload_time2024-05-11 11:02:03
maintainerNone
docs_urlNone
authorNone
requires_python>=3.10
licenseMIT LICENSE
keywords cli-tool llm
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # clicra: Command Line Crafter

`clicra` is a command-line tool that utilizes local large language models (LLMs) to generate and analyze command lines based on tasks provided by users.

## Installation

`clicra` requires `Ollama` to be installed beforehand. Please follow the instructions on the official Ollama website.

1. Visit Ollama at [https://ollama.com/](https://ollama.com/).
2. Download the installer from the Download section.
3. Execute the downloaded installer.

Additionally, run ollama to download the model file llama3:

```sh
ollama pull llama3
```

After installing Ollama, you can install `clicra`. Use `pipx`, a package manager for Python applications:

```sh
pipx install clicra
```

To uninstall:

```sh
pipx uninstall clicra
```

## Usage

To run `clicra`, provide a description of the task you want to execute as a command-line argument:

```sh
clicra [options] <task>
```

### Options

- `-m, --model`: Specifies the LLM to use (default is `llama3`).
- `-f, --refer`: Executes a specified command and uses its output as additional context to improve the accuracy and relevance of task command generation.
- `-M, --max-chars`: Specifies the maximum number of characters to include from the referred command's output in the prompt (default is `2000`).
- `-r, --run`: Instead of copying the generated command to the clipboard, it executes the command immediately without confirmation, and analyzes the outcome if there are errors (non-zero exit code).
- `-s, --script`: Generates a script instead of a command.
- `--p, --prompt`: Ask for a prompt to describe the solution (**experimental feature**). `tot` for Tree-of-Thought. `sbs` for Step-by-Step.

### Examples

To find source files containing TODO comments, you can provide the output of `ls` as context. This allows `clicra` to recognize the directory structure and file types:

```sh
clicra "Find TODOs in source files" -f "ls"
```

## Screenshots

![](imgs/screenshot2.png)

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "clicra",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.10",
    "maintainer_email": null,
    "keywords": "cli-tool, LLM",
    "author": null,
    "author_email": "Toshihiro Kamiya <kamiya@mbj.nifty.com>",
    "download_url": "https://files.pythonhosted.org/packages/e0/74/99a3bb43e4a28f565e112ba1043d49f5b0696e39b685783516529fd541c2/clicra-0.2.4.tar.gz",
    "platform": null,
    "description": "# clicra: Command Line Crafter\n\n`clicra` is a command-line tool that utilizes local large language models (LLMs) to generate and analyze command lines based on tasks provided by users.\n\n## Installation\n\n`clicra` requires `Ollama` to be installed beforehand. Please follow the instructions on the official Ollama website.\n\n1. Visit Ollama at [https://ollama.com/](https://ollama.com/).\n2. Download the installer from the Download section.\n3. Execute the downloaded installer.\n\nAdditionally, run ollama to download the model file llama3:\n\n```sh\nollama pull llama3\n```\n\nAfter installing Ollama, you can install `clicra`. Use `pipx`, a package manager for Python applications:\n\n```sh\npipx install clicra\n```\n\nTo uninstall:\n\n```sh\npipx uninstall clicra\n```\n\n## Usage\n\nTo run `clicra`, provide a description of the task you want to execute as a command-line argument:\n\n```sh\nclicra [options] <task>\n```\n\n### Options\n\n- `-m, --model`: Specifies the LLM to use (default is `llama3`).\n- `-f, --refer`: Executes a specified command and uses its output as additional context to improve the accuracy and relevance of task command generation.\n- `-M, --max-chars`: Specifies the maximum number of characters to include from the referred command's output in the prompt (default is `2000`).\n- `-r, --run`: Instead of copying the generated command to the clipboard, it executes the command immediately without confirmation, and analyzes the outcome if there are errors (non-zero exit code).\n- `-s, --script`: Generates a script instead of a command.\n- `--p, --prompt`: Ask for a prompt to describe the solution (**experimental feature**). `tot` for Tree-of-Thought. `sbs` for Step-by-Step.\n\n### Examples\n\nTo find source files containing TODO comments, you can provide the output of `ls` as context. This allows `clicra` to recognize the directory structure and file types:\n\n```sh\nclicra \"Find TODOs in source files\" -f \"ls\"\n```\n\n## Screenshots\n\n![](imgs/screenshot2.png)\n",
    "bugtrack_url": null,
    "license": "MIT LICENSE",
    "summary": "A LLM command-line crafter",
    "version": "0.2.4",
    "project_urls": {
        "Souce": "https://github.com/tos-kamiya/clicra"
    },
    "split_keywords": [
        "cli-tool",
        " llm"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "436c27051f2fef56fc74f9bb3e4808cfb2d515c1d602aa5a7395ca1eb46eed16",
                "md5": "3f3878c081bd4c94e9f9efe94de649e1",
                "sha256": "c0487d10fe84271c002fbcd332868ae9d85b27f009b2cc34505868f6a599081b"
            },
            "downloads": -1,
            "filename": "clicra-0.2.4-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "3f3878c081bd4c94e9f9efe94de649e1",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10",
            "size": 5758,
            "upload_time": "2024-05-11T11:01:59",
            "upload_time_iso_8601": "2024-05-11T11:01:59.888169Z",
            "url": "https://files.pythonhosted.org/packages/43/6c/27051f2fef56fc74f9bb3e4808cfb2d515c1d602aa5a7395ca1eb46eed16/clicra-0.2.4-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "e07499a3bb43e4a28f565e112ba1043d49f5b0696e39b685783516529fd541c2",
                "md5": "8091df75428fca5c2c2d03e9ce1c2c4c",
                "sha256": "087b9db7a8467fbfda185bbf99658532bdf9d82cf11f0fd20aef4b40abc5015b"
            },
            "downloads": -1,
            "filename": "clicra-0.2.4.tar.gz",
            "has_sig": false,
            "md5_digest": "8091df75428fca5c2c2d03e9ce1c2c4c",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10",
            "size": 6878,
            "upload_time": "2024-05-11T11:02:03",
            "upload_time_iso_8601": "2024-05-11T11:02:03.130480Z",
            "url": "https://files.pythonhosted.org/packages/e0/74/99a3bb43e4a28f565e112ba1043d49f5b0696e39b685783516529fd541c2/clicra-0.2.4.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-05-11 11:02:03",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "tos-kamiya",
    "github_project": "clicra",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "clicra"
}
        
Elapsed time: 2.04630s