SkillAgentSearch skills...

Rsc

RSocket Client CLI (RSC) that aims to be a curl for RSocket

Install / Use

/learn @making/Rsc
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

RSocket Client CLI (RSC)

CI

Aiming to be a curl for RSocket

usage: rsc [options] uri

Non-option arguments:
[String: uri]        

Option                                Description                            
------                                -----------                            
--ab, --authBearer [String]           Enable Authentication Metadata         
                                        Extension (Bearer).                  
--authBasic [String]                  [DEPRECATED] Enable Authentication     
                                        Metadata Extension (Basic). This     
                                        Metadata exists only for the         
                                        backward compatibility with Spring   
                                        Security 5.2                         
--channel                             Shortcut of --im REQUEST_CHANNEL       
--completion [ShellType]              Output shell completion code for the   
                                        specified shell (bash, zsh, fish,    
                                        powershell)                          
-d, --data [String]                   Data. Use '-' to read data from        
                                        standard input. (default: )          
--dataMimeType, --dmt [String]        MimeType for data (default:            
                                        application/json)                    
--debug                               Enable FrameLogger                     
--delayElements [Long]                Enable delayElements(delay) in milli   
                                        seconds                              
--dumpOpts                            Dump options as a file that can be     
                                        loaded by --optsFile option          
--fnf                                 Shortcut of --im FIRE_AND_FORGET       
-h, --help [String]                   Print help                             
--im, --interactionModel              InteractionModel (default:             
  [InteractionModel]                    REQUEST_RESPONSE)                    
-l, --load [String]                   Load a file as Data. (e.g. ./foo.txt,  
                                        /tmp/foo.txt, https://example.com)   
--limitRate [Integer]                 Enable limitRate(rate)                 
--log [String]                        Enable log()                           
-m, --metadata [String]               Metadata (default: )                   
--metadataMimeType, --mmt [String]    MimeType for metadata (default:        
                                        application/json)                    
--optsFile [String]                   Configure options from a YAML file (e. 
                                        g. ./opts.yaml, /tmp/opts.yaml,      
                                        https://example.com/opts.yaml)       
--printB3                             Print B3 propagation info. Ignored     
                                        unless --trace is set.               
-q, --quiet                           Disable the output on next             
-r, --route [String]                  Enable Routing Metadata Extension      
--request                             Shortcut of --im REQUEST_RESPONSE      
--resume [Integer]                    Enable resume. Resume session duration 
                                        can be configured in seconds.        
--retry [Integer]                     Enable retry. Retry every 1 second     
                                        with the given max attempts.         
--sd, --setupData [String]            Data for Setup payload                 
--setupMetadata, --sm [String]        Metadata for Setup payload             
--setupMetadataMimeType, --smmt       Metadata MimeType for Setup payload    
  [String]                              (default: application/json)          
--showSystemProperties                Show SystemProperties for troubleshoot 
--stacktrace                          Show Stacktrace when an exception      
                                        happens                              
--stream                              Shortcut of --im REQUEST_STREAM        
--take [Integer]                      Enable take(n)                         
--trace [TracingMetadataCodec$Flags]  Enable Tracing (Zipkin) Metadata       
                                        Extension. Unless sampling state     
                                        (UNDECIDED, NOT_SAMPLE, SAMPLE,      
                                        DEBUG) is specified, DEBUG is used   
                                        if no state is specified.            
--trustCert [String]                  PEM file for a trusted certificate. (e.
                                        g. ./foo.crt, /tmp/foo.crt, https:   
                                        //example.com/foo.crt)               
-u, --as, --authSimple [String]       Enable Authentication Metadata         
                                        Extension (Simple). The format must  
                                        be 'username:password'.              
-v, --version                         Print version                          
-w, --wiretap                         Enable wiretap                         
--wsHeader, --wsh [String]            Header for web socket connection       
--zipkinUrl [String]                  Zipkin URL to send a span (e.g. http:  
                                        //localhost:9411). Ignored unless -- 
                                        trace is set.                                                                   

Install

Download an executable jar or native binary from Releases.

To get rsc binary working on Windows, you will need to install Visual C++ Redistributable Packages in advance.

Install via Homebrew (Mac / Linux)

Homebrew

You can install native binary for Mac or Linux via Homebrew.

brew install making/tap/rsc

Install via Scoop (Windows)

Scoop

You can install native binary for Windows via Scoop.

scoop bucket add making https://github.com/making/scoop-bucket.git
scoop update
scoop install rsc

Install via Coursier (Mac / Linux / Windows)

Coursier

If you do not already have couriser installed on your machine, install it following steps given here: https://get-coursier.io/docs/cli-installation.

To install the graalvm binary do:

cs install rsc --contrib

To install the jvm binary (executable jar) do:

cs install rscj --contrib

Example usages

rsc --request --route=uppercase --data=Foo --debug tcp://localhost:7001
rsc --stream --route=hello --debug --take=30 ws://localhost:8080/rsocket
rsc --stream --route=searchTweets --data=Trump wss://demo.rsocket.io/rsocket

You can also send data via a file or URL using -l/--load option instead of -d/--data as follows

rsc --request --route=hello --load=./hello.txt --debug tcp://localhost:8080
rsc --request --route=hello --load=/tmp/hello.txt --debug tcp://localhost:8080
rsc --request --route=hello --load=https://example.com --debug tcp://localhost:8080

Enable shell autocompletion

rsc (0.8.0+) provides autocompletion support for Bash, Zsh, Fish and Powershell.

rsc --completion <SHELL>

shows the completion script.

rsc-completion

If you install rsc via Homebrew, the completion script is also installed under /usr/local/Homebrew/completions/.

Below are the procedures to set up autocompletion manually.

Zsh

Add the following to the beginning of your ~/.zshrc

autoload -Uz compinit && compinit

You now need to ensure that the rsc completion script gets sourced in all your shell sessions.

echo 'source <(rsc --completion bash)' >>~/.zshrc

Bash

the completion script depends on bash-completion.

on Mac

the completion script doesn't work with Bash 3.2 which is the default bash version on Mac. It requires Bash 4.1+ and bash-completion v2.

You can install these as follows

brew install bash
brew install bash-completion@2

Make sure bash -v shows 4.1+.

Add the bellow to your ~/.bash_profile

[[ -r "/usr/local/etc/profile.d/bash_completion.sh" ]] && . "/usr/local/etc/profile.d/bash_completion.sh"

You now need to ensure that the rsc completion script gets sourced in all your shell sessions.

echo 'source <(rsc --completion bash)' >>~/.bash_profile

on Linux

You can install bash-completion with apt-get install bash-completion or yum install bash-completion, etc.

Add source /usr/share/bash-completion/bash_completion to your ~/.bashrc.

You now need to ensure that the rsc completion script gets sourced in all your shell sessions.

echo 'source <(rsc --completion bash)' >>~/.bashrc

Fish

TBD (help wanted)

rsc --completion fish

Powershell

rsc --completion powershell | Out-String | Invoke-Expression

Log options

Default

By default, the data of the payload will be output (since 0.2.0).

$ rsc --route=add --data='{"
View on GitHub
GitHub Stars254
CategoryDevelopment
Updated3mo ago
Forks28

Languages

Java

Security Score

92/100

Audited on Dec 26, 2025

No findings