Skip to content

Feature: support multiple profiles / project-level config for multi-org switching #271

@AllenChen-Xingan

Description

@AllenChen-Xingan

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 +agenda

Option 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions