{"id":25932026,"url":"https://github.com/jamro/term-800","last_synced_at":"2026-05-10T01:11:45.023Z","repository":{"id":280283203,"uuid":"937508400","full_name":"jamro/term-800","owner":"jamro","description":null,"archived":false,"fork":false,"pushed_at":"2025-03-02T13:25:36.000Z","size":751,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-02T14:23:12.655Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","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/jamro.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":"2025-02-23T08:19:00.000Z","updated_at":"2025-03-02T13:25:40.000Z","dependencies_parsed_at":"2025-03-02T14:34:03.119Z","dependency_job_id":null,"html_url":"https://github.com/jamro/term-800","commit_stats":null,"previous_names":["jamro/term-800"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jamro%2Fterm-800","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jamro%2Fterm-800/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jamro%2Fterm-800/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jamro%2Fterm-800/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jamro","download_url":"https://codeload.github.com/jamro/term-800/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241758935,"owners_count":20015251,"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","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":[],"created_at":"2025-03-04T00:15:49.388Z","updated_at":"2026-05-10T01:11:44.992Z","avatar_url":"https://github.com/jamro.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Term-800: AI-based System Administrator\n\n## Overview\n\n**Term-800** is an AI-powered system administrator that connects to Linux servers via SSH to execute commands, retrieve system information, and automate tasks. Inspired by the T-800 from the Terminator movie, this project was created purely for fun.\n\n## App Preview\n\n**Prompt**: *\"Install NodeRed and run it as a service.\"*\n\n![Term-800 Screenshot](docs/demo.gif)\n\n## Key Features\n\n- **Natural Language Interaction** - Communicates with you using natural language. You can define a task or objective, and **Term-800** will execute all necessary commands to achieve it.\n\n- **SSH Connectivity** - Connects to remote hosts via SSH, supporting both key-based and password-based authentication.\n\n- **Error Handling \u0026 Workarounds** - If issues arise, **Term-800** will attempt to resolve them or find a workaround.\n\n- **Advanced Planning** - Uses chain-of-thought methods to enhance thinking capabilities, such as planning complex tasks before execution.\n\n- **System Analysis \u0026 Insights** - Analyzes the system and answers questions about its configuration and status.\n\n- **Execution Guardian** - Built-in supervision layer that prompts for confirmation before executing risky commands. The level of supervision is configurable.\n\n- **Real-Time Logs** - Streams logs from the remote host, allowing you to see how commands progress.\n\n- **Customizable AI Models** - Works with OpenAI LLM models (requires an API key). You can choose a compatible model you want to use.\n\n- **Cost Summarization** - Tracks and summarizes the cost of operations performed.\n\n## Sample Use Cases / Prompts\n\nTerm-800 can assist in a wide range of system administration tasks, from security audits to network analysis and software installations. Below are some example prompts that demonstrate how you can leverage its capabilities:\n\n- Find and list all open network ports and which services are using them.\n- Install and configure a LAMP stack on this machine.\n- Set up an automatic system update script that runs daily.\n- What is my current public IP address?\n- Scan the local network and list all connected devices.\n- Perform a basic security audit on this machine and suggest improvements.\n- Find all users with sudo privileges and verify if they need access.\n- Check for known vulnerabilities in installed software.\n\n---\n\n**NOTE:** *Term-800 is a powerful tool, but system administration is inherently complex. Ensuring security, reliability, and scalability requires careful oversight. While Term-800 can be helpful for small projects like Raspberry Pi setups or personal development environments, it should be used with caution. You are responsible for how you use it, so always verify commands and configurations before applying them to critical systems.*\n\n---\n\n## Usage\n\n### Getting Started\n\nBefore starting Term-800, you need an **OpenAI API Key**. Store it in the `OPENAI_API_KEY` environment variable. If this variable is not set, Term-800 will ask for the API key and store it in a `.env` file for future use what can be pretty convenient.\n\n### Connecting to a Remote Host\n\nWhen you start Term-800, it will prompt you for:\n\n- **Hostname** - The server you want to connect to.\n\n- **Username** - The user account for SSH authentication.\n\n- **Password (if needed)** - If key-based authentication is unavailable, Term-800 will ask for a password.\n\n### Security Tips\n\n- Use key-based SSH authentication.\n- Restrict permissions with a limited-access user.\n\n### Executing Tasks\n\nOnce connected, you can ask Term-800 questions or request tasks in natural language. For example:\n\n```\nlab@skynet.local $\u003e: How much RAM does the host have?\nlab@skynet.local $\u003e: Install LAMP stack.\n```\n\nTerm-800 will determine the necessary steps, execute commands, and stream logs from the remote host. After completion, it will provide a summary of the task.\n\n### System Commands\n\nTerm-800 also supports a set of system commands for configuration and management. These commands start with /:\n\n- `/help` - List all available system commands.\n\n- `/bye` - Exit Term-800 and close the session.\n\n- `/model` - Change the OpenAI model. Works well with `gpt-4o-mini`, but you can also choose more powerful and expensive models.\n\n- `/clear` - Clear the conversation and action history. This resets Term-800's context, which can help start fresh or reduce costs (larger contexts require more tokens and increase OpenAI API costs).\n\n- `/guard` - Configure the Execution Guardian for command supervision:\n\n    - `on` - Every command must be confirmed by user.\n\n    - `auto` - Only risky commands require confirmation.\n\n    - `off` - No confirmation; Term-800 executes commands automatically\n\n## Development Guide\n\nThe source code is available at: [GitHub Repository](https://github.com/jamro/term-800.git)\n\n### Prerequisites\n\nTo set up Term-800 for development, ensure you have the following:\n\n- **Python 3.8+**\n- **Poetry** (Dependency management)\n- **GNU Make** (Optional, but recommended)\n- **OpenAI API Key** - visit [OpenAI](https://platform.openai.com) to get one.\n- **SSH Access** to a test machine (e.g., Raspberry Pi or a remote Linux server)\n\n### Installing Poetry\n\nIf you don't have **Poetry** installed, install it using:\n\n```bash\npip install poetry\n```\n\nVerify the installation:\n\n```bash\npoetry --version\n```\n\n### Development Setup\n\n#### Clone the Repository\n\n```bash\ngit clone https://github.com/jamro/term-800.git\ncd term-800\n```\n\n#### Install Dependencies\n\n```bash\npoetry install --no-root\n```\n\n#### Run Term-800 Locally\n\n```bash\nmake run\n```\n\n#### Run Tests with Coverage\n\n```bash\nmake test\n```\n\nor to run a specific test:\n\n```bash\npoetry run pytest -k \"test_CmdChat_model_basic\" -s\n```\n\n#### Code Quality Checks\n\nRun the following to check formatting, linting, and type checking:\n\n```bash\nmake check\n```\n\nThis includes:\n\n- **Black** - Auto-formatting.\n- **Ruff** - Linting (with auto-fix support).\n- **Mypy** - Type checking.\n\n\n#### Serve Documentation Locally\n\n```bash\nmake doc\n```\nVisit [http://localhost:8000](http://localhost:8000) to view the documentation.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjamro%2Fterm-800","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjamro%2Fterm-800","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjamro%2Fterm-800/lists"}