Keyword Search through CLI

Can we do a keyword search using command line interface? If not i am trying to download a file through a bot and run analysis on that using autopsy , how can i use python to run a keyword search on a file?