{"id":50712152,"url":"https://github.com/ba0f3/luna","last_synced_at":"2026-06-09T16:04:14.787Z","repository":{"id":357312465,"uuid":"1235697331","full_name":"ba0f3/luna","owner":"ba0f3","description":null,"archived":false,"fork":false,"pushed_at":"2026-05-12T09:25:58.000Z","size":51,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-12T09:34:39.954Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","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/ba0f3.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2026-05-11T15:10:13.000Z","updated_at":"2026-05-12T09:26:14.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/ba0f3/luna","commit_stats":null,"previous_names":["ba0f3/luna"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/ba0f3/luna","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ba0f3%2Fluna","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ba0f3%2Fluna/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ba0f3%2Fluna/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ba0f3%2Fluna/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ba0f3","download_url":"https://codeload.github.com/ba0f3/luna/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ba0f3%2Fluna/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34114460,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-09T02:00:06.510Z","response_time":63,"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":[],"created_at":"2026-06-09T16:04:10.412Z","updated_at":"2026-06-09T16:04:14.778Z","avatar_url":"https://github.com/ba0f3.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# luna\n\nAn OpenCode-based AI agent for remote Linux systems administration via SSH.\nAll remote operations are routed through a Go MCP interceptor with a security gate.\n\n## SSH client compatibility\n\nLuna aims to be **as compatible as practical with your existing OpenSSH client**—the same host you reach with `ssh` should work through the interceptor without re‑inventing credentials or host trust. Concretely, the Go SSH stack follows your **`~/.ssh/known_hosts`**, **`~/.ssh/config`** (where the parser supports it: e.g. `User`, `IdentityFile`, `CertificateFile`, `IdentitiesOnly`, `StrictHostKeyChecking`, `HostKeyAlgorithms`), **`SSH_AUTH_SOCK`**, and common **`~/.ssh/id_*`** keys. Gaps can still exist (e.g. `ProxyJump`, `Match`, or vendor‑specific agent behavior); treat parity as a **design goal** and report mismatches.\n\n## Architecture\n\n```\nOpenCode (LLM) ──MCP stdio──► luna-interceptor (Go binary)\n                                         │\n                               ┌─────────┴─────────┐\n                               │                   │\n                             SSH                 SFTP\n                               │                   │\n                          Remote Linux         Remote Linux\n                          (execute_remote)     (read_file / transfer_file)\n```\n\n## Agents\n\n| Agent | Mode | Role |\n|-------|------|------|\n| `luna` | Primary | Main orchestrator |\n| `@debugger` | Subagent | Log analysis, root cause investigation |\n| `@deployer` | Subagent | Approved change execution |\n| `@network` | Subagent | Connectivity, firewall, DNS diagnostics |\n\n## MCP Tools\n\n| Tool | Description | Mutations |\n|------|-------------|-----------|\n| `list_hosts` | List configured hosts | No |\n| `execute_remote` | Run shell command via SSH | No (by default) |\n| `read_file` | Fetch file via SFTP | No |\n| `transfer_file` | Upload file via SFTP | Yes — requires approval |\n| `scan_host_inventory` | Run a fixed read-only inventory scan and return normalized JSON | No |\n| `lookup_cve` | Query external CVE advisory sources and return normalized JSON | No |\n\n## Quick Start\n\n### 1. Install the interceptor\n\nDownload the latest release from GitHub into the `bin/` directory:\n\n```bash\nmkdir -p bin\ncurl -sL https://github.com/ba0f3/luna/releases/latest/download/luna-interceptor_Linux_x86_64.tar.gz | tar xz -C bin/ luna-interceptor\n```\n\n*(Alternatively, build from source: `cd interceptor \u0026\u0026 go mod tidy \u0026\u0026 make build`)*\n\n### 2. Open in OpenCode\n\n```bash\ncd /path/to/luna\nopencode\n```\n\nThe `luna-interceptor` MCP server starts automatically.\n\n## Security Model\n\n- **Bash is disabled** at the OpenCode level — no local shell execution.\n- **Read-only by default** — mutating commands need `allow_mutations=true`.\n- **`allow_mutations` is never set without explicit human approval.**\n- **Known hosts verification** — requires hosts to be in `~/.ssh/known_hosts`.\n- **No credentials in prompts** — SSH agent and default keys are used for authentication.\n- **OpenSSH parity** — see [SSH client compatibility](#ssh-client-compatibility); behavior should match your normal `ssh` setup where supported.\n\n## Adding a New MCP Tool\n\n1. Create `interceptor/internal/tools/\u003cname\u003e.go`\n2. Add `register\u003cName\u003e()` call in `tools/tools.go`\n3. Add commands to `security/allowlist.go` (read-only or mutating)\n4. Run `make build \u0026\u0026 make test`\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fba0f3%2Fluna","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fba0f3%2Fluna","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fba0f3%2Fluna/lists"}