Files

Extension

Embed lark-cli into your own Agent or application — swap credential sources, audit every command, restrict the command surface — without modifying CLI source. Write a Go package against these interfaces, import it from a wrapper main, and build your own enhanced binary.

Main extension points:

Package Extension point What it does
credential/ Credential Bring your own credential source: database, Vault, config center…
transport/ Transport Intercept every HTTP request: inject headers, rewrite targets, logging & monitoring
platform/ Restrict · Observer · Wrap · On Command allow/deny rules, audit hooks, onion-style middleware (approval gates, rate limiting), process lifecycle — see the Plugin SDK README

📖 Full guide: Embed lark-cli in your Agent (中文)