Yes, you can use the command line to do this.
more info here:
http://www.red-gate.com/supportcenter/c ... _in_the_cl
use /db1 and /server1 to specify the source
use /scripts2 to specify the target
use /sync to sync to the scripts
And use your source control command line tool to commit to your repository. You'll have to consult the source control tool's documentation to achieve this.
Why is it that you wish to do this?