Hello Glitch!
I’m happy to announce that I’ll be developing a new Glitch CLI glitchi
that will give you a completely new experience with Glitch!
I will be communicating to you through this thread, we can all stay in touch here!
Why another CLI for Glitch?
This CLI application will solve some features that have been missing for a very long time. I’m not sure about you, but I love CI/CD. I also like Heroku and how they’ve got a CLI application that allows you to push your local changes and automatically have them deployed to their services.
Do not fear no more! With glitchi you will have all the features you need for continous deployment with glitch!
Work In Progress
I only started the project today (March 31st), so as expected I haven’t come really far. Anyhow, I have a board setup so you can follow my progress along the way. I will also post a link to my git repo once I establish some ground code.
Features
Glitchi is a feature rich CLI application for Glitch. It will include all the features in your wildest dreams!
Login Feature
I wanted the logins to be as good as possible, so I took it upon myself to create the best terminal login interface you’ve ever seen! This login command have been thoroughly planned to the roots, I’m not messing around with this one!
Login (for CI/CD)
First, let’s cover the most basic one, which is manual for continuous integration. It is a very simple command that goes as follows:
$ glitchi login --no-tty persistentToken gitAccessToken
What the above code did was manually logging in by entering persistenToken and gitAccessToken manually, this would ideally be setup in a CI/CD environment, for instance:
$ glitchi login --no-tty ${GLITCH_PERSISTENT_TOKEN} ${GLITCH_GIT_ACCESS_TOKEN}
Login (with email and code)
This is another basic one! This is Glitch’s own way of logging on users, by sending the user a mail with a code that the user has to enter in their browser to login. This is also a very easy thing to do:
$ glitchi login --mail
? Email address: example@example.com
? Code received from email: some-few-words
Hello, example! Have a wonderful day!
I’ve actually got a little sneakpeak from the development of the login module where I showcase the login with Glitch. Note that this is not the final look.
Login (with github)
Okay, this is where we are getting fancy! The login module has a powerful weapon, it’s called headless-chrome. Behind the scenes Glitchi will be able to log you onto github to then use github to log onto Glitch!!
$ glitchi login --github
? GitHub Username: octocat
? GitHub Password: *******
Hello, octocat!
Wait, you must think I’m stupid, I’ve forgotten about 2FA!?! Hahah no! Gotcha… If the login module detects the crave for a 2FA code, it will simply ask you for it How cool!
$ glitchi login --github
? GitHub Username: octocat
? GitHub Password: *******
? 2FA: 123 456
Hello, octocat!
Login (etc)
So this fanciness goes on for the listed:
Help: glitchi login (or: l)
-f, --facebook
-h, --github
-g, --google
-m, --mail
Now there is also a manual entry one with an interactive interface:
$ glitchi login -t
? Glitch Persistent Token: ****************
? Glitch Git Access Token: ****************
Token Encryption
You’re right, the fanciness is still not over for the login category!! We are cool you know! You see, if you’re afraid that your tokens might get stolen, or you loose your portable laptop or something. We got you covered! Glitchi let’s you encrypt your tokens so only you can access glitch in your terminal!
No matter what login method you decide you use, you can add the --encrypt
flag into the command:
$ glitchi login --mail --encrypt
? Email address: example@example.com
? Code received from email: some-few-words
? Encryption Password: ************
Now that is about it for the login command!
Work from Home!
Sorry, for this pun on beforehand! I just had to
One of the main features with Glitchi is that you can work locally from your own computer and send your local changes to glitch! I am a true follower of the Work from Home corona-rule, but, I’d also like to work locally as well! I want to be able to use my own IDE, or perhaps I want to use vim, regardless! Glitchi, as always, got you covered!
$ glitchi project fetch <project-name> [destination]
The command above downloads the given project to its destination, not only that! It actually saves you a few key-strokes by also changing the directory into the destination for you. Wowzers!
Once inside the directory in your terminal, you can simply write:
$ glitchi push
Normally this would not be possible with git without having to configure git via the Glitch terminal, but hey! Fanciness is still here. Glitchi takes care of all configuration for you! Not only does it configure everything up, but when you push new changes to glitch, glitchi also has the courtesy to refresh your project automatically for you.
Creating and managing projects!
Glitchi, as always, is fancy! It allows you to create, remix, modify and delete projects from your very terminal! Although, I’ll get more into this later when some more code has been written.
More information about developing from your local machine will come later.
Terminal
Do you want to know something that really annoys me? I’m sorry Glitch for the insult, but I really hate that you guys don’t expose an SSH tunnel to the glitch containers! However! The fanciness goes on! I’ve done some homework! I’ve reverse-engineered the glitch terminal source code (or WeTTy, a terminal in the browser), and within a few weeks of developing glitchi, you will be able to use glitchi to warp you inside the glitch terminal! In your own terminal!
$ glitchi terminal <project-name>
Browsing Glitch
Did you really think that was it? Oh h*ll no! I got some more stuffs for y’all! Not only does glitchi enhance your development cycle, but ya know, if you just casually hang around in your terminal some evening and you know, just wanna browse glitch for random projects or something like that you know. Guess what!? You’re right! We got you covered! Glitchi loves the Glitch community, no way are we going to forget that.
Glitchi will allow you to browse, search, etc on all of glitch. All the collections on glitch, or perhaps you want to stalk another user, I feel you… Anyhow, this is not our biggest priority, this might take some time to be released! But it will!
Oh hey!
If you have any requests or ideas of your own for Glitchi, please don’t be scared of the comment field! It doesn’t bite!
Beta Testers
Before release I want to make sure that the software is at its best, so if some of you awesome glitchers out there want to take a hit for the community, please hop into my DMs and we’ll chat about giving you beta access to the software!
Now, I want y’all to have a good day or evening!