Syntax Video
Vibe Off: First to Post Wins (No Code Allowed)
Transcript
Welcome to the first ever vibe off. We're vibing off over here at syntax. We're going to be vibe coding to see who could be the first person to post to the syntax Twitter as well as the syntax blue sky using only vibe coding. We have just env variables ready to go. Other than that, all we're able to do to get this thing working is to prompt it. It can be anything from an app to a CLI.
Who knows what we're going to build. The first person to post our name to the Syntax Blue Sky or Twitter X whatever is the winner. Guys, are you ready to vibe off? Hold on. No, I'm not. I Sorry, I'm having troubles. Guys, are you ready to vibe off? I'm ready to rock.
Let's do it. The first thing is I'm going to try to post directly to uh Blue Sky because I know that's pretty easy. So, there is a library. It's the AT Proto API library. This makes it super easy to post to Blue Sky. So I'm going to say uh set up this folder as a pnpm project. Then install this library from npm with pnpm. We are going to write a simple script that makes a post to blue sky using our credentials in thev file. Use context 7 mcp or docs if needed. Let's go.
All right. First thing I'm doing is actually popping up open code. Actually, the first thing I'm doing is making a spelt project. So, we're going to do npxsv create tweet. Do I need a whole bunch of extra stuff? No. Minimal. Uh, yes. TypeScript. Hey, what's up? Real quick, you're going to see me run some commands within Open Code. These are actually part of a project that I've been working on called Dalton. It's just a bunch of agents that talk to each other. Uh, sometimes well, sometimes not so well. If you want to try, you can just dump them in your open code.
Otherwise, uh just in case you're going to be a little confused about what I'm doing, uh that's that's what's going on. You'll be able to see just how well it works out for me. Now, the goal for this should be to get this going as fast as possible. So, I'm going to have a command here. The first command that I'm going to be running is init project meta. And this project is going to be something that post to Twitter and Blue Sky with API via spelt kit. Okay, the project's been created. Does this project need this kind of structure? I don't know. We're going to see. I'm using GPT5. I'm using agents. I'm using sub aents. I'm using all kinds of stuff.
Oh no, I'm in the wrong. No. No. Uh, I wasn't in the right directory. Oh no. Okay, let's uh tweet CD tweet. Okay, open code. I'm going to try to use open code on mine. So, what I'm going to do is I'm just going to I'm not going to install any APIs or anything like that. I'm going to try to do it straight with a fetch request. So, create a Node.js JS script that will run a fetch request to the Twitter API to make a post that says Wes is the winner. There is a bearer API key in thev file called Twitter_bearer token. So I'm using Grock here which I'm hoping Grock code will make it better.
There we go. Okay, run it. Unsupported authentication. Uh-oh. The script ramp. A failed Twitter app lacks write permission. Update the app to read or write in the Twitter developer portal. Then regenerate the access tokens if needed. Uh-oh. Do we need to do that? That means the other guys are going to have this this problem as well.
Oh, it overwrote my ENV. What the heck? Dang it. Come on, AI. Okay, project initialize. While that's I'm going to prepare the next command, which is road map synthesize. Road map synthesize is going to say goals. The goals are going to be post to Twitter, post to blue sky, post to X. Envi
the ENV names, they are blank. So what I did with the road map synthesizer, first it's going to we have a planning folder that was created. We have phases. We have uh hopefully it's going to create a road map for us right now. And after it creates a road map like this is what I'm telling you. I I'm going to do this in a very structured manner.
Created with readonly permissions. Oh [ __ ] Okay. I have to change that. Um I'm going to put my headphones on. Maybe they can hear me. Guys. Guys. Okay. Listen. The the Twitter API token is read only. So we have to figure out how to make that right. Well, you can use the client ID and secret to with OOTH to get a writable token.
Really? Okay. You should be able to. Yeah, I sorry. I I just re regenerated the tokens hoping it would give me a checkbox for that. So, I have new tokens for you now. I'm going to put them in. Yeah, my my my AI wiped out my entire V. Anyways, so I haven't even gotten that far yet. So, okay. Okay.
Okay. So, uh are the new ones in here yet? I just put them in. Okay, they're ready to go. Yeah, continue on. Okay, back at it. Uh, first of all, Wes had to create new environment variables anyways. But, okay, so it's creating. I'm going to hit accept. So, what I'm doing here is instead of actually coding, I'm really just giving it all this. We're going to turn off auto mode and we're going going to go to max mode cuz we want to make sure that this thing gets this stuff right. Um, but let's see what the code what code it's written.
So, it's going to it's going to log in. It's got my handle, my password, and then the text. What is the text to blue sky post to blue sky need to do two requests one with the blue sky handle and it regard now another thing I'm going to do here is just to get this going I'm going to actually um since we're already here I'm going to npm install and I'm going to npm rundev just to get Okay. Yeah. So, it's going to run the script. Hello from CJ w3CJ.com.
Success. Is it there? Yes. Did it. Okay. So, we got we got blue sky. Um, now let's work on posting to Twitter. Okay. Successfully posted. Let's see. Did I win that one? Do something very similar. So, oh [ __ ] CJ beat me by like 10 seconds. Okay.
Uh, it's creating these these documents which are these phase documents. Okay. So you think like why do I need phases for this? It's mostly just to keep things organized. Epic crossost to Twitter secrets config management. Um sure whatever. Let's just do it. The next one I have is going to be implement next task and we're going to see how this goes. So the what the implement next task is doing is it's going off and looking at the next task that has not been completed which at this point is going to be list required ENV. Yes.
Okay. server only ENV reader, which I don't know why it needs this, but again, this is vibe coding for you. I I think this is making this all way too complex, which is one of the things that this this way will do this, but um at the end of the day, sometimes um you like complex, sometimes you don't. Okay, I think we lost my screen recording for a second, but all I've done is updated that av. We got it to post. And if we look on uh blue sky, uh so yeah, I beat West to it by like 15 seconds. Okay, so now we need to do Twitter. And I'm writing my prompt. So, we're going to write a simple script that makes a post with the Twitter API. We have these variables available to us. I'm going to put all of those in. And then, um, I know that we're going to need to use, uh, the client ID and secret to actually get a token. We're going to use this library. We will use the library from npm and we'll say when we have a working O token, we will tweet like this. Hello from CJ at coding garden smiley face.
We'll say we will need to log in via ooth to get a token we can post with. If the library does this set it up so we can log in and use that token to post.
Okay, let's let it rip. Okay, now do it for Twitter. Come on, Grock. Don't you know what's going on here? Do I switch to cursor? Let's switch to cursor cuz cursor will at least like like it at least wants to help you. This is just like Sorry, I can't help you. All right, post tweet.
Um, let's see if cursor can This Node.js script is having trouble. Run it and fix it. You know what we got to do? We're turn on max mode called sonnet 4. I can't create the file. Yeah, you can. Well, you don't even need to. It's in there. Okay.
Updated the script. Test the updated script. No, I don't need an example env template. This is the problem I often have with with cursor or whatever. It just makes a whole bunch of [ __ ] and it just starts creating more and more code instead of actually fixing the code. There is already an ENV. There already is an EMV. And don't create an example. Just yolo it. Let's hardcode our EMV keys. I'm trying to win here.
Not trying to be safe. And of course, it can't find the env file keys or whatever. I gave you the keys. Infer keys from this hard code. Yeah, I guess accept. I'll accept it. It's asking to make some kind of directory for some reason of server folder. Sure, I don't care. Let's just go. Let's just go. Let's move faster, folks. I have this really intense workflow. Uh, but I'm not going fast.
You know, I should have used a faster model than GPT5, but all my agents are set up to use GPT5. So, how this is working is I have agents that are calling sub agents to implement things that know what they're doing. Um, the implement next phase is going to do the next thing, which is going to do the next thing. It says it cannot find the name process. Bro, just move it. Don't check things like that. Just get moving, [ __ ] Boom.
Uh, we'll see if that kicks it into gear here. A little name calling, huh? You know what? You when you overengineer solutions, you get overengineered results. And, uh, I certainly am overengineering a solution here. So, now you're just kind of watch this stuff. Yeah. Accept it. Wait. Search shell repo. The keys are already inv.
Typically, when you're doing this kind of stuff, you're not under these kinds of constraints. So what you can do is you can set up these documents and these plan documents. It can go through and take care of these um um plan documents as they go. Okay. So it it did did whatever it needed to do. Let's do implement next task. Okay.
This is this is most of this video is just going to be me sitting here waiting. Provide the app with permission guidance. No, I don't want permission guidance. It's not fixed. Go to settings, user authentication. That's not true. That is not true. Oh, yeah.
Baby, baby, baby. Client ID and client secret. Client ID. Twitter_client secret. Do I tell the guys that I I have these new things or do I just put them in here? I'll probably tell him, "Hey guys, I added client ID and client secret to it."
Uh, yeah, Scott still hasn't posted to Blue Sky. He might have tried going to Twitter first. Yeah. So, Wes hasn't posted. We still might be good. Okay, we've got post to Twitter. We're using Twitter API v2. Great. Uh, we have a tokens file. That's not going to work. We have a client ID and a secret. Oh, I see. So, it's going to save it to a file after it tries to refresh the access token. Yeah. So, Oh, yeah. So, this is beautiful. So, it's going to set up an OOTH server just running locally, serve up a page, and then when we go there, it's going to attempt to get back the token. That's going to write it to a file, and then it's going to be able to use that to actually make the tweet.
That's that's okay. This is what I wanted it to do because it needs to go through the OOTH flow to get that token so that it can then post. Let's run it to say hello from CJ at coding garden. Smiley face. I win. Okay, it's completed a lot of tasks here. Um, some of these tasks have the same name. P1. There's several P1s. Okay, let's add another implement next task. So, implement next task. Looks like what it's going to do is boot time presence friendly error aggregation. Sure, simple. Whatever. Um, app environment. If we're taking a look at the code this is written so far, um, you might be surprised what it's doing in here. It's creating the required keys which exist. No task ID was provided. I said next task implement next. Oh, did I say next? I might have said just task.
So, either way, we're getting the types of keys. We're reading the env for some reason, even though we're in spelt kit right now. It's just going to check to see if these enviables exist. Um, I think this is absurd. Whatever this is chosen to do here in the real world, I would like be very mad at this. Um, but hey, you know, we make the bed that we we make the bed that we lie in. I don't think that's a user didn't finish their message. I pasted it. This is OOTH 2.0.
Switch to it as fast as possible. Don't yap when you have the answer. Come on. I got to win this. There's another approach where refresh goes. I don't care. I'm trying to win a game here. Just post a tweet, brother. Oh [ __ ] Did CJ figure it out?
Wait, did did Wes do it? I don't see it yet. So, where are we at? Let's check out this road map. This is vibe coding, folks. We're vibing here. Oh man, Wes is the winner. He already posted to Blue Sky. I'm like still reading ENV variables. Stop with the overengineering and get posting already. Bro, why are you doing so much? You're doing too much.
Now it's writing actual code because I yelled at it. Please click the following link to authorize. Is it legal for me to copy this link? Something went wrong. Keep all. Okay, run it. I'm not allowed I'm not allowed to type any code here.
Use spelt mcp to understand spelt kit envirs. And it's like it's it's trying to run SV. Why are you trying to run SV? We're already in a Spellkit project and you know that. See, I've already lost this. I I started with the overengineering where it's going to be like checking to make sure the ENV variables exist and stuff like that. You don't have Twitter client ID. You have OOTH 1.0 credentials. Let me switch back to OOTH 1.0. Oh my gosh, this this is vibe coding. It's just a a constant circle of awful. I could have I could have coded this like so much faster.
No. No. Okay, I'm going to tell it start fresh. Use only the Twitter client ID and Twitter client secret. I can I can hear that CJ and them are trying to set up OOTH servers to get to get these keys. I think you can do it without it, bro. What the f are you doing? Sure.
Yeah, I guess so. You didn't need to do that, but you're doing it. So, congratulations, I guess. Happy for you. How do I open the terminal? How do you see all of the other open terminals? This is just user error at this point. I can't even I can't even um how do I focus this terminal? I swear I I don't know if if this is like running in a different mode, but it used to be that when it would run a command, you could say like attach to terminal because like I'm not even seeing a tab opening like with those just run everything. It's going to change it to use port 30001. I guess that's fine, but um I just need it to to actually run so I can click on it. How many spots did it have port 30001? Oh man, it should have used variables for this. That's ridiculous. This ooth flow is always so frustrating.
Unsupported authentication. Are you dumb? Are you dumb? Add Twitter refresh token to yourv. Where do I get that? Where do I get the refresh token? I am not allowed to look or copy up. Oh, you got to do this. Get authorization URL. Exchange it for tokens. I have the callback URL. It is syntax.fm.
Please make it for me. Yeah, we're going to have to get the token here. I thought we could get around it. Please run it for me. I cannot do any of this. Twitter app ID, but the script is looking for Yeah, you see the issue. Ah, I see the issue. That's all you say. Okay, so it actually seems like it's doing something. So, right now, all it needed was a little kick in the pants. It still seems like it's Bro, don't worry about TypeScript. Uh, okay. It's worrying about Typescript. Why do you need a function for this export? And there's two functions. You made the same function twice. Why not just import the env from spelt kit envider
env stuff. Okay, I can't edit this file. That's actually the frustrating thing about vibe coding. You're just Well, I mean, you can uh in real life. Okay, nobody's posted to Twitter just yet. Uh, which I I haven't even posted a blue sky. It seems like they all just went to one. I'm doing both at the same time. When I say when I do when I'm saying I'm doing both to the same time. I mean, I'm not doing anything because nothing is working yet. If this doesn't work, I think I know what I can tell it to do.
Yeah. Okay. Instead of having me click the link, use the Mac OS open command with the URL so it autoopens it. Great idea. Of course, it's a great idea. I said to do it. So, yeah, we're going to use exec. No, don't use a different port. Kill the process using port 3001. Cursor is just not good today. Like, it's doing just the worst things. I don't I don't know, man. This is funny. We're not allowed to run We're not allowed to run uh commands, but they didn't say that the AI couldn't run commands. So, we're going to see if this works. Um, make a button to post. Happy to trigger it, but I need two confirmations. Exact string is Scott.
Both providers. Yes. Proceed, [ __ ] Ah. All right. Has anybody posted to actual Twitter yet? That's my only hope, folks. It's generating. It's doing something. I told it to post. Let's see. It's curl post. Okay. It's building.
Failed to connect to bro app is already running at 5173. Try again. Oops, something went wrong. Scott posted to blue sky. Okay. And let's see about Twitter. Scott's on blue sky. Great. Okay. Um, the XL OOTH tweet cannot tweet. Needs user context to write. I was told that's not true. I was told that's not true, but I forget why.
We have access secret token bearer, API secret, API key, and app ID. You can post. Something went wrong. You weren't able to give access to the app. Go back and try logging in again. I think there's a problem that we're all trying to authenticate the same app and we're all overwriting each other's refresh tokens.
This is not a good idea. Okay, you know what I'm going to do? Let's let's change our our entire approach here. This is this is like classic programming. You're just like you're way you're way too far in now. You're rethinking. There's like this like sketchy one that I'm using on my website.
Where is my package? JSON. What is it called? Rewit API. Okay, I'm going to tell it I'm going I'm going back to to open code. Open code. Create a file that will post to Twitter. Wes is the winner.
Use the EMV file for all creds if you need it. Use the retweet npm package. Install it please.
What's going to be funny about this is if I accidentally keep posting to blue sky since mine posts to both cuz it does look like it's sending another post to blue sky. Uh we do have a second Scott. A second Scott has arrived. I think I get double po double uh points for that. Let's stop posting to blue sky. Just post to X. You are wrong. We need to figure this out.
I don't think I can use any of these API tokens. I think I might need to API must be obtained by using a browser extension described in the readme. Oh no. Um so something went wrong. Let me debug that. You need to check these settings. OOTH 2 settings. Make sure OOTH 2 is enabled. Ensure it has read and write permissions.
Simpler alternative, use OOTH 1.0. No, do not use OOTH 1.0. We already know that we can't do that. We cannot use OOTH 1.0. Make a plan. Give me some options on how to fix. Do not write any code. Okay, I am just going to double check the app settings to make sure that it can do readwrite access. Wes did set it up, but let's just double check. Users can authenticate with read and write access.
Oh, we need a callback URL. So, I'm going to add that there. And yeah, it just said there could be a redirect URI mismatch. Let's just say I added as a redirect URI in the dashboard. Can we try again? Okay. How do we get the API key? Okay. So, authentication install the X off hyper extension. After successful login while still being Twitter X, click copy. All right, I'm doing it. I'm doing it.
I might be breaking some of the rules here. But I don't think that these guys are going to get it. I think there's a fundamental issue with us all trying to use the same OOTH tokens. Don't you don't need to verify. Let's do OOTH auto. Let's do OOTH ASAP.
Yeah. So, it's going to do sequential thinking. So this is an MCP tool that prompts it to do like at least four steps of thinking to actually work through the problem. It what's interesting it's like it's going off and doing some stuff. It is funny that I created this road map and then abandoned it immediately. Uh Scott's creating a road map what a loser successfully posted is the correct format since you added it to the dashboard but it's failing. The issue is this is the problem with the these APIs.
Sometimes it's easier just to to hack it. Profile. Let's double check. Boom. I'm the winner. I'm the winner. I think it is over there celebrating. [Music] Let's see. I just want to check really quick cuz we're so close. We're so close. the Twitter API for some good reasons they take it down because they they make it very hard to actually use because it is used by spammers and whatnot. However, sometimes it is easier instead of going the right way in life just to to go the wrong way which is using some sketchy third party API. I'm pretty sure that the guy that making this is is doing some bad stuff on the internet.
Um but man, that worked really well. So, I'm just going to sit here and chill while these guys try to figure out their oath problems. Ending. Hello. Yes. Did you guys not get it yet? Cursor sucks today. Let me just say that. It is doing absolutely everything wrong. They changed their UI. I don't know how their uh consoles and terminals work anymore, but I was really close.
Okay. But I I'm really curious, Wes, did you have to use callback URL? I I think the OOTH flow was messed up because we were all trying to do it at the same time is every time I tried to get the call back URL, it just like logged me out. Um, so out of sheer frustration, I scrapped the entire OOTH flow and went dark and I did it and cheated. Okay.
Yeah, it's not cheating. Are you kidding? I got it. I got the the job done before you knucklehead. There was a list there was a list of constraints, but What? What did the constraints say? Okay, let's just read through them again to see if Did Wes folks, did Wes violate the constraints? Okay, read through them. Read through them, please. Number one.
Number one. Uh, no. No direct code edits. No command line. Uh, nope. No copy paste except forv. I copy pasted. Yes, I I had to add it. Yeah, I think you copy pasted your actual token value into yourv.
Yeah, which is which is allowed. Um, okay. Is there no copy paste except for what did I do? I copy paste it intov. No, from the initial from the initial env. From the initial. Yeah, we all have to have the same env token.
Uh, CJ CJ's bot overwrote his thing. So by that account, no, I paste I repasted it. I repasted the the original one. Yeah, cuz it's a copy paste. That was the most frustrating thing in the world. Cool. Do we want to share what code we came up with? I'd love to see what what you did.
Quote it with credit and a link. Quoting Syntax