Getting started
Installing Deno
gg is built with Deno, so the first step is making sure that you have Deno installed on your machine. Deno's website will help you out with this.
If all goes well you should be able to run the deno executable in your command line. First, check the version you have installed:
$ deno --versiondeno 1.10.1 (release, x86_64-apple-darwin)v8 9.1.269.27typescript 4.2.2
Since gg uses unstable Deno APIs, there might be breaking changes between minor versions of Deno. That is why not every minor gg version is compatible with every minor Deno version. The table below shows you which versions work together. Note that all minor Deno versions below 1.6 are not supported.
| Deno v1.6 | Deno v1.7 - v1.10 | |
|---|---|---|
| gg v0.1 | ✅ | ❌ |
| gg v0.2 | ❌ | ✅ |
You can always upgrade to the latest version or a specific version of Deno using the executable.
$ # Upgrades to the latest version$ deno upgrade $ # Upgrades to a specific version$ deno upgrade --version=1.6.0
Getting access
gg is not publicly released (yet), so you can't just access the source code from publicly visible URLs. At the moment, you can get free access for one week if you want to try out gg. All you have to do is to send me an email!
I'll get back to you as soon as possible by sending you a token that will allow you to access the source code for gg. Depending on the number of requests, I might automate the process in the future.
Installing gg
Once you have a token, you can install the gg-CLI using the Deno script installer. Before you can do that you need to create a tsconfig.json file that you keep around somewhere on your filesystem. Place the following JSON in the file.
{ "compilerOptions": { "jsxFactory": "gg.element", "lib": ["dom", "dom.iterable", "esnext", "deno.ns", "deno.unstable"] }}
With the config in place, you can install gg using the following command. Just replace the path to the tsconfig.json and put your token into the URL.
$ deno install --unstable \ --allow-read --allow-write --allow-run --allow-net \ --config path/to/your/tsconfig.json \ https://gg.thomasheyenbrock.com/code/<gg-token>/gg@0.1.0/gg.ts
Deno will download all the necessary source code and it will make the command gg available in your shell environment. You can choose a different name by adding the --name flag when installing.
You can test the installation by printing the version of gg you just installed:
$ gg --versiongg 0.1.0
If you don't get the desired result, it might be because you already have a binary or alias for the name gg. (E.g. the popular zsh-plugin for git adds an alias named gg.) You can check what the gg command refers to by running which gg. If you run into this problem you either have to remove the other binary or alias or you have to install the gg-CLI under a different name.
Next → Guides