Creating a new frames project
We will use bun and frog for building the cast action in this guide, but feel free to use framejs, onchainkit, or anything else as well! Enter this command in your terminal to create a new app:index.tsx
and update the Frog instance to use neynar hubs and make sure to update the api key so that you can get analytics for your frame and cast action!
Creating the add cast action frame
Firstly, let’s create the home screen frame that will link to adding the cast action. So, head over to theindex.tsx
file and update the /
frame to this:

Creating the cast action
The frog instance provides us with a.castAction
which can be used to create new cast actions like this:
/get-cast-hash
route which will return a new frame linking to /cast-hash
. In the last object, you can change the name and icon of your cast action and add a description as well!
Now, let’s create the frame that the cast action will return.
Creating the cast hash frame
Create a new frame on the/cast-hash
route like this:
frameData
object and displays it.
Now we can go ahead and test our cast action. But for that, you need to host your server somewhere, for local development you can use ngrok.
If you don’t already have it installed, install it from here. Once it’s installed authenticate using your auth token and serve your app using this command:

