@ai-digital-factory/lmt-web-cli 0.1.1 → 0.1.2
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 +61 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -5,6 +5,67 @@ browser interaction with the configured local or dev Live Market Terminal Web UR
|
|
|
5
5
|
keeps browser dependencies and session lifetime out of the browser-free `lmt`
|
|
6
6
|
HTTP CLI.
|
|
7
7
|
|
|
8
|
+
## Agent guide (Dev only)
|
|
9
|
+
|
|
10
|
+
Agents working with a deployed Live Market Terminal must use the **Dev** environment.
|
|
11
|
+
Do not target production. The examples here use the published CLI through `npx` and
|
|
12
|
+
open a headless desktop browser by default.
|
|
13
|
+
|
|
14
|
+
Install Chromium once on the machine that will own the browser session:
|
|
15
|
+
|
|
16
|
+
```sh
|
|
17
|
+
npx --yes @ai-digital-factory/lmt-web-cli@latest install-browser
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
If Operator login needs the Gate Operator Directory, provision this CLI's SMS read
|
|
21
|
+
credential once from a secure input source. The Web CLI keeps its credential
|
|
22
|
+
separately from `lmt-cli` and does not use profiles:
|
|
23
|
+
|
|
24
|
+
```sh
|
|
25
|
+
npx --yes @ai-digital-factory/lmt-web-cli@latest credential provision --env dev --credential-stdin
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
Start a fresh desktop session against Dev and keep the returned `sessionId` for every
|
|
29
|
+
later command:
|
|
30
|
+
|
|
31
|
+
```sh
|
|
32
|
+
npx --yes @ai-digital-factory/lmt-web-cli@latest start --env dev --device desktop
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
The session starts on the Home Page. Use the same session to log into the Operator;
|
|
36
|
+
if a Zerodha login is required, start that flow and submit the current OTP through
|
|
37
|
+
standard input only, using the `attemptId` returned by `zerodha-login`:
|
|
38
|
+
|
|
39
|
+
```sh
|
|
40
|
+
npx --yes @ai-digital-factory/lmt-web-cli@latest operator-login --session SESSION_ID
|
|
41
|
+
npx --yes @ai-digital-factory/lmt-web-cli@latest zerodha-login --session SESSION_ID
|
|
42
|
+
npx --yes @ai-digital-factory/lmt-web-cli@latest zerodha-otp --session SESSION_ID --attempt ATTEMPT_ID --stdin
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
The user supplies the OTP for the active attempt. Never put it in a command-line
|
|
46
|
+
argument or ask the CLI to retrieve it. Inspect the latest JSON result after each
|
|
47
|
+
command. Control references are short-lived: every new observation or action returns
|
|
48
|
+
fresh references, so use only references from the most recent result.
|
|
49
|
+
|
|
50
|
+
For example, to add an instrument to Market Watch, inspect the page, select `NSE`
|
|
51
|
+
in an empty row, enter the symbol, then apply that row. Use the current row's control
|
|
52
|
+
references from each immediately preceding result. `Apply` configures the Market
|
|
53
|
+
Watch row; it does not submit a trade.
|
|
54
|
+
|
|
55
|
+
Each command returns JSON with the page state and screenshot path. Review the result
|
|
56
|
+
before continuing, especially if an action is `uncertain`; inspect the page instead
|
|
57
|
+
of repeating that action automatically. When finished, stop only the session you
|
|
58
|
+
started:
|
|
59
|
+
|
|
60
|
+
```sh
|
|
61
|
+
npx --yes @ai-digital-factory/lmt-web-cli@latest stop --session SESSION_ID
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
Stopping releases the browser process but does not log out the Operator or stop
|
|
65
|
+
Broker activity. The CLI also supports `inspect`, `click`, `fill`, `select`, and
|
|
66
|
+
`navigate`; run `npx --yes @ai-digital-factory/lmt-web-cli@latest --help` for the
|
|
67
|
+
complete command list.
|
|
68
|
+
|
|
8
69
|
## Install
|
|
9
70
|
|
|
10
71
|
Requires Node.js 22 or later, Chromium, and a macOS or Linux session owner.
|