Where’s the command-line web? (turn back that revolution a few degrees)

Where’s the command-line web?

As all *nix enthusiasts, programmers, syadmins and hobbyists have come to know, our command-line utilities are a best and most constant ally. Any job that comes along we make easier with pipes, redirection, shell scripts and regular expressions. But sometimes you don’t have access to your favourite tools. Sometimes you just can’t get a really nifty tool on your own. So where’s the command-line web?

Where’s that ping command I can wget and see if my server’s available from another network? Where’s traceroute I can send in arguments and switches to, just as I do on the command-line, simply via the query string? Where’s the html encoding application I can pipe data into via http post and receive encoded data back safe for embedding in an html document?

There have been some great apps out there that would benefit from this treatment. One I remember is a DNS check. It runs all kinds of checks against your zones to make sure it’s all valid, correct and optimized. Another great app is one that checks for an open relay on an smtp server. For various reasons, these checks all seem to disappear after a while. The most famous example is that dns site that went to a pay model to use their tools. That sucked.

Wouldn’t it be great to have all these tools out there, free, and accessible via a command-line like interface. I think it’d be brilliant. It’d be a new paradigm in the web’s evolution. For years we’ve talked about soap and web services and xml data transfer formats but that will never be the end-game because we’ve already disovered the most convenient, the most pragmatic and most efficient way to communicate over disparate platforms: text – usually straight-up, or with a little agreed upon formatting (like csv). These simple techniques allow for an infinite range of possibilities.

Think about why all the unix-like platforms are so powerful, so flexible, and so poised to take on new challenges. It lies in the philosopohies of treating almost everything as files, allowing one app to do one thing and do it well, and the piping and redirection of files between these apps.

We’ve all been clamoring for interoperability between offline apps and online apps for decades. We want our office xml formats, our plugin binary APIs opened, our web services soap enabled, our data from disparate apps sync’d with other disparate apps, etc., etc.

The answer is not some strict, spec’d to the nines, validated, schema’d xml, xslt, dtd monstrosity.

The answer has been with us all along. Common-sense, pragmatic, simplified, open protocols and text-based data formats.

Read up on The Unix Philosophy: A Brief Introduction.

The problem is the Unix Philosophy was never extended to the interaction of users on the http protocol. Certainly CGI mimicks command-line, with arguments as query string and STDIN as post data, but somehow we missed the boat completely. We made a mess of taking post data and accepting url parameters. We further made a monstrosity by coming up with all means of pretty structuring and formatting of the traditional key=value data in things like xml.

Just imagine if all the utilities you enjoy on linux where available via simple apps on all platforms all calling out to webified command-line utilities on the web using the same arguments and input as you would right at the console.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.