@overaihq/cli 0.13.8 → 0.14.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/README.md CHANGED
@@ -69,21 +69,68 @@ and `printable-page render`; `overai help` shows their arguments.
69
69
 
70
70
  ## Working across organizations
71
71
 
72
- Each backend and organization has an independent saved CLI session. Work in
73
- separate workspace folders: commands automatically use the clone’s organization.
74
- For commands outside a clone, use `OVERAI_ORG_ID=<orgId> overai <command>` or set
75
- the shell variable. `org switch <orgId>` changes the machine-global default for
76
- unscoped commands; it leaves other org sessions intact.
72
+ Each deployment and organization has an independent saved CLI session. Name an
73
+ organization with a **ref** — its id, a local alias, or `<remote>:<orgId>` —
74
+ wherever one is accepted:
75
+
76
+ ```sh
77
+ overai --org acme sql TBS123 "select 1" # one invocation, for scripts and agents
78
+ OVERAI_ORG_ID=acme overai status # one shell
79
+ overai org switch acme # the machine-global default
80
+ overai org alias acme fcps:org_abc # name an org locally, like a shell alias
81
+ ```
82
+
83
+ A named org selects its own deployment, so two agents can hold two organizations
84
+ at once without changing anything shared. Inside a clone, commands use its
85
+ organization automatically. Precedence is `--org`, then `OVERAI_ORG_ID`, then the
86
+ clone, then the saved default.
87
+
88
+ If you belong to many organizations, name one every time. The saved default is
89
+ machine-global, so it is whichever organization some other shell, editor, or
90
+ agent last switched to — and a command that falls back to it reads the wrong
91
+ tenant rather than failing. Give the orgs you work in aliases and pass `--org`:
92
+
93
+ ```sh
94
+ overai org alias acme fcps:org_abc # once
95
+ overai org alias # what you have named
96
+ overai --org acme push # every time
97
+ export OVERAI_REQUIRE_EXPLICIT_ORG=1 # make forgetting an error
98
+ ```
99
+
100
+ `OVERAI_REQUIRE_EXPLICIT_ORG=1` refuses to run any command that acts on an
101
+ organization until one is named, whether by `--org`, `OVERAI_ORG_ID`, or the
102
+ clone you are standing in. That includes `clone`, which reaches into an org, and
103
+ bare `signout`, which revokes one — `signout <ref>` and `signout --all` are
104
+ explicit already. `signin`, `whoami`, `org`, `remote`, `best-practices`, `help`,
105
+ `version`, and `update` stay available: the first four are how you find the org
106
+ to name, and the rest touch none.
77
107
 
78
108
  Missing org sessions are established from an eligible saved CLI login. SSO requires
79
- browser authorization: run `OVERAI_ORG_ID=<orgId> overai signin`. Ordinary commands
80
- never launch a browser. `whoami` shows the backend, org, identity, and selection
81
- source; `org list` also indicates which orgs have saved sessions.
82
-
83
- `signout` revokes the effective org’s CLI session. `signout --all` revokes all sessions
84
- saved by this installation, across backends, without signing out browsers or other
85
- machines. Failed revocations retain credentials for retry. Clone sync commands reject
86
- an `OVERAI_ORG_ID` that disagrees with the clone.
109
+ browser authorization, and the prompt names the exact command to run. Ordinary
110
+ commands never launch a browser. `whoami` shows the remote, org, identity, session
111
+ expiry, and what selected them; `org list` covers every remote you're signed into.
112
+
113
+ `signout [<ref>]` revokes one organization's CLI session. `signout --all` revokes all
114
+ sessions saved by this installation, across remotes, without signing out browsers or
115
+ other machines. Failed revocations retain credentials for retry. Clone sync commands
116
+ reject an override that disagrees with the clone.
117
+
118
+ ## Remotes
119
+
120
+ A remote is a deployment. `prod` and `local` are built in — they need no
121
+ registration and cannot be removed or renamed. Register others by name:
122
+
123
+ ```sh
124
+ overai remote add acme https://api.acme.overai.com # --app <url> for a self-hosted webapp
125
+ overai signin acme # or: overai signin https://api.acme.overai.com
126
+ overai signin acme:org_abc # straight to one organization
127
+ overai remote list # what you can reach, and where you're signed in
128
+ overai remote remove acme # forget it and revoke its sessions
129
+ ```
130
+
131
+ Signing in to a URL registers it as a remote, naming it after its host. A clone
132
+ records the remote it came from, so a workspace folder keeps working against the
133
+ right deployment.
87
134
 
88
135
  Existing credentials migrate automatically. Credentials for different backends are
89
136
  never exchanged between them; custom deployments remember `OVERAI_APP_URL` at signin.
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  external_exports
3
- } from "./chunk-XCJJTK3H.js";
3
+ } from "./chunk-PF6GZFT4.js";
4
4
 
5
5
  // ../common/src/types/value-type.ts
6
6
  var TypeEnum = /* @__PURE__ */ ((TypeEnum2) => {