Update maximum limit
https://github.com/cdown/sshrc/blob/46b92e29a11cfa867fcf0ecf7ac3b2a9374f87ce/sshrc#L10
This limit is in place because of $(getconf ARG_MAX), which is 1M on macOS12.3 (I'm using ARG_MAX / 2 in my own version), so the 64k limit could definitely be raised/adapted to the current ARG_MAX.
Now the script also has some spare parts, like also sending over the sshrc file: https://github.com/cdown/sshrc/blob/master/sshrc#L31-L32 Or creating a bashsshrc file: https://github.com/cdown/sshrc/blob/46b92e29a11cfa867fcf0ecf7ac3b2a9374f87ce/sshrc#L45-L58
I don't quite understand what use case would the CMDARG part be useful for but if you really need extra stuff in there, having multiple sshrcs and just symlinking the appropriate one in your wrapper sounds like a much more manageable story.
On my OpenSUSE and Ubuntu I get 2097152 as ARG_MAX and on my MacOS it's 1048576. This should definitively be fixed by someone (PR?) 👍🏼