Skip to content

Commit 3176fbd

Browse files
refactor(cli): rename ogx launch command group to ogx connect
The `launch` terminology collided conceptually with starting the server. Rename the command subgroup to `connect`, which better describes its purpose of connecting OGX to external services like OpenCode. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Signed-off-by: Nathan Weinberg <nweinber@redhat.com>
1 parent 3c0d7ab commit 3176fbd

10 files changed

Lines changed: 270 additions & 268 deletions

File tree

docs/docs/api-openai/conformance.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -727,7 +727,7 @@ Below is a detailed breakdown of conformance issues and missing properties for e
727727
| `responses.200.content.application/json.properties.output.items` | Union variants added: 8; Union variants removed: 4 | Yes |
728728
| `responses.200.content.application/json.properties.parallel_tool_calls` | Default changed: None -&gt; True | Yes |
729729
| `responses.200.content.application/json.properties.reasoning` | Union variants added: 1; Union variants removed: 1 | Yes |
730-
| `responses.200.content.application/json.properties.text` | Type added: ['object']; Default changed: None -&gt; \{'format': \{'type': 'text'\}\} | No |
730+
| `responses.200.content.application/json.properties.text` | Type added: ['object'] | No |
731731
| `responses.200.content.application/json.properties.tool_choice` | Union variants added: 3 | Yes |
732732
| `responses.200.content.application/json.properties.tools.items` | Union variants added: 4; Union variants removed: 1 | Yes |
733733
| `responses.200.content.application/json.properties.truncation` | Union variants added: 2 | Yes |

docs/docs/building_applications/opencode_integration.mdx

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ sidebar_position: 6
77

88
# OpenCode Integration
99

