lmconn reference

Complete reference for lmconn global flags and all 56 cli.schema.v1 operations, environment variables, error codes, and exit codes.

Global CLI flags

FlagArgumentsDescription
--version / -vnonePrint the lmconn version string (0.2.0) and exit 0.
--help / -hnonePrint command usage summary and exit 0.
--cli-schema--jsonPrint the raw cli.schema.v1 JSON document declaring all 56 operations.
--input-json<json>Execute an operation from a JSON object {"op":"...","params":{...}} (used by lmscript schema imports).
--readonlynoneRefuse any operation whose schema access level is write (error code READONLY, exit code 1).

Credential, OAuth2, HTTP, GitHub, and LLM operations

Operation nameCLI commandAccessParametersDescription
cred_setcred setwriteservice, field, value?, env?, stdin?Store a credential from --value, --env VAR, or --stdin.
cred_getcred getreadservice, field, reveal?Check credential presence; --reveal returns the secret value for legacy entries.
cred_listcred listreadnoneList stored service names, field names, and timestamps without values.
cred_deletecred deletewriteservice, fieldRemove one credential record from the SQLite store.
cred_pathcred pathreadnoneReturn the active SQLite credential database file path.
cred_storecred storewriteservice, stdin?Store an issuer/origin-bound nonexportable Bearer or OAuth2 grant from JSON stdin.
cred_oauth_storecred oauth-storewriteservice, stdin?Atomically import an OAuth2 token payload from JSON stdin and return its service handle.
cred_encrypt_existingcred encrypt-existingwriteall?Encrypt legacy plaintext rows and seal the store, or re-encrypt all rows under the current data key (--all).
key_rotatekey rotatewritedata?Rotate the instance key (rewrapping data keys), or start a new data key for writes (--data).
key_backupkey backupwritetoWrite a copy of the instance key to a new 0600 file outside the database directory.
oauth_authorizeoauth authorizewriteservice, clientId?, clientSecret?, authUrl?, deviceUrl?, tokenUrl?, scope?, authQuery?, authStyle?, owner?, source?, port?, timeout?, noPkce?, autoFollow?, manual?Run OAuth2 authorization-code flow with PKCE and loopback callback or manual redirect stdin.
oauth_deviceoauth devicewriteservice, clientId?, deviceUrl?, tokenUrl?, scope?, owner?, source?Run RFC 8628 OAuth2 device-code authorization and store the resulting token.
oauth_refreshoauth refreshwriteserviceRefresh an expired OAuth2 access token using its stored refresh token.
oauth_statusoauth statusreadserviceReturn read-only OAuth2 authorization status, expiry, and refresh-token presence.
oauth_listoauth listreadnoneList all stored OAuth2 service handles, scopes, expiry timestamps, and metadata.
http_requesthttp requestwriteurl, method?, header?, data?, dataFile?, auth?, timeout?Send an HTTP/HTTPS request with optional stored credential or OAuth2 --auth injection.
github_usergithub userreadnoneFetch the authenticated GitHub user profile ({login, name, id, publicRepos, auth}).
github_reposgithub reposreadorg, limit?List repository names for a GitHub organization or user (limit 1..1000, default 30).
llm_providersllm providersreadnoneList configured API and CLI LLM providers, default models, and key sources.
llm_chatllm chatwriteprovider, model?, system?, prompt?, promptFile?, maxTokens?, stdin?Send a single chat completion prompt to an API or agent CLI provider.
llm_probellm probewriteprovider*Execute a live reachability check against one or all configured LLM providers.

Valkey, LDAPv3, and SAML 2.0 operations

