How can I configure IPython to issue the same "magic" commands at every startup?

You just need to use the magic in your startup scripts:

get_ipython().magic('cd ~/Dropbox')
get_ipython().magic('matplotlib')

Put that in the contents of your startup script and it should do the magic you need ✨✨


I just wanted to elaborate the Wayne's answer, but do not have enough reputation to do a comment. You can have the following in the start up script to run the required magic commands

from IPython.core import getipython

getipython.get_ipython().magic(u"%reload_ext autoreload")
getipython.get_ipython().magic(u"%autoreload 2")

Module reference is here Ipython module

To run the above start up at terminal, do this

ipython -i startup.py