linkmarks-cli
Command-line interface for LinkMarks. Drives the linkmarks binary
(dispatched by the umbrella crate): init, list, import, export,
dedupe, sync, completions, plus the help/version wrappers.
This crate exposes the linkmarks_cli::run() -> Result<i32> entry point
that the umbrella linkmarks binary calls. It is also a library so
embedders can wire the same subcommands into their own binary.
What is it
linkmarks-cli is the deterministic surface of the workspace. Every
subcommand:
- Accepts
--format=table|json|yamland emits structured output. - Returns stable exit codes (see
linkmarks_cli::exit_codes). - Supports
--store <path>and--config <path>overrides that fall back toLINKMARKS_STORE/LINKMARKS_CONFIGenv, then XDG defaults. - Emits
init/import/exportreports as key=value pairs that are easy to grep and pipe.
The completions subcommand regenerates shell completion scripts for
bash, zsh, fish, PowerShell, and Elvish from the live cli parser each
invocation; a renamed flag surfaces immediately.
Install
You almost always want the umbrella binary:
To depend on the CLI logic as a library instead:
[]
= "2.2.0"
Then call linkmarks_cli::run() from your own main().
Usage
The build_cli() function returns the configured clap::Command so
callers can embed LinkMarks as a subcommand of a larger tool.
License
Dual: AGPL-3.0-or-later (open source) + Commercial license for entities
that need to skip the AGPL §13 network-use clause. See LICENSE and
LICENSE-COMMERCIAL.md at the project root. Contact:
opensource@loust.pro.