FTDI + ESP8266 [Need to use AT Commands] without Arduino

Hello Everyone,

I am trying to write a standalone ESP8266 code so that it can communicate to wifi and change it's states. For this, What i want to do is to send some command "AT+CWMODE=1" or "AT+CWMODE=3" to ESP8266 via code and toggle them on push button tap.

So, like in Arduino there is a Serial.write which writes on a serial monitor via SoftwareSerial class.

But when I am sending Serial.write("AT+CWMODE=1") it prints on monitor as a string rather than changing the wifi state.

Is there a way to send AT commands without using Arduino chip software serial pins?