@plori/cli 0.2.6 → 0.3.0
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 +116 -9
- package/package.json +6 -6
package/README.md
CHANGED
|
@@ -9,30 +9,129 @@ get_run_result → `result`, …).
|
|
|
9
9
|
|
|
10
10
|
## Install
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
```sh
|
|
13
|
+
curl -fsSL https://plori.ai/install.sh | sh
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
Windows:
|
|
17
|
+
|
|
18
|
+
```powershell
|
|
19
|
+
irm https://plori.ai/install.ps1 | iex
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
Both installers drop a single static binary (no sudo, no Node) and verify it
|
|
23
|
+
against the sha512 the npm registry publishes for that build. Re-run either one
|
|
24
|
+
to upgrade. `PLORI_VERSION`, `PLORI_INSTALL_DIR` and `PLORI_REGISTRY` override
|
|
25
|
+
the defaults.
|
|
26
|
+
|
|
27
|
+
`install.sh` installs to `~/.local/bin` and edits no shell rc file, so if that
|
|
28
|
+
directory is not already on your PATH the script prints the one line to add and
|
|
29
|
+
`plori` runs only once you have added it. `install.ps1` installs to
|
|
30
|
+
`%LOCALAPPDATA%\plori\bin` and does add that to your user PATH, so a new
|
|
31
|
+
terminal finds it. The scripts are `web/public/install.sh` and
|
|
32
|
+
`web/public/install.ps1` in this repository;
|
|
33
|
+
`.github/scripts/install-sh.test.sh` runs the shell one in clean musl and glibc
|
|
34
|
+
containers.
|
|
35
|
+
|
|
36
|
+
If you would rather go through npm:
|
|
13
37
|
|
|
14
38
|
```sh
|
|
15
|
-
|
|
39
|
+
npm i -g @plori/cli
|
|
16
40
|
```
|
|
17
41
|
|
|
18
|
-
|
|
19
|
-
|
|
42
|
+
Or build from this repository (Go ≥ 1.26):
|
|
43
|
+
|
|
44
|
+
```sh
|
|
45
|
+
go build -o plori ./cli/cmd/plori
|
|
46
|
+
```
|
|
20
47
|
|
|
21
48
|
## Authenticate
|
|
22
49
|
|
|
23
|
-
|
|
50
|
+
For an interactive terminal, start the sign-in from the CLI. It opens Plori's
|
|
51
|
+
email-OTP page in your browser and returns to the terminal when complete; a new
|
|
52
|
+
email creates the account in the same flow.
|
|
24
53
|
|
|
25
54
|
```sh
|
|
26
|
-
plori login
|
|
27
|
-
|
|
55
|
+
plori login
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
The browser flow requests `openid offline_access mcp`. Its public OAuth client
|
|
59
|
+
id, short-lived access token, rotating refresh token, expiry, and scopes are
|
|
60
|
+
stored in `~/.config/plori/config.json` (or
|
|
61
|
+
`$XDG_CONFIG_HOME/plori/config.json`) with mode `0600`; the CLI refreshes the
|
|
62
|
+
session there when needed.
|
|
63
|
+
|
|
64
|
+
For CI or another headless environment, keep using an API key created at
|
|
65
|
+
<https://plori.ai/dashboard/settings>:
|
|
66
|
+
|
|
67
|
+
```sh
|
|
68
|
+
plori login --key plori_sk_…
|
|
69
|
+
# or, without writing a file:
|
|
70
|
+
export PLORI_API_KEY=plori_sk_…
|
|
28
71
|
```
|
|
29
72
|
|
|
30
73
|
`PLORI_BASE_URL` (or `--base-url`) points the CLI at a non-production
|
|
31
74
|
control-plane, e.g. a local `uat-server`.
|
|
32
75
|
|
|
76
|
+
## Attach
|
|
77
|
+
|
|
78
|
+
`plori attach` opens a live session in your terminal: the recent history, a
|
|
79
|
+
prompt, streaming output, and the approval queue in one place. It is the same
|
|
80
|
+
session the web app shows, so a turn you send here appears in an open browser
|
|
81
|
+
tab as it streams.
|
|
82
|
+
|
|
83
|
+
**The terminal does not give the agent access to your local files.** The shell,
|
|
84
|
+
the disk, and the files are the agent's own cloud computer. Nothing on your
|
|
85
|
+
machine is uploaded, and nothing the agent writes lands in the directory you
|
|
86
|
+
ran the command from.
|
|
87
|
+
|
|
88
|
+
```sh
|
|
89
|
+
plori attach mate # the agent's most recent session
|
|
90
|
+
plori attach mate --session <id> # a specific session of that agent
|
|
91
|
+
plori attach mate --history 50 # replay 50 turns instead of the default 20
|
|
92
|
+
plori attach mate --read-only # tail it, no prompt
|
|
93
|
+
plori attach mate --verbose # also print reasoning and tool results
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
The argument is an agent name, an agent id, or a session id, so a session id
|
|
97
|
+
copied out of the web app works on its own. With no stored credentials, attach
|
|
98
|
+
runs the browser sign-in inline and continues once it completes. `--history 0`
|
|
99
|
+
replays nothing; `--history all` replays everything one request can carry,
|
|
100
|
+
which stops at the newest 20,000 stored events. `--base-url` (or
|
|
101
|
+
`PLORI_BASE_URL`) points attach at a non-production control-plane, like every
|
|
102
|
+
other command.
|
|
103
|
+
|
|
104
|
+
While attached:
|
|
105
|
+
|
|
106
|
+
- A line of text sends a turn. If a turn is already running, the line steers
|
|
107
|
+
that turn instead of starting a second one, and attach prints whether the
|
|
108
|
+
server gave it to the model straight away or queued it for the next round.
|
|
109
|
+
- `Ctrl-C` cancels the running turn. Press it again within two seconds to
|
|
110
|
+
leave.
|
|
111
|
+
- `Ctrl-D` on an empty line, or `/exit` (`/quit`), detaches only. The run keeps
|
|
112
|
+
going on the server, and attaching again picks it up where it is.
|
|
113
|
+
- The slash commands are `/sessions` (list this agent's sessions), `/new`
|
|
114
|
+
(start one), `/model <slug>` (change the model), `/web` (print this session's
|
|
115
|
+
web address), `/exit`, and `/help`. Anything else that starts with `/` comes
|
|
116
|
+
back as unknown.
|
|
117
|
+
|
|
118
|
+
Approvals and input requests are answered where they appear: `y` or `n` for an
|
|
119
|
+
approval, `a` to answer yes and grant standing approval when the request
|
|
120
|
+
carries a consent tool, a line for a value, and a no-echo read for a secret,
|
|
121
|
+
which is never printed to the screen and never reaches your shell history.
|
|
122
|
+
|
|
123
|
+
The prompt needs a terminal on both ends. With `--read-only`, or when either
|
|
124
|
+
stdin or stdout is redirected, attach drops the prompt and tails the session
|
|
125
|
+
instead, so `plori attach mate | tee session.log` writes a plain transcript
|
|
126
|
+
with no prompt, no echoed keys, and no redraw escape codes. A tail cannot
|
|
127
|
+
answer, so a request that arrives during one is printed with the session's web
|
|
128
|
+
address to answer it at, and a secret is refused rather than read where it
|
|
129
|
+
would echo.
|
|
130
|
+
|
|
33
131
|
## Use
|
|
34
132
|
|
|
35
133
|
```sh
|
|
134
|
+
plori attach mate # open the live session (interactive)
|
|
36
135
|
plori create mate # get-or-create an agent named "mate"
|
|
37
136
|
plori run mate "clone repo X and run the tests"
|
|
38
137
|
plori run mate "long job" --no-wait # returns a run id immediately
|
|
@@ -54,8 +153,10 @@ plori workflows execution "rss digest" <exec-id> # poll one run
|
|
|
54
153
|
|
|
55
154
|
Agents are addressed by name or UUID. Every command accepts `--json`; when
|
|
56
155
|
stdout is not a TTY the output is JSON automatically, so scripts and agents
|
|
57
|
-
can parse without flags.
|
|
58
|
-
|
|
156
|
+
can parse without flags. `plori attach` is the one exception: it is a live
|
|
157
|
+
stream rather than a single result, so it always writes plain text, and a
|
|
158
|
+
redirected stream turns it into a read-only tail. Errors go to stderr; exit
|
|
159
|
+
codes: 0 success, 1 API failure, 2 usage error.
|
|
59
160
|
|
|
60
161
|
## For agent authors
|
|
61
162
|
|
|
@@ -70,4 +171,10 @@ row without a `consent_tool` the flag grants nothing. Prefer one long-lived
|
|
|
70
171
|
agent (`create` returns the existing agent for a reused name) over creating
|
|
71
172
|
new ones.
|
|
72
173
|
|
|
174
|
+
`plori attach` is for a human at a terminal: it takes over the keyboard and
|
|
175
|
+
expects someone to answer approvals. A calling agent should stay on
|
|
176
|
+
`run`/`result`/`inputs`/`answer`, which are one-shot and parse as JSON. If you
|
|
177
|
+
only want to watch a session, `plori attach --read-only` is the scriptable
|
|
178
|
+
form, and redirecting either stdin or stdout already selects it.
|
|
179
|
+
|
|
73
180
|
Wire-level acceptance cases live in [UAT.md](UAT.md).
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@plori/cli",
|
|
3
3
|
"description": "plori (plori.ai): a cloud AI agent with its own computer - persistent disk, real CLI tools, and memory. The official plori CLI.",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.3.0",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://plori.ai",
|
|
7
7
|
"repository": {
|
|
@@ -26,10 +26,10 @@
|
|
|
26
26
|
"node": ">=18"
|
|
27
27
|
},
|
|
28
28
|
"optionalDependencies": {
|
|
29
|
-
"@plori/cli-darwin-arm64": "0.
|
|
30
|
-
"@plori/cli-darwin-x64": "0.
|
|
31
|
-
"@plori/cli-linux-x64": "0.
|
|
32
|
-
"@plori/cli-linux-arm64": "0.
|
|
33
|
-
"@plori/cli-win32-x64": "0.
|
|
29
|
+
"@plori/cli-darwin-arm64": "0.3.0",
|
|
30
|
+
"@plori/cli-darwin-x64": "0.3.0",
|
|
31
|
+
"@plori/cli-linux-x64": "0.3.0",
|
|
32
|
+
"@plori/cli-linux-arm64": "0.3.0",
|
|
33
|
+
"@plori/cli-win32-x64": "0.3.0"
|
|
34
34
|
}
|
|
35
35
|
}
|