Skip to content

Configuration

Claude Feishu Channel is configured via a TOML file. The default location is ~/.claude-feishu-channel/config.toml. You can override this path by setting the CLAUDE_FEISHU_CONFIG environment variable.

A fully commented example is available in config.example.toml at the project root.

Config File Setup

bash
mkdir -p ~/.claude-feishu-channel
cp config.example.toml ~/.claude-feishu-channel/config.toml

Config Sections

[feishu] — Feishu App Credentials

KeyDescription
app_idYour Feishu app's App ID (from open.feishu.cn > Credentials)
app_secretYour Feishu app's App Secret
encrypt_keyEvent encryption key (optional; only if encryption is enabled in the Feishu console)
verification_tokenEvent verification token (optional)

[access] — Access Control

KeyDescription
allowed_open_idsArray of open_id values allowed to talk to the bot
unauthorized_behavior"ignore" (silently drop) or "reject" (reply with error)

WARNING

The bot has full shell and file access to your machine. Always configure allowed_open_ids to restrict access.

[claude] — Claude Runtime Defaults

KeyDefaultDescription
default_cwd"~/my-projects"Working directory for new sessions
default_permission_mode"default"Permission mode: default, acceptEdits, plan, bypassPermissions
default_model"claude-opus-4-6"Model ID passed to the CLI's --model flag
cli_path"claude"Path to the claude binary; resolves via $PATH by default
permission_timeout_seconds300Seconds before a permission card auto-denies
permission_warn_before_seconds60Seconds before timeout to post a reminder

[render] — Card Rendering Options

KeyDefaultDescription
inline_max_bytes2048Max UTF-8 bytes of inline content before truncation
hide_thinkingfalseSkip Claude's extended-thinking blocks entirely
show_turn_statstrueShow token usage and timing after each turn

[persistence] — State and Log Paths

KeyDefaultDescription
state_file"~/.claude-feishu-channel/state.json"Path to the session state file
log_dir"~/.claude-feishu-channel/logs"Directory for structured log files
session_ttl_days30Days to keep session records before cleanup on startup

[logging] — Log Level

KeyDefaultDescription
level"info"Log level: trace, debug, info, warn, error

[projects] — Project Aliases

Define aliases for the /project command to quickly switch working directories:

toml
[projects]
my-app = "~/projects/my-app"
infra = "~/projects/infrastructure"

Runtime-Settable Keys

The following keys can be changed at runtime via /config set without restarting the process:

KeyDescription
render.hide_thinkingToggle thinking block visibility
render.show_turn_statsToggle turn statistics
render.inline_max_bytesChange inline content truncation limit
logging.levelChange log verbosity
claude.default_modelSwitch the default model
claude.default_cwdChange the default working directory
claude.default_permission_modeChange the default permission mode
claude.permission_timeout_secondsAdjust permission timeout
claude.permission_warn_before_secondsAdjust the timeout warning threshold

The --persist Flag

By default, /config set only changes the value in memory for the current process. Add --persist to write the change back to config.toml so it survives restarts:

/config set logging.level debug --persist

Environment Variables

VariableDescription
CLAUDE_FEISHU_CONFIGOverride the config file path (default: ~/.claude-feishu-channel/config.toml)
ANTHROPIC_BASE_URLCustom API endpoint for the Claude SDK
ANTHROPIC_AUTH_TOKENAuth token for a custom endpoint

TIP

Environment variables take precedence over config file values where applicable.

Built with VitePress