{"id":51883772,"url":"https://github.com/splitbrain/rpeek","last_synced_at":"2026-07-25T17:31:49.366Z","repository":{"id":371752263,"uuid":"1303042004","full_name":"splitbrain/rpeek","owner":"splitbrain","description":"remote read-only diagnostic tool for agents","archived":false,"fork":false,"pushed_at":"2026-07-24T10:25:25.000Z","size":92,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-07-24T12:08:28.791Z","etag":null,"topics":["claude-skills","skill-md","vibecoded"],"latest_commit_sha":null,"homepage":"","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/splitbrain.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":null,"dco":null,"cla":null}},"created_at":"2026-07-16T17:05:57.000Z","updated_at":"2026-07-24T10:44:32.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/splitbrain/rpeek","commit_stats":null,"previous_names":["splitbrain/rpeek"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/splitbrain/rpeek","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/splitbrain%2Frpeek","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/splitbrain%2Frpeek/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/splitbrain%2Frpeek/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/splitbrain%2Frpeek/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/splitbrain","download_url":"https://codeload.github.com/splitbrain/rpeek/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/splitbrain%2Frpeek/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35887362,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-07-20T02:08:10.276Z","status":"online","status_checked_at":"2026-07-25T02:00:06.922Z","response_time":64,"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":["claude-skills","skill-md","vibecoded"],"created_at":"2026-07-25T17:31:48.760Z","updated_at":"2026-07-25T17:31:49.348Z","avatar_url":"https://github.com/splitbrain.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# rpeek — remote read-only diagnostic tool\n\nOne small Go binary that lets an agent inspect a remote server **read-only**, without\ncopy-pasting logs and configs by hand.\n\n- **`rpeek serve`** — the server. Copied onto the remote host and run there. Listens on\n  TLS, authenticates callers with a token it prints at startup, and exposes a fixed set\n  of read-only diagnostic tools implemented directly in Go (no shell, no command\n  parsing).\n- **`rpeek \u003ctool\u003e`** — the client. A one-shot CLI run on the operator's machine. Each\n  invocation dials the server, authenticates, runs one tool, prints the result, exits.\n\n## Design principles\n\n1. **Read-only.** No tool modifies the host. Tools are hand-written Go that read state;\n   they never spawn a shell.\n2. **Path jailing.** File-reading tools are confined to configurable root directories.\n   No path may escape them — no `..` traversal, no symlink escape (symlinks are resolved\n   before the membership check).\n3. **Token auth on every request.** No token, no service. Compared in constant time.\n4. **TLS for confidentiality.** Ad-hoc self-signed cert; the client does not verify it.\n   The token authenticates; TLS encrypts.\n5. **Fail closed.** Bad token, bad path, unknown tool, malformed request, or an\n   internal panic → error.\n6. **Bounded output.** Every tool caps its output size and respects a timeout.\n\n## Build\n\n```sh\nmake build      # static binary into bin/rpeek, version stamped from git\nmake help       # list all targets\n```\n\nNo third-party dependencies — standard library only.\n\n## Run the server\n\n`scp` `rpeek` to the remote host and run `rpeek serve` there, naming the directories file\ntools may read within (the **jail roots**). With no roots, it defaults to the current\ndirectory.\n\n```sh\nrpeek serve /var/log /etc       # two jail roots\nrpeek serve                     # one jail root: the current working directory\n```\n\nStartup prints a banner including the token.\n\nListen address and token may be overridden with the `--host` and `--token` flags or the `RPEEK_HOST` and `RPEEK_TOKEN` environment variables. The server runs until killed or until the `--ttl` expires.\n\nRun `rpeek serve --help` for all flags.\n\n## Run the client\n\nSupply connection details via `--host` / `--token` or the `RPEEK_HOST` / `RPEEK_TOKEN` environment\nvariables (token must match the server's) and the tool name plus its arguments. Output is printed to STDOUT, errors to STDERR.\n\nRun `rpeek help` for the tool list and `rpeek help \u003ctool\u003e`  for a tool's arguments.\n\nExamples:\n\n```sh\nexport RPEEK_HOST=10.0.0.5          # or 10.0.0.5:7017\nexport RPEEK_TOKEN=9f2a5c1e...\n\nrpeek list  /etc\nrpeek read  /var/log/syslog --max-bytes 20000 --offset 0\nrpeek grep  /var/log --pattern \"ERROR\" --ignore-case --max-matches 500\nrpeek tail  /var/log/nginx/access.log --lines 200\nrpeek stat  /etc/hosts\nrpeek ps\nrpeek disk\nrpeek journal --unit nginx --lines 100\n```\n\nExit codes: `0` success, `1` protocol/transport error, `2` server-returned error,\n`3` usage error.\n\n## Security model and its limits\n\nTLS encryption protects against **passive eavesdropping**. Because the client does not\nverify the certificate, an **active man-in-the-middle** who can intercept the connection\nis not stopped by TLS alone. The token prevents an interceptor from *using* the service,\nbut defeating MITM would require certificate verification, which this MVP omits by\ndesign. This is fine for trusted networks or SSH-tunneled use; do not expose the server\non a hostile network expecting TLS to authenticate the endpoint.\n\nThe path jail is the most security-sensitive component. A client always addresses files\nby their real filesystem path; a path is allowed only if, after cleaning and symlink\nresolution, it lands inside a configured root. See `internal/tools/jail.go` and its\ntests.\n\n## Agent integration\n\nThe tool subcommands are a clean target for an AI agent (e.g. Claude Code) to drive,\nbecause each call is one-shot, read-only, path-jailed, and bounded. The\n`skills/rpeek/SKILL.md` file teaches an agent when and how to use it.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsplitbrain%2Frpeek","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsplitbrain%2Frpeek","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsplitbrain%2Frpeek/lists"}