Project URL: https://glitch.com/edit/#!/snail-cli?path=snail.js%3A217%3A0
Command line nerds, see the listing below for an idea of what itās like.
(some things are rearranged in post-production. donāt mind the timestamps lol)
app@snail-cli:~/.data/sample 06:46
$ stat ~/.local/bin/snail
File: '/app/.local/bin/snail' -> '../../snail.js'
Size: 14 Blocks: 0 IO Block: 1024 symbolic link
Device: 70ch/1804d Inode: 386 Links: 1
Access: (0777/lrwxrwxrwx) Uid: ( 1000/ app) Gid: ( 1000/ app)
Access: 2020-10-28 04:27:56.000000000 +0000
Modify: 2020-10-23 05:52:52.000000000 +0000
Change: 2020-10-28 04:20:59.000000000 +0000
Birth: -
app@snail-cli:~/.data/sample 06:32
$ echo $G_PERSISTENT_TOKEN
c9d2[redacted]
app@snail-cli:~/.data/sample 06:32
$ git log -p
commit 213b517180c7a4af53836287679bc62c43fc3eba
Author: w <none>
Date: Sat Oct 24 02:58:43 2020 +0000
add placeholder
diff --git a/index.html b/index.html
new file mode 100644
index 0000000..8435ed0
--- /dev/null
+++ b/index.html
@@ -0,0 +1 @@
+yay
app@snail-cli:~/.data/sample 06:32
$ snail --help
Usage: snail [options] [command]
Options:
-h, --help display help for command
Commands:
remote <domain> set up the glitch git remote
exec <command...> run a command in the project container
term connect to a project terminal
logs watch application logs
asset|a manage CDN assets
help [command] display help for command
app@snail-cli:~/.data/sample 06:37
$ snail remote developing-knowledgeable-flock
app@snail-cli:~/.data/sample 06:37
$ git remote -v
glitch https://d8d2[redacted]@api.glitch.com/git/developing-knowledgeable-flock (fetch)
glitch https://d8d2[redacted]@api.glitch.com/git/developing-knowledgeable-flock (push)
app@snail-cli:~/.data/sample 06:43
$ snail term
Welcome to the Glitch console
If youāre following someone elseās instructions make sure you trust them.
If in doubt post a question in our forum https://support.glitch.com
For now, the console and the editor don't automatically sync. You can
manually run the `refresh` command and it will force a refresh,
updating the editor with any console-created files.
For more information about this and other technical restrictions,
please see the Help Center: https://glitch.com/help
app@developing-knowledgeable-flock:~ 06:44
$ rm -rf * .??*
app@developing-knowledgeable-flock:~ 06:44
$ git init
Initialized empty Git repository in /app/.git/
app@developing-knowledgeable-flock:~ 06:44
$ ls -a
. .. .git
app@developing-knowledgeable-flock:~ 06:45
$ exit
logout
app@snail-cli:~/.data/sample 06:41
$ snail asset push my-asset.png
(node:9363) ExperimentalWarning: The fs.promises API is experimental
https://cdn.glitch.com/b76ed0ee-e39d-450c-a9e2-734161dba179%2Fmy-asset.png?v=1603867309364
app@snail-cli:~/.data/sample 06:42
$ cat >>index.html
<img src="https://cdn.glitch.com/b76ed0ee-e39d-450c-a9e2-734161dba179%2Fmy-asset.png?v=1603867309364">
app@snail-cli:~/.data/sample 06:43
$ git commit -am "add asset"
[master 2194d51] add asset
1 file changed, 1 insertion(+)
app@snail-cli:~/.data/sample 06:45
$ git push glitch master:staging
Counting objects: 6, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (3/3), done.
Writing objects: 100% (6/6), 491 bytes | 0 bytes/s, done.
Total 6 (delta 0), reused 0 (delta 0)
To https://d8d2[redacted]@api.glitch.com/git/developing-knowledgeable-flock
* [new branch] master -> staging
app@snail-cli:~/.data/sample 06:45
$ snail exec -- git reset --hard staging
HEAD is now at 2194d51 add asset
app@snail-cli:~/.data/sample 06:45
$ snail exec -- refresh
restarting...
app@snail-cli:~/.data/sample 06:46
$ snail logs
Serving at http://e10415468415:3000, http://127.0.0.1:3000, http://172.17.0.29:3000
Serving at http://e10415468415:3000, http://127.0.0.1:3000, http://172.17.0.29:3000
^C
app@snail-cli:~/.data/sample 06:46
$ curl https://developing-knowledgeable-flock.glitch.me/
yay
<img src="https://cdn.glitch.com/b76ed0ee-e39d-450c-a9e2-734161dba179%2Fmy-asset.png?v=1603867309364">
Getting started
- Somehow get the snail.js file.
- Install the dependencies from package.json.
- Symlink it to your $PATH or however you usually do it.
- Set an environment variable
G_PERSISTENT_TOKEN
to your Glitch user persistent token. (this is kinda lame and is subject to change. well really everything is subject to change. but this one especially. actually maybe not, because Iām out of motivation to do anything.)
Itās late, so Iāll be back to describe it more in depth tomorrow.