remocli AGENTS.md

remocli AGENTS.md is an instructions file for Codex, OpenCode from whulxc/remocli. It costs 997 tokens per session, scanned A, original, MIT.

Repository instructions for maintaining RemoCLI, a Windows and WSL control system for remote command-line sessions. They describe its gateway, per-WSL agent, network connections, web or Android client, deployment modes, and troubleshooting entry points.

In plain words
What is it for?
Use them when maintaining RemoCLI, identifying its active USB, LAN, tunnel, or public mode, checking the gateway or agent, generating deployment configuration, or following troubleshooting documentation.
Why use it?
They provide a fixed order for diagnosing connection and login problems, starting with the gateway and agent before investigating the client. This helps identify which layer is actually failing.

Instructions file for CodexOpenCode

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add instructions/whulxc/remocli/agents-md
Clone the repo
git clone --depth 1 https://github.com/whulxc/remocli

Made for: Codex, OpenCode.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for remocli AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/whulxc/remocli/agents-md.svg)](https://agentmods.dev/instructions/whulxc/remocli/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/whulxc/remocli/agents-md"><img src="https://agentmods.dev/badge/instructions/whulxc/remocli/agents-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 997 This file is loaded in full into every session.
When invoked 997 The same file — it is already loaded in full.
Security scan A 1 finding. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00997 $0.00997
Opus 5 $0.00498 $0.00498
Sonnet 5 $0.00199 $0.00199
Haiku 4.5 $0.00100 $0.00100

Measured 5d ago against content hash f30693d4f86d, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

remocli AGENTS.md scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

- `curl -sS http://127.0.0.1:8080/health`
AGENTS.md · 134 lines

How it starts

The opening of the file, as written. The whole thing — 134 lines — stays where its author put it; the contents beside it link to each section on GitHub.

RemoCLI Maintenance Guide

This repository is maintained as a Windows + WSL control plane for remote CLI sessions. Use this file as the default engineering context for new maintenance sessions.

What matters first

  • Treat the stack as four layers:
    • gateway
    • per-WSL agent
    • transport (USB, LAN, Quick tunnel preview, Formal public deployment)
    • Android/Web client state
  • For connection or login problems, always check layers in that order.
  • Do not start from app-side guessing when gateway or agent health is unknown.

Primary entrypoints

  • Gateway server: src/gateway/server.js
  • Agent server: src/agent/server.js
  • Frontend app: src/frontend/app.js
  • Android shell: android/app/src/main/java/com/remoteconnect/mobile/MainActivity.kt
  • Deployment config generation: scripts/generate-deployment-config.mjs
  • Public deployment notes: docs/public-deployment-modes.md
  • Troubleshooting: docs/troubleshooting.md

Default troubleshooting flow

1. Identify the active mode

  • USB direct
  • LAN direct
  • Quick tunnel preview
  • Formal public deployment

Do not treat the Cloudflare Access team domain as the application hostname.

2. Check the local stack

  • Gateway:
    • curl -sS http://127.0.0.1:8080/health
  • Agent:
    • node scripts/check-deployment.mjs <deployment-manifest>
  • Logs:
    • tail -n 80 data/runtime/gateway.log
    • tail -n 80 data/runtime/agent-*.log

3. Check the transport

  • USB:
    • adb devices
    • adb reverse --list
  • LAN:
    • test the Windows LAN URL from the host first
  • Formal public:
    • curl -I https://<public-hostname>
    • if 1033, check named tunnel state and logs

4. Only then check client state

  • Web page stale state: refresh once
  • Android stale state: reopen app once
  • Only use UI tree / logcat when:
    • the user says “still broken”, or
    • server-side state is healthy but phone behavior disagrees

Low-token maintenance defaults

  • Do not restate the entire README in every maintenance session.
  • Read AGENTS.md first, then only open files relevant to the active problem.
  • Prefer short status reports:
    • root cause
    • exact fix
    • validation
    • whether web refresh / app reopen / gateway restart / agent restart is needed
  • For repeat issues, reuse the same path:
    • mode -> gateway -> agent -> transport -> client

Read the full file on GitHub · 134 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago First seen · 134 lines · 997 tokens per session scan A f30693d4f86d

Subscribe to this mod's changes

remocli AGENTS.md is an instructions file published in the GitHub repository whulxc/remocli (5 stars, last pushed 5mo ago), licensed MIT. It adds 997 tokens to every session, about $0.0050 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.