mirror of
https://github.com/moltbot/moltbot.git
synced 2026-03-08 06:54:24 +00:00
CLI: rename config path subcommand to config file
This commit is contained in:
@@ -13,6 +13,7 @@ Docs: https://docs.openclaw.ai
|
||||
- OpenAI/Streaming transport: make `openai` Responses WebSocket-first by default (`transport: "auto"` with SSE fallback), add shared OpenAI WS stream/connection runtime wiring with per-session cleanup, and preserve server-side compaction payload mutation (`store` + `context_management`) on the WS path.
|
||||
- Android/Gateway capability refresh: add live Android capability integration coverage and node canvas capability refresh wiring, plus runtime hardening for A2UI readiness retries, scoped canvas URL normalization, debug diagnostics JSON, and JavaScript MIME delivery. (#28388) Thanks @obviyus.
|
||||
- Android/Nodes parity: add `system.notify`, `photos.latest`, `contacts.search`/`contacts.add`, `calendar.events`/`calendar.add`, and `motion.activity`/`motion.pedometer`, with motion sensor-aware command gating and improved activity sampling reliability. (#29398) Thanks @obviyus.
|
||||
- CLI/Config: add `openclaw config file` to print the active config file path resolved from `OPENCLAW_CONFIG_PATH` or default locations. (#26256) thanks @cyb1278588254.
|
||||
- Feishu/Docx tables + uploads: add `feishu_doc` actions for Docx table creation/cell writing (`create_table`, `write_table_cells`, `create_table_with_values`) and image/file uploads (`upload_image`, `upload_file`) with stricter create/upload error handling for missing `document_id` and placeholder cleanup failures. (#20304) Thanks @xuhao1.
|
||||
- Feishu/Reactions: add inbound `im.message.reaction.created_v1` handling, route verified reactions through synthetic inbound turns, and harden verification with timeout + fail-closed filtering so non-bot or unverified reactions are dropped. (#16716) Thanks @schumilin.
|
||||
- Feishu/Chat tooling: add `feishu_chat` tool actions for chat info and member queries, with configurable enablement under `channels.feishu.tools.chat`. (#14674) Thanks @liuweifly.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
---
|
||||
summary: "CLI reference for `openclaw config` (get/set/unset config values)"
|
||||
summary: "CLI reference for `openclaw config` (get/set/unset values and config file path)"
|
||||
read_when:
|
||||
- You want to read or edit config non-interactively
|
||||
title: "config"
|
||||
@@ -7,13 +7,14 @@ title: "config"
|
||||
|
||||
# `openclaw config`
|
||||
|
||||
Config helpers: get/set/unset values by path. Run without a subcommand to open
|
||||
Config helpers: get/set/unset values by path and print the active config file.
|
||||
Run without a subcommand to open
|
||||
the configure wizard (same as `openclaw configure`).
|
||||
|
||||
## Examples
|
||||
|
||||
```bash
|
||||
openclaw config path
|
||||
openclaw config file
|
||||
openclaw config get browser.executablePath
|
||||
openclaw config set browser.executablePath "/usr/bin/google-chrome"
|
||||
openclaw config set agents.defaults.heartbeat.every "2h"
|
||||
@@ -50,6 +51,6 @@ openclaw config set channels.whatsapp.groups '["*"]' --strict-json
|
||||
|
||||
## Subcommands
|
||||
|
||||
- `config path`: Print the active config file path (resolved from `OPENCLAW_CONFIG_PATH` or default location).
|
||||
- `config file`: Print the active config file path (resolved from `OPENCLAW_CONFIG_PATH` or default location).
|
||||
|
||||
Restart the gateway after edits.
|
||||
|
||||
@@ -380,7 +380,7 @@ Interactive configuration wizard (models, channels, skills, gateway).
|
||||
|
||||
### `config`
|
||||
|
||||
Non-interactive config helpers (get/set/unset). Running `openclaw config` with no
|
||||
Non-interactive config helpers (get/set/unset/file). Running `openclaw config` with no
|
||||
subcommand launches the wizard.
|
||||
|
||||
Subcommands:
|
||||
@@ -388,7 +388,7 @@ Subcommands:
|
||||
- `config get <path>`: print a config value (dot/bracket path).
|
||||
- `config set <path> <value>`: set a value (JSON5 or raw string).
|
||||
- `config unset <path>`: remove a value.
|
||||
- `config path`: print the active config file path.
|
||||
- `config file`: print the active config file path.
|
||||
|
||||
### `doctor`
|
||||
|
||||
|
||||
@@ -289,12 +289,12 @@ describe("config cli", () => {
|
||||
});
|
||||
});
|
||||
|
||||
describe("config path", () => {
|
||||
describe("config file", () => {
|
||||
it("prints the active config file path", async () => {
|
||||
const resolved: OpenClawConfig = { gateway: { port: 18789 } };
|
||||
setSnapshot(resolved, resolved);
|
||||
|
||||
await runConfigCommand(["config", "path"]);
|
||||
await runConfigCommand(["config", "file"]);
|
||||
|
||||
expect(mockLog).toHaveBeenCalledWith("/tmp/openclaw.json");
|
||||
expect(mockWriteConfigFile).not.toHaveBeenCalled();
|
||||
@@ -306,7 +306,7 @@ describe("config cli", () => {
|
||||
snapshot.path = "/home/user/.openclaw/openclaw.json";
|
||||
mockReadConfigFileSnapshot.mockResolvedValueOnce(snapshot);
|
||||
|
||||
await runConfigCommand(["config", "path"]);
|
||||
await runConfigCommand(["config", "file"]);
|
||||
|
||||
expect(mockLog).toHaveBeenCalledWith("/home/user/.openclaw/openclaw.json");
|
||||
});
|
||||
|
||||
@@ -324,7 +324,7 @@ export async function runConfigUnset(opts: { path: string; runtime?: RuntimeEnv
|
||||
}
|
||||
}
|
||||
|
||||
export async function runConfigPath(opts: { runtime?: RuntimeEnv }) {
|
||||
export async function runConfigFile(opts: { runtime?: RuntimeEnv }) {
|
||||
const runtime = opts.runtime ?? defaultRuntime;
|
||||
try {
|
||||
const snapshot = await readConfigFileSnapshot();
|
||||
@@ -339,7 +339,7 @@ export function registerConfigCli(program: Command) {
|
||||
const cmd = program
|
||||
.command("config")
|
||||
.description(
|
||||
"Non-interactive config helpers (get/set/unset). Run without subcommand for the setup wizard.",
|
||||
"Non-interactive config helpers (get/set/unset/file). Run without subcommand for the setup wizard.",
|
||||
)
|
||||
.addHelpText(
|
||||
"after",
|
||||
@@ -403,9 +403,9 @@ export function registerConfigCli(program: Command) {
|
||||
});
|
||||
|
||||
cmd
|
||||
.command("path")
|
||||
.command("file")
|
||||
.description("Print the active config file path")
|
||||
.action(async () => {
|
||||
await runConfigPath({});
|
||||
await runConfigFile({});
|
||||
});
|
||||
}
|
||||
|
||||
@@ -83,7 +83,7 @@ const coreEntries: CoreCliEntry[] = [
|
||||
{
|
||||
name: "config",
|
||||
description:
|
||||
"Non-interactive config helpers (get/set/unset). Default: starts setup wizard.",
|
||||
"Non-interactive config helpers (get/set/unset/file). Default: starts setup wizard.",
|
||||
hasSubcommands: true,
|
||||
},
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user