-
Notifications
You must be signed in to change notification settings - Fork 413
Feature: support multiple profiles / project-level config for multi-org switching #271
Copy link
Copy link
Open
Open
Copy link
Labels
enhancementNew feature or requestNew feature or request
Description
Problem
Currently lark-cli only supports a single global config at ~/.lark-cli/config.json. Users who work across multiple Feishu organizations (e.g., different projects tied to different orgs) must run config init --new and auth login every time they switch context. This is tedious and error-prone.
Proposed Solution
Support one or both of the following:
Option A: Named profiles (like AWS CLI)
# Create / switch profiles
lark-cli config init --profile myorg1
lark-cli config init --profile myorg2
# Use a specific profile
lark-cli calendar +agenda --profile myorg1
# Or set via env var
LARK_CLI_PROFILE=myorg1 lark-cli calendar +agendaOption B: Project-level config file
Look for .lark-cli.json in the current directory (or walk up parent dirs), and use it to override the global config. This way each project directory can be tied to its own org/app.
my-project/
├── .lark-cli.json # project-level config (appId, brand, etc.)
└── ...
Use Case
- A user manages multiple Feishu organizations (e.g., one for company A, one for company B)
- AI agent workflows (Claude Code, Cursor, etc.) operate in project directories — project-level config would allow seamless org switching without manual intervention
Environment
- lark-cli v1.0.4
- Windows 11 / bash
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request