About this video
What You'll Learn
- Run commands like bun or nim without installing them locally.
- Create symlink shims so tea resolves tools from the command name.
- Pull Go, npm, or other deps from README tables or t.yaml.
Brian demos wei/pull, a GitHub app that auto-opens pull requests to keep forks in sync with upstream. David then walks through tea.xyz (now pkgx), running uninstalled commands, symlink shims, and resolving deps from README or t.yaml.
Jump to a chapter
- 0:00 Intro
- 0:35 Introducing way pull: Keeping Forks Updated
- 0:43 wei/pull
- 1:33 Setting up way pull
- 3:35 way pull Demo: Automatic Pull Request
- 3:58 tea.xyz
- 4:16 way pull Benefits
- 5:12 Introducing tea.xyz
- 5:18 tea.xyz: Run Without Installing (Demo)
- 6:47 tea.xyz: Symlink Integration
- 7:30 tea.xyz: Dependencies from README.md
- 9:10 tea.xyz: Dependencies from t.yaml
- 9:38 Finding Packages with tea.xyz
- 10:28 tea.xyz: The Pantry and Project State
- 10:59 tea.xyz: Environment Variable Handling
- 12:51 Conclusion
Full transcript
Generated from the English captions. Timestamps jump the player to that moment.
Read the full transcript
0:00 Intro
0:00 Hi, and welcome to AlphaBits. AlphaBits is an outlet for our inquisitive minds. We can't stop experimenting with new technology, and we wanna share what we're playing with with you. We're your hosts, Brian and David. Hi. I'm David, defender of the Rawkode Academy. I'm a perpetual learner, always playing with new cool tools that I'm gonna share with you as part of this podcast. And I'm Brian. I'm a developer advocate at Amazon, and I love all the shiny new toys in tech. It's kind of my passion is is testing out the new stuff and, seeing what's cool. Alright.
0:35 Introducing way pull: Keeping Forks Updated
0:35 What I'm showing here is my fork of Bluefin. So Bluefin is the the containerized well, it's not containerized. It OCI based distribution of link of Linux. So in a nutshell, you are pulling containers, and those containers are the the base of the system. So it's the delivery packaging format for your operating system. It uses RPM OS tree under the hood. And bluefin is at u blue dash o s slash bluefin on GitHub. So I've got this fork of it. And in my fork, I wanted to make a few changes but still keep all of the upstream stuff.
0:43 wei/pull
1:24 So I found this yesterday. It's called way pull, and it keeps your forks up to date with automatic pull requests. So I've set it up. You go to the GitHub app. Really? Just right here. Go to the GitHub app. We open that in a new tab. It says, alright. Great. And if if I hadn't already added it, there'd be a button that says, add this to my my GitHub user, my organization. So I did that, and I gave it permission to work on this one repository. Inside the repository, there's one file called pull dot yaml.
1:33 Setting up way pull
2:04 So it lives under dot GitHub pull dot yaml. I told it the base branch is main, and the upstream is at the u blue dash o s org, and the merge meth method is hard reset. There's a couple different options for merge methods, but this is going to be the simplest, most painless option for just getting upstream requests. So once I authorize that and tell GitHub actions here, I have to tell GitHub actions that it's okay to allow GitHub actions to approve and create pull requests. This is a big deal. Once that's done, I can go into
2:44 the documentation down here, and it gives you where is the directions? Let's say here. So it tells you the getting started bit. And the first thing you have to do is add that YAML file, And then you go to this magic link here, and we just paste that in. And that tells you whether or not your setup is good. So we'll add GitHub, the kettle some lufin, and it shows my config here as JSON. So it's not going to merge unstable things. And if there's a merge conflict, it will label my PRs. So let's go back to my
3:32 my fork here. And you can see that overnight, there was a push to the u blue OS Bluefin repository, and that commit changed a couple of files. So it looks like we added some new desktop wallpapers for the framework series. That's nice. So I can review this and accept it. I'll just approve it, and it isn't gonna run. I don't need it to run the workflows because they're just images. So I'll just merge my pull request. And now my fork is up to date with upstream. And, really, all I had to do was approve a pull request. So the pull request
4:16 way pull Benefits
4:20 happened automatically. And you can go in on and look at the the hard details on how to set up automation. You can choose how much it's going to do on your behalf. And that's really slick. So I could set it up to just automatically merge my pull request if I wanted to, but I'd like to see what's happening. So that's where I'm at. Way, it's it's it sounds really simple, but it's a a real time saver when you've got forks that you wanna keep up to date. One of those super practical, easy to adopt tools.
4:55 Yeah. Always nice to see. Definitely a big quality of life improvement for a tiny little tool. Yeah. Always something that I guess I mean, GitHub should really just have this baked in. Right? Really, it should. But it is what it is. Awesome. Thank you for your demo. Alright. So t is essentially a package manager, but it does some things different from other package managers. One is that you don't install anything. You just run them. So you can run t and feel free to pick up programming language or a binary that I may not have in
5:18 tea.xyz: Run Without Installing (Demo)
5:36 my machine brain. Sorry to put you on the spot. That's do you use a twin for your shell? I do. Everything I can think of, I'm sure you already have. Fuzzy finder, ripgrep. How about duff? I don't have duff. What's duff? D u f, duff. Oh, no. I don't have that. Okay. Alright. Let's go with NEM just because I've been reading about the two point o release. NEM is the programming language. I have no NEM command, but I can run tNEM help. And now it's resolving the package graph. And if it finds a package, which it already
6:15 has, installs everything that we need, can see there it pulled in NEMLANG two point o and then we get the help output. So now I've successfully run a command that I don't have installed on my machine. And, of course, now that that's all cashed, it's much quicker. So I could just do this. Now that's not magic enough. Right? So I created another demo. Bun Mhmm. Is a command that is like an MPM, but faster. And if I run which bun, you'll see it's actually MIT directory. K. Now the way that I actually got this to
6:47 tea.xyz: Symlink Integration
6:49 work is by creating a symlink. So we can then take another tool like which tea and sec. Now all you have to do is create any symlink and point it to t, and it will actually work out what you're trying to run based on the symlink name. So here, I can run s h sec or sec As now installing the seg language compiler, it gives that a second. And there we have sec. So you can use the something approach. However, there's other ways to do this too. I also have two directories here, a project with a
7:30 tea.xyz: Dependencies from README.md
7:31 README and a project with a YAML. So let's jump into project README, which has a README. Md. Now one of the challenges or problems that the t project wants to solve is documentation within projects that tell you what you need to successfully run and work with the project. Other tools that do this rely on some file, like, had its YAML based file. Mhmm. But then the problem is that could then drift from the documentation and you've got two different things. So while you may update your aquaproject dot yaml, you may forget to update your readme and then
8:03 you've got all this thing that doesn't really make a lot of sense. However, if you can just save the documentation as the canonical source of drift, like a readme file, then t can work out what you need from that. So from here, we can run t sync environment SE which will scan or find the README. Empty. Notice that we have the header dependencies with a markdown table and pull in everything that we need. So we'll let this run. Now it does spit out a bunch of environment variables. So, you know, the best way to do this
8:34 would be to stick it into a DirEnv and just run like source t s e. So and now if I run go version, I'll have go one twenty one because the read me said we want go one twenty one. Now if I open a new tab and go to another directory and run go version, my machine local version of go is 120 7. So now we have this environment documented via read me, but I actually like the explicit approach. So if you want to do that route, you can use a t dot yaml where you could specify your dependencies. Here, we're saying
9:10 tea.xyz: Dependencies from t.yaml
9:16 that we need w get an NPM. And again, we're just running sync environment and it pulls in the correct NPM, which in this case is nine eight one. Whereas if I go to my own NPM, we have nine six seven. So t's a really interesting choice for development environments and magic tooling. My favorite feature though is this prefix thing. This, you know, I don't have to go and work out how to install them. I don't have to work out how to install zig or rust c or Cargo or anything like that. I could just say t I wanna
9:38 Finding Packages with tea.xyz
9:50 run this thing. Go find it for me. And it does. Of course, you gotta be able to find these packages. So you can do package search. I'm gonna need one more package name. I'm running out of stuff. How about that's gonna be too esoteric, isn't it? Yeah. Too pony. Yes. Wasentime. Wasaminophen. I'm failing wildly. There we go. Done it. So you could use t package search to find things. Now the pantry is not which is where they store all of the definitions. It's not is not gonna make packages as as homebrew. It probably doesn't have as many packages as
10:28 tea.xyz: The Pantry and Project State
10:34 Aqua. This is a very, very early project, but I think they're focused on developer experience and developer environments. We'll hopefully encourage more people to adopt the tool, which means more people will add more packages to the pantry, and eventually, we'll end up in a a state where that is feature complete. And I actually went through the process last week of adding Terraform CDK to the pantry, and it was super easy. It was, 20 lanes of YAML. So the experience is is pretty good. So does it automatically manage your LD variables, your package config pass, things like that? And
10:59 tea.xyz: Environment Variable Handling
11:07 and does it take care of all that for you? Yeah. So when you run the sync environment, it spits out all of that. I'm not in a project. You know, it's it's best to everything that you're you're gonna need. So you can see here, there's the SSL search. There's some get stuff. There's the LD libraries. Okay. So, you know, all the open SSL stuff is provided depending on what else you're doing. In this case, it's just go. So, yeah, it tries to cover all of that. You can actually do more with the the YAML approach too
11:36 where it can not replace their end because their end is awesome. But you can also start to do things like, Brian. Set environment variables. Like, go root for example or Yeah. Something like that. And then that would come out of the sync environment too. So there we go. Right to the top. So it's cool. It does also try to support Dart End. It doesn't support all of the features. So if there is any MVRC, it will export all the environment variables, but it won't support it doesn't support the the macros, like, source up and such. So yeah.
12:10 It's pretty neat. That's pretty stuck. Have you run across anything that doesn't work in terms of I'm I'm I'm always worried about, like, the ld library path, the ld flags, things like that. If it if you come across things that don't build, can't find the package config bits, anything like that? I mean, I haven't used it in anger in production or else like that. I've been exploring it for the last, you know, couple of weeks. I've added it to a few of my projects in my mono repository, but they're all really simple tools. It's just Rust,
12:41 Cargo, Go. So I'm sure there are gonna be things that are a challenge, but so far, it's worked very well for my my use case. Nice. That's really cool. Good demo. If you wanna hear why we showed up these tools, check out the podcast available at alphabets.fm. Until next week. See you soon.
Technologies featured
Meet the Cast
Stay ahead in cloud native
Tutorials, deep dives, and curated events. No fluff.
Comments