Operation nameCLI commandAccessParametersDescription
valkey_pingvalkey pingreadhost?, port?, mode?, timeout?Ping a Valkey or Redis server via native RESP (--mode resp) or REST (--mode rest).
valkey_getvalkey getreadkey, host?, port?, mode?, timeout?Fetch a key value from Valkey.
valkey_setvalkey setwritekey, value, host?, port?, mode?, timeout?Set a key value in Valkey.
valkey_delvalkey delwritekey, host?, port?, mode?, timeout?Delete a key from Valkey.
valkey_cmdvalkey cmdwritecommand, args*, host?, port?, mode?, timeout?Execute an arbitrary Valkey or Redis command with arguments.
ldap_pingldap pingreadhost?, port?, url?, mode?, timeout?Ping an LDAPv3 server via Root DSE query or lmldap REST health check.
ldap_bindldap bindreaddn, password?, host?, port?, url?, mode?, timeout?Authenticate against an LDAPv3 server using Simple Bind.
ldap_whoamildap whoamireadbindDn?, bindPw?, host?, port?, url?, mode?, timeout?Execute an RFC 4532 Who Am I? extended operation and return authzId.
ldap_searchldap searchreadbase?, filter?, scope?, attrs?, sizeLimit?, timeLimit?, format?, bindDn?, bindPw?, host?, port?, url?, mode?, timeout?Search LDAPv3 entries by base DN, scope, RFC 4515 filter, or RFC 4516 URL in JSON or LDIF format.
ldap_getldap getreaddn, attrs?, format?, bindDn?, bindPw?, host?, port?, url?, mode?, timeout?Retrieve a single LDAP entry by Distinguished Name.
ldap_addldap addwritedn, attributes, bindDn?, bindPw?, host?, port?, url?, mode?, timeout?Create a new LDAP entry from a JSON attributes object.
ldap_modifyldap modifywritedn, changes, bindDn?, bindPw?, host?, port?, url?, mode?, timeout?Modify an existing LDAP entry using a JSON object of add, replace, or delete changes.
ldap_compareldap comparereaddn, attr, value, bindDn?, bindPw?, host?, port?, url?, mode?, timeout?Execute an RFC 4511 CompareRequest on an entry attribute and return match status.
ldap_delldap delwritedn, bindDn?, bindPw?, host?, port?, url?, mode?, timeout?Delete an LDAP entry by Distinguished Name.
saml_pingsaml pingreadhost?, port?, url?, timeout?Ping an lmsaml SAML 2.0 server.
saml_metadatasaml metadatareadhost?, port?, url?, timeout?Fetch SAML 2.0 Identity Provider EntityDescriptor XML metadata.
saml_sp_metadatasaml sp-metadatareadhost?, port?, url?, timeout?Fetch SAML 2.0 Service Provider EntityDescriptor XML metadata.
saml_userssaml usersreadhost?, port?, url?, timeout?List registered SAML IdP users.
saml_user_getsaml user-getreaduser, host?, port?, url?, timeout?Fetch a SAML IdP user record by username.
saml_user_addsaml user-addwriteuser, email?, password?, attributes?, host?, port?, url?, timeout?Create or update a SAML IdP user with email, password, and custom attributes JSON.
saml_user_delsaml user-delwriteuser, host?, port?, url?, timeout?Delete a SAML IdP user by username.
saml_authnsaml authnreaduser, password, host?, port?, url?, timeout?Verify SAML IdP user credentials.
saml_assertionsaml assertionreaduser, audience?, acsUrl?, requestId?, host?, port?, url?, timeout?Issue a cryptographically signed SAML 2.0 Response and Assertion XML payload.
saml_verifysaml verifyreadresponse, audience?, acsUrl?, requestId?, host?, port?, url?, timeout?Cryptographically verify a signed SAML 2.0 Response and Assertion XML payload.

MCP, ACP, and npm operations

Operation nameCLI commandAccessParametersDescription
mcp_toolsmcp toolsreadcommand, arg*, cwd?, timeoutMs?List available tools exposed by a stdio MCP server.
mcp_resourcesmcp resourcesreadcommand, arg*, cwd?, timeoutMs?List available resources exposed by a stdio MCP server.
mcp_promptsmcp promptsreadcommand, arg*, cwd?, timeoutMs?List prompt templates exposed by a stdio MCP server.
mcp_readmcp readreadcommand, arg*, cwd?, timeoutMs?, uriRead a resource URI from a stdio MCP server.
mcp_promptmcp promptreadcommand, arg*, cwd?, timeoutMs?, name, arguments?Render a named prompt template with JSON arguments from a stdio MCP server.
mcp_callmcp callwritecommand, arg*, cwd?, timeoutMs?, tool, arguments?Invoke a single tool with JSON arguments on a stdio MCP server.
mcp_sessionmcp sessionwritecommand, arg*, cwd?, timeoutMs?, call+Execute an ordered sequence of tool calls within a single persistent MCP stdio session.
acp_chatacp chatwritecommand, arg*, prompt?, promptsFile?, cwd?, timeoutMs?, autoApprove?Run a single or multi-turn conversation with an Agent Client Protocol (ACP) stdio agent.
npm_packnpm packwritedir?, out?Pack a package directory into a tarball with scripts disabled and report its SHA-512 integrity.
npm_publishnpm publishwritefile, credential?, expectIntegrity?, tag?, access?Publish a tarball using a stored credential and return a nonsecret publication receipt.
npm_whoaminpm whoamireadcredential?Return the authenticated npm registry username for a stored credential.

Environment variables and exit codes

Variable or exit codeDefault / valueDescription
LMCONN_DB~/.lmconn/creds.dbOverride the SQLite credential database file location.
LMCONN_STORE_MODEstandard (or broker)Set to broker to enforce nonexportable, origin-bound credential storage and receipt-only HTTP responses.
DEEPSEEK_API_KEY / OPENROUTER_API_KEY / OLLAMA_API_KEYunsetFallback environment variables for API LLM providers when no SQLite credential is stored.
GITHUB_TOKEN / GH_TOKENunsetFallback environment variables for GitHub API authentication.
<SERVICE>_API_KEYunsetFallback bearer token environment variable for lmconn http request --auth <service>.
Exit code 0SuccessOperation completed and printed {"ok":true,"result":...} (or raw schema JSON for --cli-schema --json).
Exit code 1Runtime / connector errorNetwork failure, timeout, missing credential, authentication rejection, or remote protocol error.
Exit code 2Usage / policy errorUnknown command or flag, missing positional argument, or invalid JSON input.