@deepraxis/cli 0.2.2 → 0.3.0-dev.028e785

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.
Files changed (4) hide show
  1. package/COMMANDS.md +247 -22
  2. package/README.md +19 -7
  3. package/dist/praxis.js +60052 -25863
  4. package/package.json +4 -1
package/README.md CHANGED
@@ -32,13 +32,15 @@ the SDK, so a new API capability reaches the CLI on the day it ships.
32
32
 
33
33
  ```sh
34
34
  praxis app create my-app # standard template, dependencies installed
35
- cd my-app && praxis app deploy # build, publish, create declared secrets, health check, print the URL
35
+ cd my-app && praxis app publish # build, publish, create declared secrets, health check, print the URL
36
36
  praxis app rollback # deploy the previous version again
37
37
  ```
38
38
 
39
39
  `praxis.jsonc` at the project root names the app and may declare `"secrets": {"SESSION_SECRET": "generate"}`
40
40
  (created once, kept by every later deploy) and `"healthcheck": "/api/health"` (a failing check fails the deploy).
41
- In computers and sandboxes the CLI signs in with `PRAXIS_API_TOKEN`; `PRAXIS_API_KEY` takes precedence when both are set.
41
+ In computers and sandboxes the CLI is already signed in: the platform writes the login file for the machine (a
42
+ *managed login*, which it renews before the token expires), so `praxis` works with no setup. An API key for the
43
+ same environment takes precedence when one is set.
42
44
 
43
45
  ## Run the tests of a DevOps project
44
46
 
@@ -62,7 +64,9 @@ script or a CI job.
62
64
  - **Made for people and for AI agents.** Readable tables in your terminal, compact text when an
63
65
  AI coding agent runs it, and clean JSON in scripts. The CLI picks the mode by itself.
64
66
  - **Signs in through the browser.** `praxis login` approves the session in your browser and
65
- keeps the credential in the system keychain, never in a dotfile when a keychain exists.
67
+ keeps the credential in the system keychain, never in a dotfile when a keychain exists. On a
68
+ computer the platform manages (a Praxis agent's machine) there is no login to run: the platform
69
+ writes `~/.praxis/cli/<env>.json` itself and renews it.
66
70
  - **Predictable grammar.** `praxis api <domain> <resource> <verb> [id]`, the same shape everywhere,
67
71
  with `--help` on every level.
68
72
 
@@ -100,12 +104,17 @@ praxis api model list --org <organization_id> # just this call
100
104
 
101
105
  For CI and other headless environments, create an API key in the
102
106
  [Console](https://console.deepraxis.com/keys) and set it instead of logging in.
103
- `PRAXIS_API_KEY` always takes precedence over a stored login:
107
+ An API key belongs to one environment, so each environment reads its own variable, and that key
108
+ takes precedence over a stored login for the same environment:
104
109
 
105
110
  ```sh
106
- export PRAXIS_API_KEY=<your-api-key>
111
+ export PRAXIS_API_KEY=<your-api-key> # production
112
+ export PRAXIS_API_KEY_DEVELOP=<your-develop-api-key> # develop (PRAXIS_ENV=develop), Praxis team only
107
113
  ```
108
114
 
115
+ A production key in `PRAXIS_API_KEY` is never sent to develop: with `PRAXIS_ENV=develop` the CLI uses
116
+ `PRAXIS_API_KEY_DEVELOP`, or the develop login when it is unset.
117
+
109
118
  ## A tour
110
119
 
111
120
  ### Models
@@ -217,14 +226,17 @@ read results in its compact agent format.
217
226
 
218
227
  | Variable | Purpose |
219
228
  |---|---|
220
- | `PRAXIS_API_KEY` | Authenticate with an API key instead of `praxis login`. |
229
+ | `PRAXIS_API_KEY` | Authenticate to production with an API key instead of `praxis login`. |
230
+ | `PRAXIS_API_KEY_DEVELOP` | The same for develop (`PRAXIS_ENV=develop`); a production key is never used there. |
221
231
  | `PRAXIS_ENV` | `production` (default) or `develop`, for Praxis team members testing pre-release services. |
222
232
  | `PRAXIS_CREDENTIAL_STORE` | Set to `file` to keep logins out of the system keychain, for example in disposable test homes. |
223
233
  | `NO_COLOR` | Disable colors in human output. |
224
234
 
225
235
  Credentials live in the macOS Keychain, or in the Secret Service through `secret-tool` on
226
236
  Linux. Without a keychain they are written to `~/.praxis/cli/<env>.json` with mode 0600, and
227
- `praxis whoami` tells you which one is in use. `praxis logout` removes both.
237
+ `praxis whoami` tells you which one is in use. `praxis logout` removes both. A managed login is
238
+ always that file (the platform writes it, never the keychain); `praxis whoami` reports it as
239
+ `managed-login` and `praxis login` / `praxis logout` refuse to replace or remove it.
228
240
 
229
241
  ## Release channels
230
242