You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+9-9Lines changed: 9 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -90,19 +90,19 @@ ocli messages --limit 10
90
90
91
91
### Command search
92
92
93
-
When the API surface is too large for `--help`, use the built-in search:
93
+
When the API surface is too large for `--help`, use command filtering with `commands`:
94
94
95
95
```bash
96
96
# BM25 natural language search
97
-
ocli search --query "upload files"
98
-
ocli search -q "list messages" --limit 5
97
+
ocli commands --query "upload files"
98
+
ocli commands -q "list messages" --limit 5
99
99
100
100
# Regex pattern matching
101
-
ocli search --regex "admin.*get"
102
-
ocli search -r "messages" -n 3
101
+
ocli commands --regex "admin.*get"
102
+
ocli commands -r "messages" -n 3
103
103
```
104
104
105
-
The BM25 engine (ported from [picoclaw](https://github.com/sipeed/picoclaw)) ranks commands by relevance across name, method, path, description, and parameter names. This enables agents to discover the right endpoint without loading all command schemas into context.
105
+
The BM25 engine (ported from [picoclaw](https://github.com/sipeed/picoclaw)) ranks commands by relevance across name, method, path, description, and parameter names. This enables agents to discover the right endpoint without loading all command schemas into context. The legacy `ocli search` command is kept as a deprecated alias and internally forwards to `ocli commands` with the same flags.
106
106
107
107
### Installation and usage via npm and npx
108
108
@@ -236,9 +236,8 @@ The `ocli` binary provides the following core commands:
236
236
-`ocli profiles show <profile>` - show profile details;
237
237
-`ocli profiles remove <profile>` - remove a profile;
238
238
-`ocli use <profile>` - set the profile to use when `--profile` is not passed (writes profile name to `.ocli/current`).
239
-
-`ocli commands` - list available commands generated from the current profile and its OpenAPI spec.
240
-
-`ocli search --query <text>` - BM25-ranked search across commands by name, path, description.
241
-
-`ocli search --regex <pattern>` - regex pattern search across commands.
239
+
-`ocli commands` - list available commands generated from the current profile and its OpenAPI spec, optionally filter them with `--query` (BM25) or `--regex`.
240
+
-`ocli search` - deprecated alias for `ocli commands` with `--query/--regex`, kept for backward compatibility.
242
241
-`ocli --version` - print the CLI version baked at build time (derived from the latest git tag when available).
243
242
244
243
Help:
@@ -275,6 +274,7 @@ The project mirrors parts of the `openapi-to-mcp` architecture but implements a
275
274
### Similar projects
276
275
277
276
-[openapi-cli-generator](https://github.com/danielgtaylor/openapi-cli-generator) - generates a CLI from an OpenAPI 3 specification using code generation.
277
+
-[anything-llm-cli](https://github.com/Mintplex-Labs/anything-llm/tree/master/clients/anything-cli) - CLI for interacting with AnythingLLM, can consume HTTP APIs and tools.
278
278
-[openapi-commander](https://github.com/bcoughlan/openapi-commander) - Node.js command-line tool generator based on OpenAPI definitions.
279
279
-[OpenAPI Generator](https://openapi-generator.tech/docs/usage) - general-purpose OpenAPI code generator that can also generate CLI clients.
280
280
-[openapi2cli](https://pypi.org/project/openapi2cli/) - Python tool that builds CLI interfaces for OpenAPI 3 APIs.
0 commit comments