--- title: "The Elements Tooling" author: "@chris" author_url: https://elements.dev/u/@chris published: 2026-10-29T22:57:12.587Z url: https://elements.dev/learn/the-elements-tooling-ljm4imcd kind: post format: video video: https://elements.dev/learn/the-elements-tooling-ljm4imcd/video.mp4 poster: https://elements.dev/learn/the-elements-tooling-ljm4imcd/poster.jpg duration: "6:07" transcript_vtt: https://elements.dev/learn/the-elements-tooling-ljm4imcd/transcript.vtt --- # The Elements Tooling by [@chris](https://elements.dev/u/@chris) ยท 2026-10-29 ## Description A tour of the elements command: the manual, create, build, install, db, test, JSON output for agents, and the project server. ## Notes In this video we look at the `elements` command in the terminal: the manual, creating a project, the build, packages, the database shell, tests, JSON output for agents, and the project server. The agent in the chat runs all of these for you. You can also run them yourself. If the app server is running in the terminal, press `q` to stop it first. You stay in the project's directory. ### 1. elements -h and the manual ```bash Terminal elements -h ``` This lists every command. The first is `man`, the manual. Use it to look up how to do a task: ```bash Terminal elements man ``` The other commands include `create`, `start`, `build`, `test`, `install`, `uninstall` and `db`. ### 2. elements create Besides the Command Palette in VS Code, you can create an app from the terminal with the project's name: ```bash Terminal elements create myapp ``` ### 3. elements build ```bash Terminal elements build ``` `elements build` connects to the project server and answers right away. The project server keeps the build up to date as files change, so the command asks the server for the current state instead of building. On screen it reports a green **Ok** in about 19 microseconds. When the build state changes, the screen updates with the errors right away. Press `q` to exit. Several agents can run `elements build` in the same project at the same time, each connected to the same project server. ### 4. elements install ```bash Terminal elements install mime ``` This installs a package, and the build updates with it. ### 5. elements db ```bash Terminal elements db ``` This opens a shell on the app's database. Type `\d` to list the tables. A new app has only the tables Elements uses; your app's own tables appear here as you build, and you can query them directly. Every app's data is in one database, where you and your agents can run queries for your business. Type `\q` to exit. ### 6. elements test ```bash Terminal elements test ``` The agent writes tests as it builds, and the tests catch regressions: a new feature breaking something that worked for months. Elements runs tests in several processes at once, and reruns only the tests a change affects, usually in a few milliseconds. Test results are part of `elements build` too, so an agent knows right away whether a change broke something. ### 7. JSON output for agents Agents pass `-json` to get structured data back instead of reading a screen: ```bash Terminal elements build -json ``` Any command that returns data takes `-json`, including `elements test`. ### 8. The project server and elements kill The project server runs in the background, which is why `elements start` connects and starts so quickly. VS Code connects to the same project server, so one server serves every client and you save memory and CPU. It keeps running after the clients exit, and shuts down on its own after a while with no clients connected. To stop it yourself: ```bash Terminal elements kill ``` The next client that connects, or the next `elements start`, starts the project server again. ## You don't need the terminal If you are new to coding or to the terminal, the agent in the chat runs any of these commands for you. The commands are there when you want to work without chatting. ## Transcript Let me show you around the Elements program itself in case you want to dive into any of the commands and use them yourself. You can always just use the AI chat agent and it will do all of these things on your behalf, but I think it's good to know that the underlying programs exist, so if you ever need to go down and work with them directly, you can do that. In the terminal, if you already have the server running, press the Q key. That will exit out and you should still be in your project directory. Elements is just a program, so if I type elements and the help flag, you'll see the various programs that you can run as part of Elements. The first command listed is man, and that stands for manual. If you want to read about how to do a particular task in the manual, you can say elements man and then search for different tasks. There's create for creating new projects, start for starting up the server like we've been doing, a build command, test command, install, uninstall, db. There's a ton of commands here to look at. But let me just show you around a couple of the most popular things you're going to do. I've shown you how to create an application using Visual Studio Code's Command Palette, but you can also create a new application by using elements create and then just the name of the project. You might be used to this kind of way of doing things if you're working in Rails, for example. The next command is elements build. When I type this, it's going to immediately connect to the project server. Notice how fast that happened. And that's because it didn't actually perform the build when I typed elements build. The build has already happened. The project server keeps the build up to date in real time as files change. And so when I type elements build, it's just asking the server what the state of the build is. And I get back a green OK, and that happens, and I might be getting the order of magnitude wrong, but I think that's about 19 microseconds. If the build state changes and I get an error, you'll see this UI update immediately with those errors. And so it's a real-time build state user interface. Now I'll press Q. And one more note on elements build is that if you have multiple agents working on your project, they can all use elements build at the same time. So you can have concurrent clients connecting to the project server, which makes Elements a fantastic environment for working with lots of agents at once. But it's also useful just for running different types of commands on the project. For example, if I want to install a package, I can type elements install. And I don't know, I'm not being very creative, let's just install the mime package. And when you do that, it will install the package very quickly. Let's do it one more time. There we go. Now that it's in warm cache, we want to have some good numbers. So you can install a package and then the build will be updated automatically since we now have a new package and it affects the state of the build. The next command you'll likely want to use is elements db. Elements db is going to drop you into a database shell for your application's database. And if I do backslash d, you can see some of the tables that were created for this particular application. Now, this is just the boilerplate app, so I don't have any actual application tables here. These are all Elements tables. But if you had created an application, you will see your own tables in here. And you can run database queries directly against them. And that's actually one of the greatest benefits of Elements is that all of your database is in one place. You can combine lots of different applications that previously would have been across maybe different subscriptions and put them into one database where your agents or yourself can go in and do things for your business or run business queries and figure out what's going on. So backslash q out of that. The next command that you'll likely want to know about is elements test. Now, in any application, the agent is going to write lots of tests, and tests are useful if they're fast enough to be useful. And in an agentic way of building, you need your tests to be really, really quick so that when an agent builds a new feature, it can just run elements test, or as part of the elements build, you'll get test results as well. And know in microseconds whether or not it broke something that was written months ago. And that can often happen if your application gets bigger and bigger and bigger, you write a new feature and suddenly something that's been working for months breaks. We call that a regression. Tests help prevent regressions. And tests in Elements are extremely fast. We have multiple processes running your tests concurrently so that even if a test needs to be run again, it typically only takes a few milliseconds. Only tests that are affected by a change will be rerun. Otherwise, the previous state of the test is presented to you. And they're hot reloaded just like any other part of the application. So tests are extremely fast in Elements. It's probably the fastest test runner ever built. And it works really, really well with agents. It's one of the reasons that Elements applications will stay robust over time. Okay, now your agent will typically use these commands like this, where it will say elements build and then it will pass the JSON flag so that it gets structured data back and it doesn't have to parse a user interface. You can do the same, for example, with elements test or with any of these commands that provide back data. You can get a structured version of that with JSON. And that's how agents will work with the Elements project server. Now the Elements project server is running in the background, and that's why I can type elements start and it connects, makes sure the build is okay and starts very, very quickly. And the project server will stay running even after you've exited out of all the clients, like your program or Visual Studio Code. The other thing to note is that Visual Studio Code itself is plugging into the same project server. So you'll save a lot of memory and CPU because the same Elements project server is serving all of the clients. Now, if there are no connected clients, it will automatically shut down the project server after a period of time. If you want to kill it yourself, you can always do that by typing elements kill, and that will just kill the project server. Next time another client tries to connect or you start up your app, it will just boot up the project server automatically for you. All right, all these terminal commands are kind of advanced. If you're coming from a vibe coding platform and you're not used to coding or not used to the terminal, do not worry at all. The agent that you're working with in the chat window will be able to do all of these things on your behalf. But if you're a little bit more advanced, or you want to do some things without having to chat, you can go down and drop into the elements program and pretty much do anything you want to do with the application. Elements works really, really well for agents. But I think it also works well for humans.