aloic 0.1.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md ADDED
@@ -0,0 +1,88 @@
1
+ # aloic
2
+
3
+ Publish a folder to [Aloic](https://aloic.ai) from a terminal or a build machine.
4
+
5
+ ```bash
6
+ curl -fsSL https://get.aloic.ai | sh
7
+ aloic login
8
+ aloic deploy ./dist
9
+ ```
10
+
11
+ That is the whole thing. The installer puts the CLI under `~/.aloic` and the
12
+ `aloic` command in `~/.local/bin`, checks every file against a published hash,
13
+ never asks for root, and offers to sign you in on the spot. `aloic deploy`
14
+ walks the folder, sends only the files that changed, and points your project at
15
+ the result.
16
+
17
+ A shell cannot change its parent's PATH, so `aloic` is short in the **next**
18
+ terminal you open. In the one you installed from, either use the path the
19
+ installer prints or run `source ~/.aloic/env`. Remove all of it with
20
+ `aloic uninstall`.
21
+
22
+ Requires Node 18 or newer, which the installer checks for before it downloads
23
+ anything. To pin a version, pass it: `curl -fsSL https://get.aloic.ai | sh -s -- 0.1.0`.
24
+
25
+ ## Commands
26
+
27
+ | | |
28
+ |---|---|
29
+ | `aloic login` | Sign this machine in through your browser |
30
+ | `aloic logout` | Forget the key on this machine |
31
+ | `aloic init` | Choose which project this folder publishes to |
32
+ | `aloic deploy [folder]` | Publish a folder and point the project at it |
33
+ | `aloic projects` | List the projects this machine can publish to |
34
+ | `aloic whoami` | Show who this machine is signed in as |
35
+
36
+ Running `aloic deploy` with nothing set up does the sign in and the project
37
+ choice on the way past. The other commands exist for when you want to do those
38
+ deliberately.
39
+
40
+ ### Options
41
+
42
+ | | |
43
+ |---|---|
44
+ | `--title <text>` | Names the deploy, shown as its heading |
45
+ | `--description <text>` | What changed, shown under the name |
46
+ | `--project <slug>` | Publish to this project, ignoring `.aloic` |
47
+ | `--draft` | Upload without pointing the project at it |
48
+ | `--quiet` | Print only the address at the end |
49
+
50
+ ## In a build
51
+
52
+ Set `ALOIC_KEY` and skip the sign in entirely:
53
+
54
+ ```bash
55
+ ALOIC_KEY=alo_... npx aloic deploy ./dist
56
+ ```
57
+
58
+ There is a ready made GitHub Actions workflow in `github-action.yml`. Copy it
59
+ to `.github/workflows/deploy.yml` and add the key as a repository secret. The
60
+ build runs on GitHub's machine and only the finished folder is sent.
61
+
62
+ ## What it writes
63
+
64
+ | | |
65
+ |---|---|
66
+ | `~/.aloic/config.json` | The terminal key, mode `0600`. Yours, per machine |
67
+ | `./.aloic` | Which project this folder publishes to. Commit it |
68
+
69
+ The key is per machine so signing in once covers every project on this
70
+ computer. Which project a folder publishes to is a fact about the folder, so it
71
+ lives beside it and can be committed, which is what lets a whole team deploy
72
+ the same repository without each of them choosing from a list.
73
+
74
+ ## What a terminal key can do
75
+
76
+ Publish to the projects on your account, and nothing else. It cannot change
77
+ your account, your domains or your billing, and it cannot make more keys.
78
+ Revoke one at any time in Settings on aloic.ai.
79
+
80
+ ## Notes
81
+
82
+ - Only files that changed are uploaded. Content is addressed by its hash, so a
83
+ second deploy of a site whose images did not change sends the one edited file.
84
+ - `node_modules`, `.git`, `.env` and similar are skipped rather than refused,
85
+ so pointing this at a project root works.
86
+ - No dependencies. This is the one tool in a pipeline that has to still work on
87
+ a machine nobody has looked at in a year.
88
+ - Requires Node 18 or newer.