Support multiple profiles (instances/accounts)
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 48/100
Hướng nghiên cứu
Bắt đầu bằng việc đọc internal/config/CLAUDE.md, đặc biệt là TODO về profile-support, sau đó lần theo auth login hiện có, quá trình tải cấu hình, việc lưu trữ trong keyring và cách xử lý các flag của lệnh. Xác định quá trình di chuyển từ cấu hình phẳng và xác minh rằng việc chọn profile tuân theo thứ tự ưu tiên đã nêu, đồng thời giữ nguyên các thiết lập hiện có.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Is your feature or enhancement related to a problem? Please describe.
The CLI stores a single instance in ~/.chatwoot/config.yaml (base URL + account ID, with the token in the OS keyring). If you work across more than one Chatwoot there's no way to keep them side by side: a self-hosted staging vs production, an agency with several client accounts, or one person who belongs to multiple accounts. The only option today is re-running auth login, which overwrites the saved login every time you switch. internal/config/CLAUDE.md already lists this as a TODO ("Add profile support (multiple saved credentials)").
Describe the solution you'd like
Named profiles, following the CLI's existing noun grammar:
chatwoot auth login --profile staging # save a second instance
chatwoot profiles # list saved profiles
chatwoot profile staging use # set the default
chatwoot --profile staging convs # one-off override for one command
Resolution order: --profile flag, then CHATWOOT_PROFILE, then a configured default, then default. Each profile keeps its own token in the keyring. The existing flat config would migrate into a default profile on first load, so current setups keep working with no re-login.
Describe alternatives you've considered
- Re-running
auth loginto switch instances (the status quo, loses the previous login each time). CHATWOOT_API_KEYplus-afor the account, but the env var is global, so it can't hold more than one instance at once and still needs the matching base URL.- Hand-managed config files or per-shell wrappers, which is the manual version of what profiles would do.
Additional context
I run a few instances and would be glad to open a PR for this if it's a direction you'd accept.
- Ngôn ngữ chính
- Go
- Star
- 11
- Fork
- 5
- Merge trung bình
- 2 phút
- Pull request đã merge (30 ngày)
- 2
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của chatwoot/cli
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
Issue tương tự
-
usage: a custom provider's balance meters ("…%" in the balance path) ignore the Left/Used switchĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug iam-service
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
platform-mesh/platform-mesh#425 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
grafana/tempo-operator#1691 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
fix: presentation.go with mcp-table.go: the message for each MCP server comes backCó thể đã có người làm @mge1512 đã nhận hôm nay. Đang mởbug
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 78/100
mark3labs/kit#242 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Project submission: Sno StationĐang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 85/100
slavakurilyak/awesome-ai-agents#827 ·
Maintainer thường phản hồi trong vòng 1 ngày