Can I copy a file to iCloud drive from the command line?
iCloud Drive directory is located here:

~/Library/Mobile Documents/com~apple~CloudDocs


There are some other directories listed inside Mobile Documents, their names depend on the app which owns them. For example: com~apple~Pages/.