Add OpenClaw to local apps#2185
Conversation
pcuenca
left a comment
There was a problem hiding this comment.
Haven't tested the commands, but conceptually looks good.
|
I am now going through this extensively and asking Peter about the long-term stability of CLI args, thank you for bearing with me. I will ping again once I am 100% confident the snippets fit the long term shape |
1f3fda1 to
69682a5
Compare
082dded to
463d781
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ccd307c317
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
Current output of the snippets: GGUF / llama.cpp: # Install llama.cpp:
brew install llama.cpp
# Start a local OpenAI-compatible server:
llama-server -hf ggml-org/gemma-4-E4B-it-GGUF:Q4_K_M
# Install OpenClaw:
npm install -g openclaw@latest
# Register the local server and set it as the default model:
openclaw onboard --non-interactive --mode local \
--auth-choice custom-api-key \
--custom-base-url http://127.0.0.1:8080/v1 \
--custom-model-id "ggml-org/gemma-4-E4B-it-GGUF:Q4_K_M" \
--custom-provider-id llama-cpp \
--custom-compatibility openai \
--custom-text-input \
--accept-risk \
--skip-health
openclaw agent --local --agent main --message "Hello from Hugging Face"MLX: # Install MLX LM:
uv tool install mlx-lm
# Start a local OpenAI-compatible server:
mlx_lm.server --model "mlx-community/Qwen3-0.6B-4bit"
# Install OpenClaw:
npm install -g openclaw@latest
# Register the local server and set it as the default model:
openclaw onboard --non-interactive --mode local \
--auth-choice custom-api-key \
--custom-base-url http://127.0.0.1:8080/v1 \
--custom-model-id "mlx-community/Qwen3-0.6B-4bit" \
--custom-provider-id mlx-lm \
--custom-compatibility openai \
--custom-text-input \
--accept-risk \
--skip-health
openclaw agent --local --agent main --message "Hello from Hugging Face" |
|
AFAIU test failures are unrelated to the changes proposed in this PR |
pcuenca
left a comment
There was a problem hiding this comment.
The llama.app website was released after this was first reviewed. I would now favor using the one-liner installer (instead of brew) and llama serve (instead of llama-server), but I suggest we merge this now and then update for both OpenClaw and Hermes in a new PR.
What do you think @gary149?
|
Sounds good to me either way. The reason I wasn't pushing earlier was to make sure openclaw logo and other assets are in the hub repo I don't know what would happen if we merge this before assets, enum values, etc. are added there. It wouldn't get added to the list of applications right away, right? |
Summary
models.providersand set the selected local model as the defaultTest plan
pnpm --filter @huggingface/tasks test -- local-appspnpm --filter @huggingface/tasks format:checkpnpm --filter @huggingface/tasks checkNote: assumes the OpenClaw local-app logo asset is already available for the
openclawapp key.Note
Low Risk
Additive snippet registry and tests only; no runtime or security-sensitive logic changes.
Overview
Adds OpenClaw as a local app option on model pages for tool-calling GGUF and MLX conversational models (same visibility rule as Pi and Hermes).
Generated snippets walk users through starting the shared local OpenAI-compatible server (
llama-serverormlx_lm.server), runningopenclaw onboardwith custom provider settings pointed athttp://127.0.0.1:8080/v1, and a sampleopenclaw agentcommand. Provider id switches betweenllama-cppandmlx-lmbased on model type.Vitest coverage asserts the GGUF and MLX snippet shapes, including that onboarding uses
--auth-choice custom-api-keywithout emitting a--custom-api-keyflag.Reviewed by Cursor Bugbot for commit faa3f61. Bugbot is set up for automated code reviews on this repo. Configure here.