Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Support multiple profiles (instances/accounts)

未关闭
#24 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
48/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
冷清
技术栈
go
领域
cli

调研方向

首先阅读 internal/config/CLAUDE.md,尤其是 profile-support TODO,然后追踪现有的 auth login、配置加载、keyring 存储和命令标志处理。定义从扁平配置的迁移方案,并验证 profile 选择遵循所述优先级,同时保留现有设置。

由索引模型根据 Issue 内容生成。

描述

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 login to switch instances (the status quo, loses the previous login each time).
  • CHATWOOT_API_KEY plus -a for 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.

主要语言
Go
星标
9
派生
5
平均合并
2 分钟
30 天内合并 PR
2

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

chatwoot/cli 的其他 Issue

查看 chatwoot/cli 的全部 Issue

相似的 Issue

更多 Go Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。