Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,10 @@ Each Chrome profile runs its own OpenCLI extension instance. If you use multiple
opencli profile list
opencli profile rename <contextId> work
opencli profile use work
opencli --profile work browser state
```

Use `--profile work` to route a single command without changing the default. Browser commands still require their own session name, e.g. `opencli --profile work browser demo state`.

With only one connected profile, OpenCLI uses it automatically. With multiple connected profiles and no default, OpenCLI asks you to choose instead of guessing.

### 5. Run your first commands
Expand Down
16 changes: 15 additions & 1 deletion README.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,21 @@ OpenCLI 通过轻量 Browser Bridge 扩展和本地微型 daemon 与 Chrome/Chro
opencli doctor
```

### 4. 跑第一个命令
### 4. 可选:给 Chrome profile 起别名

每个 Chrome profile 都会运行自己的 OpenCLI 扩展实例。如果你同时使用多个 Chrome profile,可以先列出已连接的 profile,再给本地常用的 profile 起一个别名:

```bash
opencli profile list
opencli profile rename <contextId> work
opencli profile use work
```

如果只想让单条命令使用这个 profile,而不修改默认 profile,可以传 `--profile work`。注意 `browser` 命令仍然需要自己的 session 名,例如:`opencli --profile work browser demo state`。

只有一个 profile 连接时,OpenCLI 会自动使用它;多个 profile 同时连接且没有默认值时,OpenCLI 会要求你明确选择,而不是自动猜测。

### 5. 跑第一个命令

```bash
opencli list
Expand Down