feat: add researchclaw init command and config auto-detection#12
Merged
Jiaaqiliu merged 1 commit intoaiming-lab:mainfrom Mar 17, 2026
Merged
feat: add researchclaw init command and config auto-detection#12Jiaaqiliu merged 1 commit intoaiming-lab:mainfrom
Jiaaqiliu merged 1 commit intoaiming-lab:mainfrom
Conversation
- Add resolve_config_path() to search for config.arc.yaml then config.yaml - Change --config default to None (auto-detect) on run/validate/doctor - Add _resolve_config_or_exit() helper with init hint on missing config - Add `researchclaw init` subcommand with interactive provider selection - String-based template replacement preserves YAML comments
Jiaaqiliu
added a commit
that referenced
this pull request
Mar 17, 2026
Merged community PRs: - PR #12: researchclaw init command and config auto-detection - PR #14: CONTRIBUTING.md - PR #17: ssh_remote and colab_drive experiment sandbox backends - PR #19: native Anthropic Messages API support via adapter pattern Additional fixes: - Deduplicate pyproject.toml optional-dependencies section - Handle OSError in colab drive availability check - Add test_outputs and local docs to .gitignore
Collaborator
|
Hi @jecanore, thanks for this excellent contribution! We've reviewed and merged this PR. The A few notes on what we adjusted during integration:
We also noticed a couple of areas for future improvement (not blocking):
Overall, great work — clean code, good test coverage. Thanks for contributing! |
Jiaaqiliu
added a commit
that referenced
this pull request
Mar 17, 2026
PR #12 (cli init): - Fix provider replacement: match "openai-compatible" instead of "openai" - Fix example config path: search repo root + package dir, not just CWD - Handle EOFError on stdin close during interactive prompt - Return exit code 1 when refusing to overwrite existing config PR #17 (SSH/Colab sandbox): - Fix shell injection: shlex.quote() all user-supplied values in commands - Fix SSH option ordering: ConnectTimeout placed before hostname - Fix subdirectory support: run_project() and scp_upload() now copy dirs - Fix Docker cmd: add explicit python3 invocation, fix GPU flag quoting - Add cleanup of remote dir on upload failure PR #19 (Anthropic adapter): - Fix stop_reason mapping: end_turn→stop, max_tokens→length (truncation) - Fix MetaClaw conflict: adapter uses original URL, not proxy URL - Extract all text content blocks, not just the first - Concatenate multiple system messages instead of dropping earlier ones - Catch all httpx transport errors (ReadError, RemoteProtocolError, etc.) - Detect Anthropic error responses before conversion config.py: - Remove 84 lines of duplicate function definitions (dead code)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
First-time setup requires manually copying
config.researchclaw.example.yamltoconfig.arc.yaml, then hand-editing provider URLs and API key variable names. The CLI also hardcodes--configtoconfig.yaml, so it never findsconfig.arc.yamlwithout an explicit flag.Solution
researchclaw init— copies the example template, prompts for LLM provider (openai, openrouter, deepseek, acp), and writesconfig.arc.yamlwith the right defaults--configdefault from"config.yaml"to auto-detect: triesconfig.arc.yamlfirst, thenconfig.yamlresearchclaw initTest plan
researchclaw initcreatesconfig.arc.yamlwith correct provider settings--force;--forceoverwritesconfig.arc.yamloverconfig.yamlresearchclaw inithint