Chi Yau ☕️

Chi YauChi Yau

App Dev

ShareChiWai

Professional Summary

I’m Chi, a passionate tech enthusiast exploring the latest innovations in GenAI, LLMs, web development, performance tuning, and cybersecurity. As a tech guy at a startup, I aim to share my experiences, insights, and lessons learned in the fast-paced world of technology. Join me on this journey as we dive into the exciting challenges and triumphs of building and scaling tech solutions!

Interests

Performance Tuning Building Tech Innovation
Blog

OpenClaw Failed to start CLI: Error: Unknown command: openclaw restart

Encountered an error when trying to restart OpenClaw:

Failed to start CLI: Error: Unknown command: openclaw restart. No built-in command or plugin CLI metadata owns "restart".
    at runCli (file:///home/admin/.npm-global/lib/node_modules/openclaw/dist/cli/run-main.js:310:29)
    at async runMainOrRootHelp (file:///home/admin/.npm-global/lib/node_modules/openclaw/dist/entry.js:468:3)
    at async file:///home/admin/.npm-global/lib/node_modules/openclaw/dist/entry.js:438:55

Issue

The openclaw restart command is not a valid built-in command in OpenClaw. The CLI does not recognize “restart” as an available operation.

Openclaw 常用既command

Openclaw 係一個好用嘅工具,以下係我平時常用嘅 commands,方便大家參考:

Basic Commands

# 查看版本
openclaw --version

# 查看幫助
openclaw --help

Common Operations

# 去設定 openclaw
openclaw onboard

# restart gateway
openclaw restart gateway

Edit configuration:

How to query json field in Postgresql

JSON 是一種常見的數據格式,Database 已經可以支援儲存同Query JSON 數據類型

今日就要係postgresql 度query 個 JSON field 睇返D log 同埋做返D data analysis

如何query JSON field in PostgreSQL 呢?

PostgreSQL 提供了兩個主要的操作符來查詢 JSON 數據:

  • -> - 獲取 JSON 對象欄位(返回 JSON 類型)
  • ->> - 獲取 JSON 對象欄位(返回 TEXT 類型)

查詢範例

假設我們有一個 users 表,其中 profile 欄位是 JSONB 類型: