Readit News logoReadit News
Posted by u/alexarena 4 years ago
Show HN: Interval, CLIs in browser with no front end codeinterval.com/...
Hey HN,

I'm Alex, founder of Interval [0]. We’re bringing internal tools written like CLIs to the browser to make them more powerful, through a Node.js SDK which attaches them to a hosted dashboard without any frontend code. Large companies have full teams that work on internal dashboards and tooling. Interval brings that infrastructure to anyone.

In our previous project we had ~65 CLI scripts for tasks like provisioning user accounts, moderating content, and migrating data. These were quick to write and powerful. They also turned into an ongoing timesuck. Non-technical coworkers needed to bother an engineer every time to run one. Some of them were powerful enough to be footguns, and because we had to rewrite validation every time, we were always a bit scared of them.

We wanted to bring the power and speed of cranking out CLI scripts into the world of modern software development: testable, easy to expose to colleagues via a URL, and works with Everything Else by default. That’s why we made Interval.

We built:

- A Node.js + TypeScript SDK – this embeds in your backend codebase and provides APIs for defining tools + collecting input + displaying output. These APIs are simple awaitable functions that return parsed, validated, and soundly-typed user input. You put your Interval actions in source control, test them, run CI/etc exactly like you do for all your other backend code.

- A hosted UI, which handles I/O for the scripts in a less brittle way than command line arguments do, while also taking care of auth, permissions, and audit logs.

This lets you take your CLI commands out of an engineer’s terminal and share them with the whole company. Give support the ability to ban spammers but not drop the prod DB. Require two people for sensitive actions. Echo commands to a Slack channel. It’s a powerful set of primitives out of the box and lets you do anything else you want in the code you’re already writing, without making you have to spin up a second company just to support your internal tools.

Under the hood, your CLIs and the hosted dashboard talk through a 2-way message passing system. We felt this approach was the best of both worlds:

- UIs are hosted by Interval: We build, host, and maintain the part most people don't care about for internal tools.

- Backends are self-hosted: We can't see your business logic, secrets, etc.

We're in public beta today. I hope you like it and I'm happy to answer any questions/feedback in the comments.

[0]: https://interval.com

MatthiasPortzel · 4 years ago
I’m very excited by the idea of seamlessly providing a front-end for interactive scripts. (I have a similar idea that I’ve wanted to build for a while.)

Is that an accurate description of what you’re trying to build? Calling Interval a “CLI in the browser” made me think you had a command line in the browser, something like xterm.JS.

I don’t have anything else to say, I think the idea speaks for itself.

eddd-ddde · 4 years ago
I interpreted "CLI in the browser" the same way, seems like a slightly wrong description.

Other than that I love the concept; someone like me who sucks at creating UI's really benefits from something like this (:

alexarena · 4 years ago
Thanks! "Seamlessly providing a front-end for interactive scripts" is a really solid description of what we're doing. Honestly the interactive part is what I think is the most important to get across. A big part of why I started building this was I wanted to prompt for input/display output across multiple steps, basically in conversation with the script.
michaelvillar · 4 years ago
Loved using Interval in the past few months at height.app. I highly recommend it if you don't want to bother building UI within your internal admin pages.
elsherbini · 4 years ago
I work in an academic lab and develop pipelines for processing raw data to get people tables to analyze. Would this be a good solution for me to allow labmates who aren't very good with the command line to run those pipelines? We run the pipelines on HPC cluster, would I need to spin up a server that sits between the cluster and interval, or could I somehow run the backend directly on the cluster?
alexarena · 4 years ago
Yes, letting non-technical teammates run stuff that was previously only accessible on the command line is basically the perfect use case. In terms of the specifics of your setup: without having worked with an HPC cluster before, I'm not 100% on exactly what it would take, but I'm pretty confident it's possible. The SDK component is super lightweight, so if we can get Node.js running, we can get Interval running. Feel free to email me (alex at interval dot com) and I can help you with this.
anitil · 4 years ago
This is really nice and I love the idea of giving non-technical users access to internal tooling.

For python scripts I've had some success with Gooey that turns an ArgParser description into a usable (if ugly) UI running locally.

At some point I tried to turn it into a web front end (probably called Wooey) but it ended up in the same pile of half-baked projects I have floating around.

alexarena · 4 years ago
Haha love the name Wooey for that. Also, very cool to see other people exploring the same space. We experimented w/ a similar arg parsing system, but ended up w/ our current approach so that it's possible to build multi-step workflows that conditionally show different inputs at different stages of the workflow.
anitil · 4 years ago
Yeah this is far more slick that what I was building. It's such a nice niche because I keep finding that there are easy fixes around me but it's hard for me to make it available for other people
DoryMinh · 4 years ago
I came across the concept a couple of times but I find it hard to get excited. I still use C# to create tools. I have total control and not sure it's any less convenient than less-code platform like interval or even airplaine.
melony · 4 years ago
raviparikh · 4 years ago
Thanks for linking to Airplane! I'm one of the founders.

I actually gave Alex from Interval a demo of our product about a year ago when they were working on something different. Maybe they got some inspiration from that conversation. Best of luck to them!

alexarena · 4 years ago
Both of those seem great, we just have a slightly different approach, primarily around our model for integrating into your codebase and how we collect input/display output. Ravi, hopefully you recall the context for that call was us investing in our prototype version of Interval vs. use something like Airplane that was being built commercially. Thoroughly enjoyed our chat but just want to be clear that our take on this problem predates our conversation and was disclosed during it :)
jreynoldsdev · 4 years ago
Super interesting idea and great documentation. What software do you use for your user docs?
alexarena · 4 years ago
Thanks! We just switched to Docusaurus, would absolutely recommend. We started w/ a separate marketing site and docs site, but since our team are basically all engineers, we just decided to use Docusaurus for everything.