I'm sorry, I didn't read your question exactly. I don't know of a tool that can access the keychain via ssh directly. You would have to login a user to the console to later allow access to the keychain. Both of this can be done with
osascript.
Which app needs a command-line to work properly? What do you want to do?