@Maverynthia Yes, but the Twitter and Mastodon APIs are slightly different. It's not just a matter of connecting to a different server.
This little script looks best suited to what I've used before: https://github.com/decklin/tusk
There are some clients listed as "CLI" on https://github.com/tootsuite/documentation/blob/master/Using-Mastodon/Apps.md , but those are interactive terminal-based clients, not actually CLI, so not really useful for building a bot on top of.