Documentation
¶
Overview ¶
Copyright (c) 2026 Lark Technologies Pte. Ltd. SPDX-License-Identifier: MIT
lark-cli — Feishu/Lark CLI tool (Go implementation).
Directories
¶
| Path | Synopsis |
|---|---|
|
event/render
Package render turns consume decisions into user-facing output.
|
Package render turns consume decisions into user-facing output. |
|
skill
Package skill implements the `lark-cli skills` command group, which serves binary-embedded skill content to AI agents.
|
Package skill implements the `lark-cli skills` command group, which serves binary-embedded skill content to AI agents. |
|
Package errs is the public error-contract surface for lark-cli.
|
Package errs is the public error-contract surface for lark-cli. |
|
Package events aggregates the domain EventKey declarations.
|
Package events aggregates the domain EventKey declarations. |
|
application
Package application registers Application-domain EventKeys.
|
Package application registers Application-domain EventKeys. |
|
approval
Package approval registers Approval-domain EventKeys.
|
Package approval registers Approval-domain EventKeys. |
|
im
Package im registers IM-domain EventKeys.
|
Package im registers IM-domain EventKeys. |
|
internal/subscribeprep
Package subscribeprep provides the shared PreConsume hook for EventKeys whose server-side subscription is a plain event_type register/unregister pair against fixed OAPI paths.
|
Package subscribeprep provides the shared PreConsume hook for EventKeys whose server-side subscription is a plain event_type register/unregister pair against fixed OAPI paths. |
|
minutes
Package minutes registers Minutes-domain EventKeys.
|
Package minutes registers Minutes-domain EventKeys. |
|
task
Package task registers Task-domain EventKeys.
|
Package task registers Task-domain EventKeys. |
|
vc
Package vc registers VC-domain EventKeys.
|
Package vc registers VC-domain EventKeys. |
|
whiteboard
Package whiteboard registers Board-domain EventKeys.
|
Package whiteboard registers Board-domain EventKeys. |
|
extension
|
|
|
platform
Package platform is the single public extension contract for lark-cli.
|
Package platform is the single public extension contract for lark-cli. |
|
platform/examples/audit-observer
command
Command audit-observer is a runnable fork of lark-cli that logs every dispatched command to stderr.
|
Command audit-observer is a runnable fork of lark-cli that logs every dispatched command to stderr. |
|
platform/examples/readonly-policy
command
Command readonly-policy is a runnable fork of lark-cli that installs a Rule permitting only docs/* and im/* read commands.
|
Command readonly-policy is a runnable fork of lark-cli that installs a Rule permitting only docs/* and im/* read commands. |
|
internal
|
|
|
affordance
Package affordance is the lazily-loaded store of usage guidance for service-API methods.
|
Package affordance is the lazily-loaded store of usage guidance for service-API methods. |
|
apicatalog
Package apicatalog is the single navigation Module over the API metadata.
|
Package apicatalog is the single navigation Module over the API metadata. |
|
appmeta
Package appmeta exposes read-only views of a Feishu app's published version, subscribed event types, and scopes.
|
Package appmeta exposes read-only views of a Feishu app's published version, subscribed event types, and scopes. |
|
charcheck
Package charcheck provides character-level security checks shared across path validation (localfileio) and input validation (validate) packages.
|
Package charcheck provides character-level security checks shared across path validation (localfileio) and input validation (validate) packages. |
|
cmdmeta
Package cmdmeta is the single source of truth for command metadata that the policy engine, the hook selector, and help rendering consume.
|
Package cmdmeta is the single source of truth for command metadata that the policy engine, the hook selector, and help rendering consume. |
|
cmdpolicy
Package cmdpolicy is the user-layer command policy engine.
|
Package cmdpolicy is the user-layer command policy engine. |
|
cmdpolicy/yaml
Package yaml parses one or more Rules from yaml bytes.
|
Package yaml parses one or more Rules from yaml bytes. |
|
deprecation
Package deprecation carries a process-level notice that the command currently being executed is a backward-compatibility alias, kept alive for users whose skill predates a refactor.
|
Package deprecation carries a process-level notice that the command currently being executed is a backward-compatibility alias, kept alive for users whose skill predates a refactor. |
|
download
Package download provides validated full and ranged streams.
|
Package download provides validated full and ranged streams. |
|
event
Package event is the compatibility facade over the event kernel packages: the value model (model), the declaration/compilation layer (catalog), the processing contracts (processing), and the dedup filter kept here.
|
Package event is the compatibility facade over the event kernel packages: the value model (model), the declaration/compilation layer (catalog), the processing contracts (processing), and the dedup filter kept here. |
|
event/adapter/lark/websocket
Package websocket adapts the platform WebSocket connection into a pluggable event source (separate package to keep business registrations free of SDK transitive deps).
|
Package websocket adapts the platform WebSocket connection into a pluggable event source (separate package to keep business registrations free of SDK transitive deps). |
|
event/adapter/localbus/busctl
Package busctl is the wire-level control client for the event bus daemon.
|
Package busctl is the wire-level control client for the event bus daemon. |
|
event/adapter/localbus/busdiscover
Package busdiscover enumerates live bus daemons via per-AppID PID files protected by a process-lifetime advisory lock.
|
Package busdiscover enumerates live bus daemons via per-AppID PID files protected by a process-lifetime advisory lock. |
|
event/adapter/localbus/protocol
Package protocol defines the newline-delimited JSON wire format used over IPC.
|
Package protocol defines the newline-delimited JSON wire format used over IPC. |
|
event/adapter/localbus/transport
Package transport: Unix sockets on POSIX, named pipes on Windows.
|
Package transport: Unix sockets on POSIX, named pipes on Windows. |
|
event/application/consume
Package consume is the consume use case: it turns a request plus a compiled catalog entry into one immutable decision, renders that decision for dry-run, and executes the very same decision for a real run.
|
Package consume is the consume use case: it turns a request plus a compiled catalog entry into one immutable decision, renders that decision for dry-run, and executes the very same decision for a real run. |
|
event/bus
Package bus implements the per-AppID event-bus daemon; lifecycle is driven by consumer presence (idle timeout) and explicit shutdown.
|
Package bus implements the per-AppID event-bus daemon; lifecycle is driven by consumer presence (idle timeout) and explicit shutdown. |
|
event/catalog
Package catalog owns the EventKey declaration types and compiles them into a validated, immutable snapshot.
|
Package catalog owns the EventKey declaration types and compiles them into a validated, immutable snapshot. |
|
event/consume
Package consume drives the consume-side half of the events pipeline.
|
Package consume drives the consume-side half of the events pipeline. |
|
event/model
Package model holds the pure value types of the event kernel.
|
Package model holds the pure value types of the event kernel. |
|
event/processing
Package processing defines how a domain processor's outcome is interpreted by the consume pipeline: emit exactly what the key's schema declares, or drop with a stated reason — never leak an undeclared shape to stdout.
|
Package processing defines how a domain processor's outcome is interpreted by the consume pipeline: emit exactly what the key's schema declares, or drop with a stated reason — never leak an undeclared shape to stdout. |
|
event/schemas
Package schemas derives JSON Schema fragments from Go types via reflection.
|
Package schemas derives JSON Schema fragments from Go types via reflection. |
|
event/testutil
Package testutil holds test-only helpers shared across event subsystem tests.
|
Package testutil holds test-only helpers shared across event subsystem tests. |
|
fileevent
Package fileevent reports upload outcomes to the Drive file-event endpoint.
|
Package fileevent reports upload outcomes to the Drive file-event endpoint. |
|
flagalias
Package flagalias owns parse-time aliases for Cobra/pflag commands.
|
Package flagalias owns parse-time aliases for Cobra/pflag commands. |
|
hook
Package hook is the internal Hook dispatch implementation.
|
Package hook is the internal Hook dispatch implementation. |
|
keychain
Package keychain provides cross-platform secure storage for secrets.
|
Package keychain provides cross-platform secure storage for secrets. |
|
meta
Package meta is the typed model of the API metadata registry and the single place that parses it.
|
Package meta is the typed model of the API metadata registry and the single place that parses it. |
|
platform
Package platformhost is the bootstrap-time orchestrator that turns the global plugin registry (extension/platform.RegisteredPlugins) into:
|
Package platformhost is the bootstrap-time orchestrator that turns the global plugin registry (extension/platform.RegisteredPlugins) into: |
|
qualitygate/cmd/comment-audit
command
|
|
|
qualitygate/cmd/manifest-export
command
|
|
|
qualitygate/cmd/quality-gate
command
|
|
|
qualitygate/cmd/semantic-review
command
|
|
|
ratelimit
Package ratelimit parses server-provided retry pacing without coupling retry loops to one gateway's header names.
|
Package ratelimit parses server-provided retry pacing without coupling retry loops to one gateway's header names. |
|
recovery
Package recovery carries semantic recovery targets from error producers to the build-local error presenter.
|
Package recovery carries semantic recovery targets from error producers to the build-local error presenter. |
|
registry/registrytest
Package registrytest seeds the registry with a tracked metadata fixture so command-tree tests pass on a clean checkout — no `make fetch_meta`, no network, no user cache.
|
Package registrytest seeds the registry with a tracked metadata fixture so command-tree tests pass on a clean checkout — no `make fetch_meta`, no network, no user cache. |
|
riskcontrol
Package deviceinfo collects the platform hardware product model and the platform values used by device-related risk-control headers.
|
Package deviceinfo collects the platform hardware product model and the platform values used by device-related risk-control headers. |
|
selfupdate
Package selfupdate handles installation detection, npm-based updates, skills updates, and platform-specific binary replacement for the CLI self-update flow.
|
Package selfupdate handles installation detection, npm-based updates, skills updates, and platform-specific binary replacement for the CLI self-update flow. |
|
skillcontent
Package skillcontent reads embedded skill content from an injected fs.FS rooted at the skill list (entries like "lark-calendar/SKILL.md").
|
Package skillcontent reads embedded skill content from an injected fs.FS rooted at the skill list (entries like "lark-calendar/SKILL.md"). |
|
skillpolicy
Package skillpolicy composes the CLI's effective embedded skill tree from a base skill FS and at most one plugin-supplied SkillsOverlay.
|
Package skillpolicy composes the CLI's effective embedded skill tree from a base skill FS and at most one plugin-supplied SkillsOverlay. |
|
skillref
Package skillref models structured references into the binary-embedded skill tree.
|
Package skillref models structured references into the binary-embedded skill tree. |
|
skillscheck
Package skillscheck verifies that the locally installed lark-cli skills are in sync with the running binary version, by comparing the current binary version against skills-state.json.
|
Package skillscheck verifies that the locally installed lark-cli skills are in sync with the running binary version, by comparing the current binary version against skills-state.json. |
|
suggest
Package suggest provides the shared "did you mean" primitives: a rune-aware Levenshtein edit distance and a prefix-weighted Closest ranker.
|
Package suggest provides the shared "did you mean" primitives: a rune-aware Levenshtein edit distance and a prefix-weighted Closest ranker. |
|
surface
Package surface describes the build-local command surface presented by one Cobra tree.
|
Package surface describes the build-local command surface presented by one Cobra tree. |
|
testutil/gitcmd
Package gitcmd provides Git process helpers for tests that use temporary repositories.
|
Package gitcmd provides Git process helpers for tests that use temporary repositories. |
|
transport
Package transport owns how the CLI assembles its outbound HTTP transport: the shared base RoundTripper (Shared/Fallback and the HTTP client constructors), the LARK_CLI_NO_PROXY direct-egress clone, and the ~/.lark-cli/proxy_config.json proxy-plugin mode.
|
Package transport owns how the CLI assembles its outbound HTTP transport: the shared base RoundTripper (Shared/Fallback and the HTTP client constructors), the LARK_CLI_NO_PROXY direct-egress clone, and the ~/.lark-cli/proxy_config.json proxy-plugin mode. |
|
lint
module
|
|
|
application
Package application provides shortcuts for Open Platform app self-management (slash commands of the current bound app).
|
Package application provides shortcuts for Open Platform app self-management (slash commands of the current bound app). |
|
apps/gitcred
Package gitcred manages the lifecycle of app Git credentials.
|
Package gitcred manages the lifecycle of app Git credentials. |
|
doc/internal/docxparse
Package docxparse parses LarkOpenCLI DocxXML into a small DOM for the docs +script shortcut.
|
Package docxparse parses LarkOpenCLI DocxXML into a small DOM for the docs +script shortcut. |
|
mail/emlbuilder
Package emlbuilder provides a Lark-API-compatible RFC 2822 EML message builder.
|
Package emlbuilder provides a Lark-API-compatible RFC 2822 EML message builder. |
|
mail/filecheck
Package filecheck provides mail attachment file validation utilities shared by the emlbuilder and draft packages.
|
Package filecheck provides mail attachment file validation utilities shared by the emlbuilder and draft packages. |
|
mail/ics
Package ics provides RFC 5545 iCalendar generation and parsing for mail calendar invitations.
|
Package ics provides RFC 5545 iCalendar generation and parsing for mail calendar invitations. |
|
mail/lint
Package lint implements the mail-domain HTML lint lib used by `+lint-html` and the writing-path internals of the compose 5 shortcuts (`+send`, `+draft-create`, `+reply`, `+reply-all`, `+forward`) and `+draft-edit` body ops.
|
Package lint implements the mail-domain HTML lint lib used by `+lint-html` and the writing-path internals of the compose 5 shortcuts (`+send`, `+draft-create`, `+reply`, `+reply-all`, `+forward`) and `+draft-edit` body ops. |
|
note
Package note owns the Note domain: querying note detail and the unified transcript by a known note_id.
|
Package note owns the Note domain: querying note detail and the unified transcript by a known note_id. |
|
sheets
Package sheets contains lark-sheets shortcuts aligned with the sheet-skill-spec canonical layout.
|
Package sheets contains lark-sheets shortcuts aligned with the sheet-skill-spec canonical layout. |
|
sheets/internal/gen
command
Command gen regenerates flag_defs_gen.go and flag_schemas_gen.go from the data/*.json spec artifacts, so command startup pays no JSON unmarshal.
|
Command gen regenerates flag_defs_gen.go and flag_schemas_gen.go from the data/*.json spec artifacts, so command startup pays no JSON unmarshal. |
|
Package sidecar defines the wire protocol shared between the CLI client (running inside a sandbox) and the auth sidecar proxy (running in a trusted environment).
|
Package sidecar defines the wire protocol shared between the CLI client (running inside a sandbox) and the auth sidecar proxy (running in a trusted environment). |
|
tests
|
|
|
cli_e2e
Package clie2e contains end-to-end tests for lark-cli.
|
Package clie2e contains end-to-end tests for lark-cli. |
|
plugin_e2e
Package plugin_e2e exercises the extension/platform plugin contract the way a real customer does: it builds a fork of lark-cli with a plugin blank-imported, then runs that fork as a subprocess and asserts the real stderr/stdout envelopes and exit codes.
|
Package plugin_e2e exercises the extension/platform plugin contract the way a real customer does: it builds a fork of lark-cli with a plugin blank-imported, then runs that fork as a subprocess and asserts the real stderr/stdout envelopes and exit codes. |
Click to show internal directories.
Click to hide internal directories.