remote
SSH tunnels, ngrok, and remote access management
What this skill does
# Remote - Complete API Reference
Manage SSH tunnels, ngrok exposure, and remote access to your local Clodds instance.
---
## Chat Commands
### Create Tunnels
```
/remote tunnel ngrok 3000 Expose port via ngrok
/remote tunnel cloudflare 3000 Expose via Cloudflare
/remote tunnel ssh 3000 user@server SSH tunnel
/remote tunnel localtunnel 3000 Expose via localtunnel
```
### Manage Tunnels
```
/remote list List active tunnels
/remote status <id> Check tunnel health
/remote url <id> Get tunnel URL
/remote close <id> Close tunnel
/remote close-all Close all tunnels
```
### Port Forwarding
```
/remote forward 8080:localhost:3000 Local port forward
/remote forward remote 3000:server:80 Remote port forward
```
---
## TypeScript API Reference
### Create Remote Manager
```typescript
import { createRemoteManager } from 'clodds/remote';
const remote = createRemoteManager({
// ngrok auth
ngrokAuthToken: process.env.NGROK_AUTH_TOKEN,
// Cloudflare tunnel
cloudflareToken: process.env.CLOUDFLARE_TUNNEL_TOKEN,
// SSH key
sshKeyPath: '~/.ssh/id_rsa',
// Auto-reconnect
autoReconnect: true,
reconnectDelayMs: 5000,
});
```
### Create ngrok Tunnel
```typescript
const tunnel = await remote.createNgrokTunnel({
port: 3000,
protocol: 'http', // 'http' | 'tcp' | 'tls'
// Optional
subdomain: 'my-clodds', // Requires paid plan
authToken: process.env.NGROK_AUTH_TOKEN,
});
console.log(`Public URL: ${tunnel.url}`);
console.log(`Tunnel ID: ${tunnel.id}`);
```
### Create Cloudflare Tunnel
```typescript
const tunnel = await remote.createCloudflareTunnel({
port: 3000,
hostname: 'clodds.example.com',
token: process.env.CLOUDFLARE_TUNNEL_TOKEN,
});
console.log(`URL: ${tunnel.url}`);
```
### Create SSH Tunnel
```typescript
const tunnel = await remote.createSshTunnel({
localPort: 3000,
remoteHost: 'server.example.com',
remotePort: 80,
username: 'deploy',
privateKey: fs.readFileSync('~/.ssh/id_rsa'),
});
console.log(`Tunnel established`);
console.log(`Access via: ssh -L 3000:localhost:80 [email protected]`);
```
### List Tunnels
```typescript
const tunnels = remote.listTunnels();
for (const tunnel of tunnels) {
console.log(`${tunnel.id}: ${tunnel.type}`);
console.log(` URL: ${tunnel.url}`);
console.log(` Port: ${tunnel.port}`);
console.log(` Status: ${tunnel.status}`);
console.log(` Created: ${tunnel.createdAt}`);
}
```
### Check Status
```typescript
const status = await remote.getStatus(tunnelId);
console.log(`Status: ${status.status}`); // 'connected' | 'reconnecting' | 'disconnected'
console.log(`Uptime: ${status.uptimeMs}ms`);
console.log(`Bytes in: ${status.bytesIn}`);
console.log(`Bytes out: ${status.bytesOut}`);
```
### Close Tunnel
```typescript
// Close single tunnel
await remote.closeTunnel(tunnelId);
// Close all tunnels
await remote.closeAll();
```
### Event Handlers
```typescript
remote.on('connected', (tunnel) => {
console.log(`Tunnel connected: ${tunnel.url}`);
});
remote.on('disconnected', (tunnel) => {
console.log(`Tunnel disconnected: ${tunnel.id}`);
});
remote.on('error', (tunnel, error) => {
console.error(`Tunnel error: ${error.message}`);
});
```
---
## Tunnel Types
| Type | Best For | Requirements |
|------|----------|--------------|
| **ngrok** | Quick testing | Free account |
| **Cloudflare** | Production | Cloudflare account |
| **SSH** | Secure access | SSH server |
| **localtunnel** | Free, temporary | None |
---
## Use Cases
### Expose Webhook Endpoint
```typescript
// Expose local server for webhook testing
const tunnel = await remote.createNgrokTunnel({ port: 3000 });
console.log(`Set webhook URL to: ${tunnel.url}/webhooks/trading-signals`);
```
### Remote Bot Access
```typescript
// Access bot from phone while at home
const tunnel = await remote.createCloudflareTunnel({
port: 3000,
hostname: 'clodds.mysite.com',
});
// Now access at https://clodds.mysite.com
```
---
## Best Practices
1. **Use Cloudflare for production** — More stable than ngrok
2. **Secure with auth** — Don't expose without protection
3. **Monitor connections** — Watch for disconnections
4. **Close unused tunnels** — Don't leave open indefinitely
Related in General
modeling-omnistudio-epc-catalog
IncludedSalesforce Industries CME EPC product-modeling skill for Product2-based catalog creation. Use when creating EPC products, configuring product attributes, building offer bundles with Product Child Items, or reviewing EPC DataPack JSON metadata for product catalog changes. TRIGGER when: user creates or updates Product2 EPC records, AttributeAssignment payloads, AttributeMetadata/AttributeDefaultValues, Offer bundles, or ProductChildItem relationships. DO NOT TRIGGER when: designing OmniScripts/FlexCards/Integration Procedures (use building-omnistudio-omniscript, building-omnistudio-flexcard, or building-omnistudio-integration-procedure), implementing Apex business logic (use generating-apex), or troubleshooting deployment pipelines (use deploying-metadata).
relationship-science-coach
IncludedUse this skill for direct, practical adult relationship coaching: couples conflict, repair, trust, marriage, dating, flirting, attachment patterns, emotional connection, sex, desire differences, eroticism, kink negotiation, affection, love languages, breakups, and long-term passion. Draw on Gottman, EFT and Hold Me Tight, attachment science, modern sex research, Perel, Nagoski, Kerner, Schnarch, Love and Stosny, and flexible love-language tools. Be concrete and low-hedge. Redirect only for imminent danger, abuse, coercive control, minors, non-consent, self-harm, stalking, or medical/legal/psychiatric decisions.
building-sf-integrations
IncludedSalesforce integration architecture and runtime plumbing with 120-point scoring. Use this skill to set up Named Credentials, External Credentials, External Services, REST/SOAP callout patterns, Platform Events, and Change Data Capture. TRIGGER when: user sets up Named Credentials, External Services, REST/SOAP callouts, Platform Events, CDC, or touches .namedCredential-meta.xml files. DO NOT TRIGGER when: Connected App/OAuth config (use configuring-connected-apps), Apex-only logic (use generating-apex), or data import/export (use handling-sf-data).
venue-templates
IncludedAccess comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.
let-fate-decide
IncludedDraws the 12 Houses of the Zodiac Tarot spread to inject entropy into planning when prompts are vague, ambiguous, or casually delegated. Interprets the spread to guide next steps. Use when the user says 'let fate decide', 'YOLO', 'whatever', 'idk', or other nonchalant phrases, makes Yu-Gi-Oh references, or when you are about to arbitrarily pick between multiple reasonable approaches. Prefer over ask-questions-if-underspecified when the user's tone is casual or playful rather than precision-seeking.
net-ops
IncludedCross-platform network troubleshooting (Windows, macOS, Linux) via local or remote shell. Use for: DNS broken, can't resolve hostnames, nslookup/dig works but apps fail, NRPT, WFP, scutil, /etc/resolver, systemd-resolved, /etc/resolv.conf, NetworkManager, VPN DNS leak residue (ProtonVPN/Mullvad/WireGuard/AnyConnect), AV/firewall blocking DNS or DoH, Tailscale DNS interaction, intermittent connectivity, remote diagnostics over SSH.