mirror of
https://github.com/aljazceru/opencode.git
synced 2025-12-23 02:34:21 +01:00
fix: ensure flags & docs match (#3638)
Co-authored-by: opencode-agent[bot] <opencode-agent[bot]@users.noreply.github.com> Co-authored-by: rekram1-node <rekram1-node@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
e630d680dd
commit
a018a15f32
@@ -12,7 +12,6 @@ export const ServeCommand = cmd({
|
|||||||
default: 0,
|
default: 0,
|
||||||
})
|
})
|
||||||
.option("hostname", {
|
.option("hostname", {
|
||||||
alias: ["h"],
|
|
||||||
type: "string",
|
type: "string",
|
||||||
describe: "hostname to listen on",
|
describe: "hostname to listen on",
|
||||||
default: "127.0.0.1",
|
default: "127.0.0.1",
|
||||||
|
|||||||
@@ -65,7 +65,6 @@ export const TuiCommand = cmd({
|
|||||||
default: 0,
|
default: 0,
|
||||||
})
|
})
|
||||||
.option("hostname", {
|
.option("hostname", {
|
||||||
alias: ["h"],
|
|
||||||
type: "string",
|
type: "string",
|
||||||
describe: "hostname to listen on",
|
describe: "hostname to listen on",
|
||||||
default: "127.0.0.1",
|
default: "127.0.0.1",
|
||||||
|
|||||||
@@ -38,6 +38,7 @@ process.on("uncaughtException", (e) => {
|
|||||||
const cli = yargs(hideBin(process.argv))
|
const cli = yargs(hideBin(process.argv))
|
||||||
.scriptName("opencode")
|
.scriptName("opencode")
|
||||||
.help("help", "show help")
|
.help("help", "show help")
|
||||||
|
.alias("help", "h")
|
||||||
.version("version", "show version number", Installation.VERSION)
|
.version("version", "show version number", Installation.VERSION)
|
||||||
.alias("version", "v")
|
.alias("version", "v")
|
||||||
.option("print-logs", {
|
.option("print-logs", {
|
||||||
@@ -140,5 +141,5 @@ try {
|
|||||||
// Most notably, some docker-container-based MCP servers don't handle such signals unless
|
// Most notably, some docker-container-based MCP servers don't handle such signals unless
|
||||||
// run using `docker run --init`.
|
// run using `docker run --init`.
|
||||||
// Explicitly exit to avoid any hanging subprocesses.
|
// Explicitly exit to avoid any hanging subprocesses.
|
||||||
process.exit();
|
process.exit()
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,6 +19,28 @@ opencode run "Explain how closures work in JavaScript"
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
### tui
|
||||||
|
|
||||||
|
Start the OpenCode terminal user interface.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
opencode [project]
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Flags
|
||||||
|
|
||||||
|
| Flag | Short | Description |
|
||||||
|
| ------------ | ----- | ------------------------------------------ |
|
||||||
|
| `--continue` | `-c` | Continue the last session |
|
||||||
|
| `--session` | `-s` | Session ID to continue |
|
||||||
|
| `--prompt` | `-p` | Prompt to use |
|
||||||
|
| `--model` | `-m` | Model to use in the form of provider/model |
|
||||||
|
| `--agent` | | Agent to use |
|
||||||
|
| `--port` | | Port to listen on |
|
||||||
|
| `--hostname` | | Hostname to listen on |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
## Commands
|
## Commands
|
||||||
|
|
||||||
The OpenCode CLI also has the following commands.
|
The OpenCode CLI also has the following commands.
|
||||||
@@ -164,13 +186,17 @@ opencode run Explain the use of context in Go
|
|||||||
|
|
||||||
#### Flags
|
#### Flags
|
||||||
|
|
||||||
| Flag | Short | Description |
|
| Flag | Short | Description |
|
||||||
| ------------ | ----- | ------------------------------------------ |
|
| ------------ | ----- | ------------------------------------------------------------------ |
|
||||||
| `--continue` | `-c` | Continue the last session |
|
| `--command` | | The command to run, use message for args |
|
||||||
| `--session` | `-s` | Session ID to continue |
|
| `--continue` | `-c` | Continue the last session |
|
||||||
| `--share` | | Share the session |
|
| `--session` | `-s` | Session ID to continue |
|
||||||
| `--model` | `-m` | Model to use in the form of provider/model |
|
| `--share` | | Share the session |
|
||||||
| `--agent` | | Agent to use |
|
| `--model` | `-m` | Model to use in the form of provider/model |
|
||||||
|
| `--agent` | | Agent to use |
|
||||||
|
| `--file` | `-f` | File(s) to attach to message |
|
||||||
|
| `--format` | | Format: default (formatted) or json (raw JSON events) |
|
||||||
|
| `--title` | | Title for the session (uses truncated prompt if no value provided) |
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -189,7 +215,7 @@ This starts an HTTP server that provides API access to opencode functionality wi
|
|||||||
| Flag | Short | Description |
|
| Flag | Short | Description |
|
||||||
| ------------ | ----- | --------------------- |
|
| ------------ | ----- | --------------------- |
|
||||||
| `--port` | `-p` | Port to listen on |
|
| `--port` | `-p` | Port to listen on |
|
||||||
| `--hostname` | `-h` | Hostname to listen on |
|
| `--hostname` | | Hostname to listen on |
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -221,18 +247,13 @@ opencode upgrade v0.1.48
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## Flags
|
## Global Flags
|
||||||
|
|
||||||
The opencode CLI takes the following global flags.
|
The opencode CLI takes the following global flags.
|
||||||
|
|
||||||
| Flag | Short | Description |
|
| Flag | Short | Description |
|
||||||
| -------------- | ----- | ------------------------------------------ |
|
| -------------- | ----- | ------------------------------------ |
|
||||||
| `--help` | `-h` | Display help |
|
| `--help` | `-h` | Display help |
|
||||||
| `--version` | | Print version number |
|
| `--version` | `-v` | Print version number |
|
||||||
| `--print-logs` | | Print logs to stderr |
|
| `--print-logs` | | Print logs to stderr |
|
||||||
| `--log-level` | | Log level (DEBUG, INFO, WARN, ERROR) |
|
| `--log-level` | | Log level (DEBUG, INFO, WARN, ERROR) |
|
||||||
| `--prompt` | `-p` | Prompt to use |
|
|
||||||
| `--model` | `-m` | Model to use in the form of provider/model |
|
|
||||||
| `--agent` | | Agent to use |
|
|
||||||
| `--port` | | Port to listen on |
|
|
||||||
| `--hostname` | | Hostname to listen on |
|
|
||||||
|
|||||||
Reference in New Issue
Block a user