{"id":14964739,"url":"https://github.com/giovanni-gatti/smart-shell","last_synced_at":"2026-02-14T04:41:13.041Z","repository":{"id":252965988,"uuid":"841518204","full_name":"giovanni-gatti/smart-shell","owner":"giovanni-gatti","description":"AI-powered Shell Assistant.","archived":false,"fork":false,"pushed_at":"2024-08-18T16:37:46.000Z","size":13109,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-08T22:46:04.943Z","etag":null,"topics":["cli","llamacpp","llm","shell"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/giovanni-gatti.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-08-12T15:07:35.000Z","updated_at":"2024-09-02T09:18:10.000Z","dependencies_parsed_at":"2024-08-18T17:15:15.004Z","dependency_job_id":null,"html_url":"https://github.com/giovanni-gatti/smart-shell","commit_stats":{"total_commits":18,"total_committers":2,"mean_commits":9.0,"dds":0.05555555555555558,"last_synced_commit":"edf720540240e63a59d43389bc631b1982159772"},"previous_names":["giovanni-gatti/smart-shell"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/giovanni-gatti/smart-shell","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/giovanni-gatti%2Fsmart-shell","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/giovanni-gatti%2Fsmart-shell/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/giovanni-gatti%2Fsmart-shell/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/giovanni-gatti%2Fsmart-shell/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/giovanni-gatti","download_url":"https://codeload.github.com/giovanni-gatti/smart-shell/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/giovanni-gatti%2Fsmart-shell/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274231232,"owners_count":25245659,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-08T02:00:09.813Z","response_time":121,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","llamacpp","llm","shell"],"created_at":"2024-09-24T13:33:42.751Z","updated_at":"2026-02-14T04:41:08.002Z","avatar_url":"https://github.com/giovanni-gatti.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SmartShell\n\nAI-powered Shell Assistant.\n\n_News: version 0.1.0 is now available cross-platform (only requires Python installation) using LLaMA.cpp HTTP Server for local inference._\n\n\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\"assets/demo_gif.gif\" alt=\"demo\"\u003e\n  \u003cp\u003e\u003cem\u003eSmartShell running Meta's LLama 3 8B Instruct model on a MacBook Pro M3 Pro.\u003c/em\u003e\u003c/p\u003e\n\u003c/div\u003e\n\n## About\n**SmartShell** is your ultimate command-line companion, delivering lightning-fast access to bash commands, Git tips, code snippets, and error output explanations. With SmartShell, there's no need to break your flow—just ask and get instant, accurate answers directly from your terminal. Simplify your workflow, reduce distractions, and keep coding with confidence.\n\n### Features\n- Generate shell commands and code snippets from natural language.\n- Copy outputs directly to clipboard with one click.\n- Intuitive interface.\n- Support for open-source models using [LLaMA.cpp](https://github.com/ggerganov/llama.cpp).\n\n## Getting Started\nFollow these steps to install SmartShell globally on your system.\n\n### Installation\n1. Install the [Poetry](https://python-poetry.org/docs/) package manager.\n2. (Optional, recommended) Create a virtual environment.\n3. Clone this repo and navigate to the folder.\n4. Run the following commands:\n```console\n$ poetry check\n$ poetry install\n```\n(Make sure the command `check` returns the message `All set!`).\n\n5. Build the `.whl` file:\n```console\n$ poetry build\n```\n6. Finally, install the package globally:\n```console\n$ pipx install /path/to/your/.whl/file\n```\n\n### Model Selection\n**SmartShell** uses the LLaMA.cpp local [HTTP server](https://github.com/ggerganov/llama.cpp/blob/master/examples/server/README.md) to run inference with open-source LLMs. Install `llama.cpp` following the instructions [here](https://github.com/ggerganov/llama.cpp).\n\nThe [Example](#example) section shows how to run the LLama 3 8B Instruct model.\n\n### Basic Usage\nSimply type `smart-shell q` followed by your question.\n\nSee [this page](smart_shell/README.md) for a complete list of available commands to call the CLI tool.\n\n## Example\nThis example shows how to set up **SmartShell** with [Meta's LLama 3 8B](https://huggingface.co/meta-llama/Meta-Llama-3-8B-Instruct) model for demonstration purposes.\n\n1. Navigate to your local `llama.cpp` cloned folder and run:\n```console\n$ python -m pip install -r requirements.txt\n```\n\n2. Download the model:\n```console\n$ huggingface-cli download meta-llama/Meta-Llama-3-8B-Instruct --exclude \"original/*\"  --local-dir models/Meta-Llama-3-8B-Instruct\n```\n\n3. Convert the model to `.GGUF` format for LLaMA.cpp:\n```console\n$ python convert_hf_to_gguf.py models/Meta-Llama-3-8B-Instruct\n```\n\n4. (Optional) Quantize the model to reduce hardware requirements following the steps [here](https://github.com/ggerganov/llama.cpp/blob/master/examples/quantize/README.md).\n\n5. Start the LLaMA.cpp server:\n```console\n$ ./llama-server -m models/path/to/your/model.gguf --port 8080\n```\n\n6. Configure the local server port:\n```console\n$ smart-shell config \u003cyour-local-port-number\u003e\n```\nMake sure that the port number is the same one you used to initialize the server above.\n\n7. Now you are ready to use **SmartShell** with LLama 3 8B!\nRun:\n```console\n$ smart-shell q \u003cyour-question\u003e\n```\n\n## Future Work\n- Add more configuration and customization options, e.g., system prompt.\n- Improve UI and markdown formatting.\n\n## References\n- [Typer](https://typer.tiangolo.com/tutorial/package/)\n- [Rich](https://rich.readthedocs.io/en/stable/index.html)\n- [LLaMA.cpp](https://github.com/ggerganov/llama.cpp)\n- [HuggingFace](https://huggingface.co/models)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgiovanni-gatti%2Fsmart-shell","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgiovanni-gatti%2Fsmart-shell","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgiovanni-gatti%2Fsmart-shell/lists"}