Person/Omer Hamerman/YouTube/26/07/The Holy Grail of Code Review TUIs/Video
- 00:00 Did you see this tweet? Mitchell casually talking about enjoying Fable and naively being asked the most vibe quarter question of all times. What metrics he's using to measure quality leading
- 00:09 to this sophisticated response. As you can see, lots of people enjoy that and it caught a bit of a fire. The problem in my eyes is that this obvious conclusion in this day and age is
- 00:20 actually triggering to some. So, we've established the problem. But what if you could review a pull request from terminal, leave inline comments like you would on GitHub, and then actually
- 00:30 push those comments back to GitHub for a proper review without ever opening the browser. That would make reviews much easier to many of us. That was the one thing missing when I looked at Hank,
- 00:41 the diffu that gave us the same experience. But once you want the review to live where the team lives, [laughter] you hit a wall. So when I saw tweaker, pronounced tweaker, I got curious. On
- 00:51 paper, it ticks all my boxes. Single binary, Vim motions, works with Git, JJ, and even Mercurial for the three people in the comments already typing. Finally, and the big one, it can submit
- 01:01 a real GitHub and GitLab review comments. Since every AI coded project now arrives with six file changes, four todos, and hidden helper function, I wanted a review tool that doesn't just make the
- 01:13 diff pretty. I needed inline comments, range comments, review state, agent friendly export, and then I want to see those comments show up on a real PR. In this video, we'll install it, review
- 01:24 local changes, make an agent readable review, open an actual GitHub PR from the terminal, and see if submitting comments from a TUI is as good [music] as it sounds. Spoiler alert, this one's a game changer, and I'm not saying this lightly. Let's get into it. [music]
- 01:44 Well, well, well. Code review in your terminal. I was just raving about hunk few weeks ago. Beautiful tuy, cool features, but for whatever reason, it's focused around diffs. [music] In the comments left on code, you can't share them or push them to GitHub. Tweaker,
- 02:00 which I know they want me to call it Tweaker. I don't know if I can at this point, is mostly built around being able to review and collaborate on code changes. You add a suggestion or an issue
- 02:11 or a bunch of other options and move on. This once pushed makes a great way to collaborate with you know who. But wait, some goodies. GitHub style diffs all the way down. We like that. It supports
- 02:23 JJ. Yeah. Yeah. Keep your comments to yourself. And it comes with a skill making it unbelievably useful for reviewers. We'll get to that. You can play with the themes to test them right in the Oh
- 02:34 my eyes. Sorry about that. Anyway, as advertised, supports GitHub by submitting a review lets you easily copy text to the clipboard as markdown and making your life a bliss when you're trying to
- 02:46 find order in the chaos that is modern AI written code. Oh, look, a comparison with Hunk and others. Naturally, we're looking at the missing push to GitHub. Hunk actually does support Votions
- 02:58 out of the box. Maybe not as specific as Tweaker. I'll give it that, but still. And uh yeah, you're probably not here for the mercurial support. I think I hope. How is this back in fashion again?
- 03:11 Anyway, [music] closing in on a thousand stars. It's definitely in its early days and as such will lead to many people to assume and comment its vibe coded slot. Rest assured, not only this project is
- 03:23 already sponsored by large names, the dev behind it is a Cornell graduate with 10 years under his belt of serving as a staff engineer at LinkedIn and a Confluent all the way to now doing his own
- 03:34 thing. Yes, it's written in Rust and yes, I told you it's pronounced Tweaker. Cool. It's terminal time. Everything starts with a curl and voila, Tweaker's bin is here and it's ready to go in any
- 03:46 type of version control project. I never read instructions, hence the error. So, Twicker in my Telegram bot project pops an odd first screen with commits, a list of locally available commits
- 03:58 from different branches, too. Hit one and you're in. You get the familiar diff viewer with syntax highlight and an honestly improved highlights of changes. Best I've seen yet. Hit question
- 04:08 mark to pop the help menu for nav options and more. Back to our terminal. Tweaker TUI is basically the same thing as running the binary itself. While hyphen W pops the local changes for
- 04:21 review. Let's create such a change in the rhymi for example. Run it again and the changes are now marked in green. Hit C to add a comment which defaults to a note. So everything looks great,
- 04:33 but it's not something you haven't seen before. Again, Hunk [music] kind of lets you do the same. It may not be as fancy, but still. But here's where Tuicr starts revealing its review nature
- 04:44 rather than just another diff tool. It knows your PRs, literally the way everyone and their grandma share code for review. Finally, a tool that just reads the change from the platform. Pick a change,
- 04:56 done reviewing, hit R, and it's folded and marked as reviewed. Keep going till you're done or reopen Hungs to go back and check them again. Already making this GitHub experience way better.
- 05:08 Let's talk about database clients for a second. If you're like me, you probably have a weird mix of tools. pgAdmin for one thing, DBeaver for another, maybe some random SQL client you installed three
- 05:18 years ago and forgot about. And then there's the really fun part - database credentials sitting in config files, local keychains, notes, .env files. You know the drill. KeeperDB is cleaning that
- 05:29 up. It's Keeper security's secure, multi-protocol database management tool that supports the major players. PostgreSQL, MySQL, MariaDB, SQL Server, Oracle, Redshift, SQLite, all from one interface
- 05:40 within the Keeper platform. But the interesting part is not that it's just another SQL interface. Credentials are encrypted and delivered from the vault at connection time instead of being
- 05:50 stored locally. And if you're using KeeperPAM, database sessions can be governed, audited, and tied into proper access controls. There's also KeeperAI built in. It's a scope guarded co-pilot
- 06:02 that lets you ask questions in plain English. generate SQL statements with schema context, explain existing queries, and even look at performance issues. All while requiring your explicit consent for any data changes. So instead of database access being this messy
- 06:17 dev side problem, KeeperDB turns it into something teams can actually manage. KeeperDB is available as an embedded session for KeeperPAM users and as a standalone desktop app for Mac OS, Windows, and
- 06:28 Linux. You'll find the link in the description to get started. Now, back to the video. If it wasn't clear until now, the bottom menu keeps suggesting relevant motions. Let's add another comment where
- 06:39 we can now have another small suggestion menu in line. This tells us tab or shift tab toggles the type. [music] There's note, suggestion, issue, all colorcoded and can be extended or limited in the
- 06:52 config that we'll see later. There's even a praise option [music] when you want to show your master, I mean AI colleague, some love. It's worth noting that shift C will add a global note as
- 07:03 in [music] a comment attached to the entire file rather than a single line. Now check this out. You can control S to save or col W. Yes, my Vim friends, this and literally every other options
- 07:14 are available to you via command mode. Just like Nvim, you'll note a path where the review session is saved to. If you run a review list, you'll get a non-human readable JSON that doesn't seem like
- 07:26 it's designed for daily use. Pop it again. And while you'll know that we've been looking at the local tab of the UI with local commits, we can now switch over to the pull requests other tab.
- 07:37 It'll well pull the pull requests. Hit 138 again. And there's our session with the saved comments. Let's make some room and hit tab to toggle what's called a focus panel. Basically, a file tree and
- 07:49 a small comment box with the stuff I've added in the review, also colorcoded by type. You can hit Y to yank the review. And if you pop any noteaker and paste it, you get a title and even
- 08:00 a message saying, "I've reviewed your code. Here are the comments. Please address them." Hilarious, but genius. But here's the real essence. [music] Once we're done reviewing, it's time
- 08:10 to collaborate. Colon submit opens the push review to GitHub menu where you can pick the same options you're probably already used to. Do note that this is using GH GitHub CLI under the hood and you do
- 08:23 want it present as well as being authenticated with the repo you're pushing on naturally. Oh, and this also works with [music] GitLab, which is great news. Handling merge requests as inline
- 08:34 comments and this requires you to have GLAB, which is GitLab's own CLI. There's a dedicated doc for GitLab users should you need it on GitHub. So, talk is cheap. Let's walk the walk and test a real
- 08:46 bug fix workflow and whether it fits nicely into my daily work with my own project. I almost always start with work trunk handling my work trees. More on that on a separate video. Google DevOps toolbox
- 08:58 work trunk should you need it. So work trunk switches to a new tree. I'll open pi and ask for a quick fix to a bug I currently have on my app and send it on its way. Once the changes are ready and
- 09:11 reviewed, I'll pop the submit menu again. We're told everything's been submitted to GitHub for review. So, let's open the PR there. And look at that. My comments are pushed. Not quite what
- 09:22 I expected with the general file comment. This one may be Twicker's internal option. Regardless, review is submitted and we can easily collaborate on changes now without having to mess with GitHub
- 09:34 itself. I do want to say that for the management of PRs, issues, notifications, and everything around GitHub's project life cycle that doesn't have to do with code reviews. I'm a big GH user. I
- 09:45 have a video covering that as well on the channel. So, if you're bringing code reviews to your terminal, might as well top that with a proper TUI for GitHub. Run GH. There's our PR. And while
- 09:56 you can take a bunch of life cycle actions here from reviewing changes, summary, and everything you could on GitHub, the really cool bit is its custom actions where we can now integrate with
- 10:08 Tweaker. So let's change the code review option that used to create a work trunk tree for me, then pop open code and start reviewing by actually doing it with Tweaker. Running it with PR and then
- 10:19 the PR number. And now get this. On the help menu, we have Tweaker code review. Shift C and voila, I set up with review. Ready to go. Quit the tui and we're back to the other tuy. Too many twies,
- 10:33 I think. Okay, so you've seen some tweaker commands come up with a JSON response. Here's another option where review list sends back a list of objects with the review session
- 10:42 metadata. Not quite what you'd expect as a human reviewer. And this leads me to the next cool bit. It isn't really for you. Twicker comes with an agent skill. Under the skillmd file, there's a
- 10:54 set workflow that uses the CLI to add and read comments in active sessions and even pop them in TMAX or Zelage, which is a sweet touch in its own review pane. Let's not read that as this document
- 11:07 as well, is not meant for your eyes. I'm going to get Pi to install the Twicker skill on its own. Don't be me too quick to spend tokens on something that's already there. There's a Pi package that's
- 11:18 called Pi Twicker that you can install directly. Once the skill is there, it'll show up on the menu where you can tell it to review the code changes and actually leave inline comments rather than an
- 11:28 AI summary we've all been used to. Having comments set in line is bringing the review actually closer to what it should be. And honestly, I don't use this cliche a lot. It's a game changer. Running
- 11:40 it shows how it fetches the review list for the current branch or in this instance, the work tree. It's done with review, but you will have noticed we didn't get what we actually wanted.
- 11:50 There's no active session for this repo, so it just did it locally. No bueno. The skill, if you ask me, should make sure it's stopped right away if there's no session or better yet
- 12:00 created on its own. To be fair, it does say in the description that it runs on active sessions and then and only then launches the review pane. Not sure what I think about that. I guess the logic
- 12:11 was code was written, review was manually added. Now, let's have the AI top it with its own input, which is fine, but a bit of a fuff. To be fair, the docs do state this TUI is where
- 12:23 the human reviews code. The CLI is how the agent discovers active sessions, reads user comments, and only when appropriate adds agent authored comments. I'm going to abuse the skill a little in
- 12:34 the sense that I'm asking the review session to be done from scratch by Pi. Both create it, review, and pop it for me afterward. Pi starts and adds its input with review comments which I can later
- 12:47 zoom into and start going through before pushing it through. I must say that this isn't my favorite style of reviewing code changes. Stacked view is nice and okay when you're low on screen real
- 12:59 estate, but my favorite both locally and on GitHub and GitLab is a sidebyside diff which is available to you with the colon diff command. On top of that, like GitHub has, and very different from how
- 13:11 I use Neovim, for example, I do like a file tree to orientate myself with changes and statuses, which are also available with tab. As mentioned earlier, we only have two files with changes in
- 13:23 this instance, and it provides the context of the file itself, but also its path. Staying on the Vim theme, there's another super useful concept of visual block mark allowing you to
- 13:33 add multi-line notes like a function or a single part of it rather than finding the signature and hoping it makes sense for the viewer. We'll push this work tree and create a new PR where
- 13:44 the comments are now available. Now, while I'm a PI converted user, I still have open code using its free model pickle set as a GitHub action for review and approval of code as a second gateway.
- 13:56 Not necessarily the most trustworthy model, but a nice addition on top to find missing bits, which proved itself useful many times in the past. More on that in my recent Open Code video. As set in
- 14:08 the action, it adds the eyes emoji telling me it's taking a look. And shortly thereafter, there's approval from Open Code action agent with notes and a summary serving as the additional approver
- 14:18 required for this PR. So, let's merge YOLO, right? Time for some configuration because we all have preferences and we all have fancy dotfiles repos. Under your dot files repo or config create
- 14:31 a tweaker deer and config toml where you can set a link config. This is the example from the docs where you can disable or enable the mouse set a theme diff and even a leader key for the two. Yes,
- 14:43 there's a leader key you can customize for many other actions. This is also limiting the comment type to issues only setting the color and definition. The config docs have every option
- 14:53 conveniently listed along with themes, comment types, and even a tweaker ignore file that lets you exclude files from review diffs. Back to our feature, there's a review session back up where
- 15:05 in this instance, a sidebyside isn't doing much justice. So, colon diff to stack it up. Tab to pop the sidebar. And after leaving my own comments on the change, I thought I could pop back and use
- 15:17 the skill to ask the agent for a review of my review, if that makes sense. This didn't quite work out the way I planned. Perhaps it requires submitting the comments first. I'd be happy to
- 15:27 hear others experiences with this flow in the comments. Regardless, Tweaker has proved to be the missing piece I always wanted, a convenient TUI to view my code changes from my terminal. It
- 15:37 pulls remote PRs. It submits changes and for me it does the trick. In times where code reviews are literally being questioned as a practice, making your life easier and hassle-free by
- 15:47 bringing them closer to the dev, removing excuses is exactly the hero [music] we deserve. This one definitely stays with me. Sorry, Honk. And I'll report back after building up some mileage. I do
- 15:59 think you'd want to complete your workflow with the most amazing TUI I've shown briefly in this video to manage your GitHub projects with their life cycle issues, PR discussions, andifications
- 16:09 all in one fantastic pluggable place, GH Dash. Thank you for watching and see you in the next