@useorbits/cli 0.0.0-stage → 0.1.1

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/LICENSE ADDED
@@ -0,0 +1,16 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 The Orbits
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
6
+ documentation files (the "Software"), to deal in the Software without restriction, including without limitation the
7
+ rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit
8
+ persons to whom the Software is furnished to do so, subject to the following conditions:
9
+
10
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the
11
+ Software.
12
+
13
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
14
+ WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
15
+ COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
16
+ OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,24 @@
1
- # Temporary Holding Version
1
+ # @useorbits/cli
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ The command-line tool for [Orbits](https://orbits.africa): deploy a folder or a branch and watch it build, read build
4
+ and runtime logs, and manage environment variables, domains and DNS, feature flags, workflows and alerts, from your
5
+ terminal or from CI.
6
+
7
+ ```sh
8
+ npm install -g @useorbits/cli
9
+ orbits login
10
+ cd my-site && orbits link
11
+ orbits deploy
12
+ ```
13
+
14
+ Or without installing: `npx @useorbits/cli deploy`.
15
+
16
+ It runs on macOS and Linux, on arm64 and x64, with Node.js 18 or later. npm installs the CLI's binary for your machine
17
+ from one of its platform packages (`@useorbits/cli-darwin-arm64` and so on), so keep optional dependencies on.
18
+
19
+ To upgrade: `npm install -g @useorbits/cli@latest`. The CLI says when a newer version is out.
20
+
21
+ Other ways to install: `curl -fsSL https://orbits.africa/install | bash`, or `brew install The-Orbits/tap/orbits`.
22
+
23
+ - Docs: https://docs.orbits.africa/cli
24
+ - Source and releases: https://github.com/The-Orbits/orbits-cli
package/bin/orbits.js ADDED
@@ -0,0 +1,55 @@
1
+ #!/usr/bin/env node
2
+ // The `orbits` command of the npm package @useorbits/cli. The CLI itself is a Go binary: npm installs it from the one
3
+ // platform package that matches this machine (an optional dependency, picked by its os and cpu fields), and this
4
+ // runs it with the same arguments, input and output, and exits as it does.
5
+ "use strict";
6
+
7
+ const { spawnSync } = require("node:child_process");
8
+ const fs = require("node:fs");
9
+
10
+ const PLATFORMS = new Set(["darwin-arm64", "darwin-x64", "linux-arm64", "linux-x64"]);
11
+ const platform = `${process.platform}-${process.arch}`;
12
+ const INSTALL = "curl -fsSL https://orbits.africa/install | bash";
13
+
14
+ function fail(message) {
15
+ process.stderr.write(`error: ${message}\n`);
16
+ process.exit(1);
17
+ }
18
+
19
+ if (!PLATFORMS.has(platform)) {
20
+ fail(`the Orbits CLI runs on macOS and Linux (arm64 and x64), not ${platform}`);
21
+ }
22
+
23
+ let bin;
24
+ try {
25
+ bin = require.resolve(`@useorbits/cli-${platform}/bin/orbits`);
26
+ } catch {
27
+ fail(
28
+ `@useorbits/cli-${platform}, which holds the CLI for this machine, is not installed.\n` +
29
+ `It is an optional dependency: reinstall without --no-optional or --omit=optional,\n` +
30
+ ` npm install -g @useorbits/cli\n` +
31
+ `or install the CLI without npm:\n` +
32
+ ` ${INSTALL}`,
33
+ );
34
+ }
35
+
36
+ // A package manager that drops the executable bit (some do, unpacking a tarball) would leave it unrunnable.
37
+ try {
38
+ fs.accessSync(bin, fs.constants.X_OK);
39
+ } catch {
40
+ try {
41
+ fs.chmodSync(bin, 0o755);
42
+ } catch {
43
+ // Not ours to change: the spawn below says why it cannot run.
44
+ }
45
+ }
46
+
47
+ const result = spawnSync(bin, process.argv.slice(2), { stdio: "inherit" });
48
+ if (result.error) {
49
+ fail(`could not run ${bin}: ${result.error.message}`);
50
+ }
51
+ if (result.signal) {
52
+ // Ended by a signal (Ctrl-C): end the same way, so a shell or script sees it.
53
+ process.kill(process.pid, result.signal);
54
+ }
55
+ process.exit(result.status ?? 1);
package/package.json CHANGED
@@ -1,6 +1,39 @@
1
1
  {
2
2
  "name": "@useorbits/cli",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "description": "The Orbits CLI: deploy a folder or a branch, read logs, and manage projects, variables, domains and more from your terminal.",
4
+ "version": "0.1.1",
5
+ "license": "MIT",
6
+ "homepage": "https://docs.orbits.africa/cli",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "git+https://github.com/The-Orbits/orbits-cli.git"
10
+ },
11
+ "bugs": {
12
+ "url": "https://github.com/The-Orbits/orbits-cli/issues"
13
+ },
14
+ "keywords": [
15
+ "orbits",
16
+ "cli",
17
+ "deploy",
18
+ "hosting"
19
+ ],
20
+ "bin": {
21
+ "orbits": "bin/orbits.js"
22
+ },
23
+ "files": [
24
+ "bin/orbits.js"
25
+ ],
26
+ "engines": {
27
+ "node": ">=18"
28
+ },
29
+ "os": [
30
+ "darwin",
31
+ "linux"
32
+ ],
33
+ "optionalDependencies": {
34
+ "@useorbits/cli-darwin-arm64": "0.1.1",
35
+ "@useorbits/cli-darwin-x64": "0.1.1",
36
+ "@useorbits/cli-linux-arm64": "0.1.1",
37
+ "@useorbits/cli-linux-x64": "0.1.1"
38
+ }
39
+ }