Cloud computing easier than ever with CodePicnic CLI
How we brought the computing power to the browser and back to your PC
A few weeks ago, I found myself typing a couple of commands that would -hopefully- change the way I was interacting with my computes. Keystrokes came and went, till finally, a success message gave me welcome.
We had done it. Our vision was more close now to being a reality.
The way we’re interacting with technology is changing our over-all lives. A click gives us access to insurmountable amounts of TV and movies, to about every song produced by human kind, and about any book ever written. And we’re already used to it. In fact, we expect it (I can binge-watch a complete season of some Netflix series and expect the next one right then!).
Software, however, is still a fickle topic. We live in a SaaS world, and it works most of the time, but that’s a side of the equation. Software, libraries, databases, packages. Everything we need to work, to create and to build, still requires long processes just to install. And hope that we don’t forget to update, to keep check our dependencies, while knowing that whenever we switch to another client, we probably need to do it again.
There needs to be a change.
When we first started CodePicnic, we wanted to fulfill those needs. Through a browser, we wanted to give users access to running, real software. Apps and code would join the “One-click-access” club alongside those previous examples.
But it wasn’t enough.
People would feel restricted while using a browser, and would lose access to some of their well-adjusted and battle-tested workflows. Dotenv files, plugins, configurations. Everything resided on their computers, and wasn’t readily available whenever they wanted to use something new through CodePicnic.
So we did better.
The CodePicnic CLI is the first stepping stone in moving towards letting people access software directly on their own computers. After installing it and adding their CodePicnic credentials, any user (on macOS and Linux platforms, but Windows soon as well) can start using already created CodePicnic consoles, but more important, to create new ones.
A FUSE-powered filesystem will automatically sync changes made locally, so vim, Atom, SublimeText or anything you already use, will be back at the spotlight. And through our console, commands can be run on your computer directly on our platform.
Installing and running a Rails application would be a matter of typing two lines, with all the benefits of your existing workflow, plus everything the cloud version already offers.
So let’s take a look at some example use cases:
Installing
Getting access to the CLI is as simple as it can get. If you’re on a macOS system, this installer will handle everything. Ubuntu platforms can get away with running only these lines:
wget -O- https://codepicnic.com/cli/download/linux | shExtra details can be found in our documentation.
Configuration
After installation is done, a binary codepicnic should be available at your terminal. In order to use it, you’ll need the credentials you can find at your CodePicnic profile (remember you can sign up for a free account if you haven’t done so yet).
We suggest starting the REPL mode by typing codepicnic in your terminal and entering the configure command. It’ll guide you through the rest.
Some things to attempt
Let’s start with something simple. We have a log we need to look around, let’s say, extracting the January records. Simple enough.
But then we find out someone forgot to rotate it and now we’re dealing with 20GBs of fun. And we’re running a computer with just 8Gb of RAM. That’s gonna take a while.
Or, alternatively, we could just do:
codepicnic exec CONTAINER_NAME 'cat huge.log | grep 2017-01'


Better yet, if there’re many results, we can just pipeline the results, in the familiar way.


With just one command, we’re able to leverage whatever kind of stack (of our over 50 ones) CodePicnic provides (or you have installed on your own console) as well as its resources. One line is all that’s enough to add several GBs of RAM (or CPUs) to your own computer, without having to leave it.
And this is just the start.
Consider the disk
You’ve been working on a website, but want a way to showcase it to one of your clients. Sure, you can setup a web server for that, or use one of those ready-to-use environments. But there’s always the matter of moving your files, handling how to do shares. Perhaps you need to use SSH or (yikes!) FTP. But there’s a better way.
codepicnic mount CONTAINER_NAME


Mounted now is a folder what will automatically sync all the changes you made, with the CodePicnic cloud console.
This means any work you do on that website through your editor, will be uploaded and saved, letting you still access to those handy public URLs you can share with others. An instant server running which ever tech you need, backed automatically with your locally worked files.
Just the beginning
We’ve all been there. Vacations. Free time. Perhaps some Netflix and something to read later on. And then, your mind gets to that winning idea you wanted to solve before. Spare time does wonders for creativity. But, alas, you forgot to bring your work computer, and having to reinstall everything you need on your spare one seems like a hassle.
That’s a thing of the past now, too.
Through the connect command, you’re not only able to access the running files on your cloud console, but keep on running commands there. Have access to whatever technology you want, without having to install it. With just one line.


Better yet, why not join those two worlds? That’s where the control command shines. control will mount a filesystem on your own computer, and also give you access to the remote platform, thus letting you update and work on your files locally, and running them in the cloud, effectively liberating your own machine of having to install software just to be able to run it!


Every step we make to converge into our vision of letting software run free wherever (and whenever) is needed, brings us to new challenges and puzzles to solve, so we’re sure there’re gonna be some weird bugs crawling around the edges. Fear not, we’re on the job thanks to the great feedback and help of people around the globe trying and testing this new tool.
We’d love for you to join them and help us bring that dream into place.
Software should run free. Let’s keep adding our little grain of sand to that process.
As usual, have fun and enjoy. And never forget,