10-
OGX includes built-in support for launching [OpenCode](https://opencode.ai), a terminal-based AI coding assistant, with a single command. All available models on your OGX server are automatically configured and ready to use.
10+
OGX includes built-in support for connecting [OpenCode](https://opencode.ai), a terminal-based AI coding assistant, with a single command. All available models on your OGX server are automatically configured and ready to use.
1111

1212
## Quick Start
1313

@@ -18,25 +18,25 @@ export OPENAI_API_KEY="your-key-here"
1818
ogx stack run starter
1919
```
2020

21-
### 2. Launch OpenCode
21+
### 2. Connect OpenCode
2222

2323
```bash
24-
ogx launch opencode
24+
ogx connect opencode
2525
```
2626

2727
That's it. OpenCode starts with all your OGX models available and the first model pre-selected.
2828

2929
## How It Works
3030

31-
The `ogx launch opencode` command:
31+
The `ogx connect opencode` command:
3232

3333
1. Queries the running OGX server for available models
3434
2. Filters out non-LLM models (embeddings, rerankers)
3535
3. Generates an OpenCode provider configuration with all discovered models
3636
4. Launches OpenCode with the configuration via the `OPENCODE_CONFIG_CONTENT` environment variable
3737

3838
```
39-
ogx launch opencode
39+
ogx connect opencode
4040
|
4141
v
4242
GET /v1/models (discover available models)
@@ -54,7 +54,7 @@ ogx launch opencode
5454
## CLI Reference
5555

5656
```bash
57-
ogx launch opencode [--model MODEL] [--host HOST] [--port PORT]
57+
ogx connect opencode [--model MODEL] [--host HOST] [--port PORT]
5858
```
5959

6060
**Options:**
@@ -72,13 +72,13 @@ All discovered LLM models are available in OpenCode regardless of which model is
7272
### With a specific default model
7373

7474
```bash
75-
ogx launch opencode --model openai/gpt-4o
75+
ogx connect opencode --model openai/gpt-4o
7676
```
7777

7878
### With a remote OGX server
7979

8080
```bash
81-
ogx launch opencode --host 192.168.1.100 --port 9000
81+
ogx connect opencode --host 192.168.1.100 --port 9000
8282
```
8383

8484
### With Ollama backend
@@ -88,8 +88,8 @@ ogx launch opencode --host 192.168.1.100 --port 9000
8888
export OLLAMA_URL="http://localhost:11434/v1"
8989
ogx stack run starter
9090

91-
# Terminal 2: Launch OpenCode
92-
ogx launch opencode
91+
# Terminal 2: Connect OpenCode
92+
ogx connect opencode
9393
```
9494

9595
### With vLLM backend
@@ -99,14 +99,14 @@ ogx launch opencode
9999
export VLLM_URL="http://localhost:8000/v1"
100100
ogx stack run starter
101101

102-
# Terminal 2: Launch OpenCode
103-
ogx launch opencode --model vllm/Qwen/Qwen3-8B
102+
# Terminal 2: Connect OpenCode
103+
ogx connect opencode --model vllm/Qwen/Qwen3-8B
104104
```
105105

106106
## Prerequisites
107107

108108
- **OpenCode** must be installed and available in your `PATH`. Install it from [opencode.ai](https://opencode.ai).
109-
- **OGX server** must be running before launching OpenCode. Start it with `ogx stack run` or `ogx stack letsgo`.
109+
- **OGX server** must be running before connecting OpenCode. Start it with `ogx stack run` or `ogx stack letsgo`.
110110

111111
## Troubleshooting
112112

docs/docs/references/ogx_cli_reference/index.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ You have two ways to install OGX:
3131
## `ogx` subcommands
3232

3333
1. `stack`: Allows you to build a stack using the `ogx` distribution and run a OGX server. You can read more about how to build a OGX distribution in the [Build your own Distribution](../../distributions/building_distro) documentation.
34-
2. `launch`: Launch third-party tools configured for OGX. Currently supports `opencode`. See [OpenCode Integration](../../building_applications/opencode_integration) for details.
34+
2. `connect`: Connect third-party tools to the running OGX server. Currently supports `opencode`. See [OpenCode Integration](../../building_applications/opencode_integration) for details.
3535

3636
For downloading models, we recommend using the [Hugging Face CLI](https://huggingface.co/docs/huggingface_hub/guides/cli). See [Downloading models](#downloading-models) for more information.
3737

@@ -42,18 +42,18 @@ llama --help
4242
```
4343

4444
```text
45-
usage: ogx [-h] {stack,launch} ...
45+
usage: ogx [-h] {stack,connect} ...
4646
4747
Welcome to the OGX CLI
4848
4949
options:
5050
-h, --help show this help message and exit
5151
5252
subcommands:
53-
{stack,launch}
53+
{stack,connect}
5454
5555
stack Operations for the OGX / Distributions
56-
launch Launch third-party tools configured for OGX
56+
connect Connect third-party tools to the running OGX server
5757
```
5858

5959
## Downloading models

docs/static/openai-coverage.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1431,8 +1431,7 @@
14311431
{
14321432
"property": "POST.responses.200.content.application/json.properties.text",
14331433
"details": [
1434-
"Type added: ['object']",
1435-
"Default changed: None -> {'format': {'type': 'text'}}"
1434+
"Type added: ['object']"
14361435
]
14371436
},
14381437
{
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44
# This source code is licensed under the terms described in the LICENSE file in
55
# the root directory of this source tree.
66

7-
from .launch import LaunchParser # noqa
7+
from .connect import ConnectParser # noqa
Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,24 +9,27 @@
99
from ogx.cli.stack.utils import print_subcommand_description
1010
from ogx.cli.subcommand import Subcommand
1111

12-
from .opencode import LaunchOpenCode
12+
from .opencode import ConnectOpenCode
1313

1414

15-
class LaunchParser(Subcommand):
16-
"""Top-level CLI parser for the 'ogx launch' command group."""
15+
class ConnectParser(Subcommand):
16+
"""Top-level CLI parser for the 'ogx connect' command group.
17+
18+
`connect` is a command subgroup used to connect OGX to external services.
19+
"""
1720

1821
def __init__(self, subparsers: argparse._SubParsersAction) -> None:
1922
super().__init__()
2023
self.parser = subparsers.add_parser(
21-
"launch",
22-
prog="ogx launch",
23-
description="Launch third-party tools configured for OGX",
24+
"connect",
25+
prog="ogx connect",
26+
description="Connect third-party tools to the running OGX server",
2427
formatter_class=argparse.RawTextHelpFormatter,
2528
)
2629

2730
self.parser.set_defaults(func=lambda args: self.parser.print_help())
2831

29-
subparsers = self.parser.add_subparsers(title="launch_subcommands")
32+
subparsers = self.parser.add_subparsers(title="connect_subcommands")
3033

31-
LaunchOpenCode.create(subparsers)
34+
ConnectOpenCode.create(subparsers)
3235
print_subcommand_description(self.parser, subparsers)
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,19 +20,19 @@
2020
logger = get_logger(name=__name__, category="cli")
2121

2222

23-
class LaunchOpenCode(Subcommand):
24-
"""Launch OpenCode configured to use the running OGX server."""
23+
class ConnectOpenCode(Subcommand):
24+
"""Connect OpenCode to the running OGX server."""
2525

2626
def __init__(self, subparsers: argparse._SubParsersAction) -> None:
2727
super().__init__()
2828
self.parser = subparsers.add_parser(
2929
"opencode",
30-
prog="ogx launch opencode",
30+
prog="ogx connect opencode",
3131
description="Launch OpenCode connected to the running OGX server.",
3232
formatter_class=argparse.ArgumentDefaultsHelpFormatter,
3333
)
3434
self._add_arguments()
35-
self.parser.set_defaults(func=self._run_launch_opencode_cmd)
35+
self.parser.set_defaults(func=self._run_connect_opencode_cmd)
3636

3737
def _add_arguments(self) -> None:
3838
self.parser.add_argument(
@@ -54,7 +54,7 @@ def _add_arguments(self) -> None:
5454
help="OGX server host.",
5555
)
5656

57-
def _run_launch_opencode_cmd(self, args: argparse.Namespace) -> None:
57+
def _run_connect_opencode_cmd(self, args: argparse.Namespace) -> None:
5858
if not shutil.which("opencode"):
5959
cprint(
6060
"Failed to find 'opencode' in PATH. Install it from https://opencode.ai",
@@ -75,7 +75,7 @@ def _run_launch_opencode_cmd(self, args: argparse.Namespace) -> None:
7575
config = self._build_opencode_config(base_url, models, default_model)
7676
config_json = json.dumps(config)
7777

78-
logger.info("Launching OpenCode", default_model=default_model, models=len(models), base_url=base_url)
78+
logger.info("Connecting to OpenCode", default_model=default_model, models=len(models), base_url=base_url)
7979

8080
env = {**os.environ, "OPENCODE_CONFIG_CONTENT": config_json}
8181
result = subprocess.run(["opencode"], env=env)

src/ogx/cli/ogx.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# Initialize logging early before any loggers get created
1313
setup_logging()
1414

15-
from .launch import LaunchParser # type: ignore[attr-defined]
15+
from .connect import ConnectParser # type: ignore[attr-defined]
1616
from .letsgo import LetsGo
1717
from .run import Run
1818
from .stack import StackParser # type: ignore[attr-defined]
@@ -39,7 +39,7 @@ def __init__(self) -> None:
3939
LetsGo.create(subparsers)
4040
Run.create(subparsers)
4141
StackParser.create(subparsers)
42-
LaunchParser.create(subparsers)
42+
ConnectParser.create(subparsers)
4343

4444
print_subcommand_description(self.parser, subparsers)
4545

0 commit comments

Comments
 (0)