|
1 | 1 | # CLI |
2 | 2 |
|
3 | | -`bub` exposes four main commands (`run`, `gateway`, `chat`, `login`) plus one hidden one (`hooks` for diagnostics). |
| 3 | +`bub` exposes six public command groups: `run`, `gateway`, `chat`, `install`, `update`, and `login`. It also keeps one hidden diagnostic command: `hooks`. |
4 | 4 |
|
5 | 5 | ## `bub run` |
6 | 6 |
|
@@ -65,6 +65,52 @@ uv run bub chat |
65 | 65 | uv run bub chat --chat-id local --session-id cli:local |
66 | 66 | ``` |
67 | 67 |
|
| 68 | +`chat` reuses the top-level `--workspace/-w` option. By default it sets `chat_id=local`, keeps the channel as `cli`, and leaves the underlying CLI channel session id at `cli_session` unless you pass `--session-id`. |
| 69 | + |
| 70 | +## `bub install` |
| 71 | + |
| 72 | +Install packages into Bub's managed plugin project, or sync that project if no package spec is given. |
| 73 | + |
| 74 | +```bash |
| 75 | +uv run bub install |
| 76 | +uv run bub install my-plugin |
| 77 | +uv run bub install example-owner/example-bub-plugin@main |
| 78 | +uv run bub install https://github.com/example/bub-plugin.git |
| 79 | +``` |
| 80 | + |
| 81 | +Options and behavior: |
| 82 | + |
| 83 | +- `--project`: path to the uv project used for Bub-managed plugins |
| 84 | +- `BUB_PROJECT`: environment variable equivalent of `--project` |
| 85 | +- default project path: `~/.bub/bub-project` |
| 86 | +- if the project does not exist yet, Bub creates a bare uv app project automatically |
| 87 | +- Bub must be installed inside a virtual environment before `install` or `update` can run |
| 88 | + |
| 89 | +Accepted spec forms: |
| 90 | + |
| 91 | +- `https://...` or `git@...`: installed as a Git requirement |
| 92 | +- `owner/repo` or `owner/repo@ref`: expanded to a GitHub repository URL |
| 93 | +- `name`: passed through as a normal package requirement |
| 94 | +- `name@ref`: resolved from `bub-contrib` as `packages/<name>` at the given Git ref |
| 95 | + |
| 96 | +If no package specs are provided, `install` runs a project sync instead of adding anything new. |
| 97 | + |
| 98 | +## `bub update` |
| 99 | + |
| 100 | +Update dependencies inside Bub's managed plugin project. |
| 101 | + |
| 102 | +```bash |
| 103 | +uv run bub update |
| 104 | +uv run bub update my-plugin another-plugin |
| 105 | +``` |
| 106 | + |
| 107 | +Behavior: |
| 108 | + |
| 109 | +- with no package names, upgrades the whole project |
| 110 | +- with package names, upgrades only the selected dependencies |
| 111 | +- uses the same `--project` / `BUB_PROJECT` location as `install` |
| 112 | +- creates the managed project first if it does not exist yet |
| 113 | + |
68 | 114 | ## `bub login` |
69 | 115 |
|
70 | 116 | Authenticate with OpenAI Codex OAuth and persist the resulting credentials under `CODEX_HOME` (default `~/.codex`). |
@@ -98,6 +144,8 @@ BUB_MODEL=openai:gpt-5-codex BUB_API_FORMAT=responses uv run bub chat |
98 | 144 | ## Notes |
99 | 145 |
|
100 | 146 | - `--workspace` is parsed before the subcommand, for example `uv run bub --workspace /repo chat`. |
| 147 | +- `install` and `update` operate on Bub's managed plugin project, not on the current workspace. |
| 148 | +- `uninstall()` exists in the builtin module but is not currently exposed as a public CLI command. |
101 | 149 | - `run` prints each outbound as: |
102 | 150 |
|
103 | 151 | ```text |
|
0 commit comments