Skip to content

feat: add bl config agent command for one-click coding agent configuration#69

Open
lishengzxc wants to merge 4 commits into
mainfrom
feat/agent-setup
Open

feat: add bl config agent command for one-click coding agent configuration#69
lishengzxc wants to merge 4 commits into
mainfrom
feat/agent-setup

Conversation

@lishengzxc

@lishengzxc lishengzxc commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add bl config agent command that configures coding agents (Claude Code, Qwen Code, OpenCode, OpenClaw, Hermes, Codex) to use DashScope API with a single command
  • Support both npx bailian-cli config agent CLI usage and standalone curl/irm one-liner scripts (no Node.js required)
  • Auto-detect API protocol (Anthropic vs OpenAI-compatible) from --base-url

Test plan

  • bl config agent --agent claude-code --base-url <url> --api-key <key> --model <model> --dry-run
  • bl config agent --agent codex --base-url <url> --api-key <key> --model <model> --dry-run
  • bl config agent --help shows correct usage
  • Verify each supported agent writes correct config files

🤖 Generated with Claude Code

lishengzxc and others added 4 commits June 19, 2026 23:25
Add a new command that configures popular coding agents (Claude Code,
Qwen Code, OpenCode, OpenClaw, Hermes, Codex) to use DashScope API
with a single copy-paste command from the web console.

Supports Linux, macOS, and Windows. Non-destructively merges into
existing config files with automatic backup.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- OpenCode/OpenClaw/Hermes: dynamically choose API protocol based on
  whether the base-url is an anthropic endpoint or openai-compatible
- Codex: write ~/.codex/auth.json alongside config.toml so users
  don't need to manually export OPENAI_API_KEY
- Add shared isAnthropicEndpoint() helper in writers/utils.ts

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Two variants:
- via-bailian-cli/: uses npx bailian-cli (requires Node.js 22+)
- pure/: zero dependencies, writes config files directly in bash/PowerShell

Supports all 6 agents with API protocol auto-detection from base-url.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
… files

Move agent configuration command under the `config` command group for
better semantic alignment. Relocate all related files from
`commands/agent/` into `commands/config/agent/`.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@lishengzxc lishengzxc changed the title feat: add bl agent setup command for one-click agent configuration feat: add bl config agent command for one-click coding agent configuration Jun 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant