{"id":20961480,"url":"https://github.com/rawenchilada/terminalagent","last_synced_at":"2026-04-08T21:32:29.950Z","repository":{"id":263164155,"uuid":"889555531","full_name":"RawEnchilada/TerminalAgent","owner":"RawEnchilada","description":"A small experiment that allows an llm to iteratively try to finish a task using your terminal.","archived":false,"fork":false,"pushed_at":"2024-11-16T16:25:21.000Z","size":17,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-11T17:58:36.216Z","etag":null,"topics":["agents","llm","ollama","shell","terminal"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/RawEnchilada.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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-11-16T16:19:09.000Z","updated_at":"2024-11-24T01:04:02.000Z","dependencies_parsed_at":"2024-11-16T17:33:38.033Z","dependency_job_id":null,"html_url":"https://github.com/RawEnchilada/TerminalAgent","commit_stats":null,"previous_names":["rawenchilada/terminalagent"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/RawEnchilada/TerminalAgent","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RawEnchilada%2FTerminalAgent","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RawEnchilada%2FTerminalAgent/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RawEnchilada%2FTerminalAgent/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RawEnchilada%2FTerminalAgent/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RawEnchilada","download_url":"https://codeload.github.com/RawEnchilada/TerminalAgent/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RawEnchilada%2FTerminalAgent/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279078888,"owners_count":26098622,"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-10-15T02:00:07.814Z","response_time":56,"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":["agents","llm","ollama","shell","terminal"],"created_at":"2024-11-19T02:13:51.721Z","updated_at":"2025-10-15T12:40:53.427Z","avatar_url":"https://github.com/RawEnchilada.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Terminal Agent\n\nThe **Terminal Agent** is a very small, locally hosted AI assistant that allows users to perform system tasks by interacting with their computer's shell through a natural language interface. It leverages tools and shell commands to complete tasks efficiently while ensuring safety and user control.\n\n## Features\n\n- **Shell Interaction:** Execute shell commands safely via user confirmation.\n- **Tool Integration:** Use predefined tools for system information and more.\n- **Command Validation:** Automatically validates commands for safety.\n- **Flexible Model Loading:** Load AI models dynamically via environment variables. (Uses Ollama)\n- **Interactive Command Selection:** Choose which commands to run, skip unsafe commands, or cancel altogether.\n\n\n## Prerequisites\n\nBefore you start, ensure you have the following installed:\n\n- **Node.js** (version 14 or later)\n- **npm** (Node Package Manager)\n- A supported shell environment (e.g., Bash, Zsh, CMD, or PowerShell)\n- A running instance of [Ollama](https://ollama.com/), with your preferred model pulled already.\n\n---\n\n## Setup\n\n1. Clone the repository:\n```bash\ngit clone https://github.com/your-repo/assistant-shell-interface.git\ncd assistant-shell-interface\n```\n2. Install dependencies:\n```bash\nnpm install\n```\n\n3. Configure your environment variable for the AI model (optional):\n```bash\nexport MODEL=\"gemma2:2b\"\n```\n\n## Usage\n\n### Starting\n\nRun the assistant by executing:\n```bash        \nnode index.js\n```\n\n### Command Selection Options\n\nWhen the assistant suggests shell commands, it offers several options for execution:\n\n- Run All Commands: Type a to execute all suggested commands.\n- Run Specific Commands: Enter the numbers corresponding to the commands you want to execute, separated by spaces (e.g., 1 2 3).\n- Run Selected Commands: Specify specific commands to run (e.g., 1 4 to run commands 1 and 4).\n- Cancel Execution: Press Enter without typing anything to cancel the execution.\n\n## Tools\n### Adding Tools\n\nThe assistant supports integration with tools for additional functionality. Tools are defined in the tools.js file. Each tool must:\n\n- Export a function.name property.\n- Include a callable method for executing the tool's functionality.\n\n### Example Tool Definition\n```js\nexport const getSystemInfoTool = () =\u003e ({\n    function: { name: 'getSystemInfo', arguments: [] },\n    callable: () =\u003e {\n        const os = require('os');\n        return `System Info: ${os.type()} ${os.release()} on ${os.arch()} architecture.`;\n    }\n});\n```\nTo add this tool:\n\n1. Import it into index.js:\n```js\nimport { getSystemInfoTool } from './tools.js';\n```\n2. Add it to the tools array:\n```js\nconst tools = [\n    getSystemInfoTool(),\n    // Additional tools...\n];\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frawenchilada%2Fterminalagent","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frawenchilada%2Fterminalagent","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frawenchilada%2Fterminalagent/lists"}