How to pass command line arguments to a rake task

I have a rake task that needs to insert a value into multiple databases.

I’d like to pass this value into the rake task from the command line, or from another rake task.

How can I do this?