So, I have this example written by AI and I wanna test it
now. Now, I'll need an OpenAI API key loaded as an
environment variable. So as a first step, I'll create such a key
in my OpenAI API dashboard. I'll create a new
secret key. I'll name it Cursor Demo and click Create secret
key... (pause) and copy
that. You don't need to remember it, by the way.
It will already have been removed by the point of time you are viewing this.
Now, I wanna load that key from a dot env file,
file, and in there add an OpenAI API key
key. And now I just need to make sure that this dot env file gets loaded.
Now, I could ask the AI here, but there is a
trap into which you can easily fall.
You can easily get into the mode of letting the AI do everything.
But don't forget, you're a software developer.
You know how to write code, right? And loading a dot env file in a
Python project is super simple. I don't need AI help for that because I
know that I simply need to install the Python dot env module
with UV ads since I'm using UV. And then from dot env,
I import load-env and call that. And I even got some AI help
here through Cursor's tab completion.
But yeah, this is not something where I would've
By the way, I can see I still got one other file to
review where I also wanna accept those
changes. But with that, we're now loading
this... (pause) And with all that, we can then run this main.pwa file and
hopefully read that post and get an X post as a
result. So looks like it's done. Now in outputs, I
got post.txt with a nice post that
hopefully works well on X.