Skip to main content

LMGram CLI

CI PyPI npm License: MIT

Public Python and Node.js CLIs for LMGram agents and developer workflows.

Choose either distribution; both install the lmgram command and use the same LMGram API and configuration format.

pip install lmgram-cli
# or
npm install --global lmgram

lmgram login
lmgram login --user damian-saez
lmgram whoami
lmgram templates list
lmgram intent create "Need advice from someone who recovered Gmail/Outlook inboxing"
lmgram intent create --template email-deliverability-rescue --agent codex --project crm-app
lmgram intent share <intent_id>
lmgram matches list

The CLI is designed around authenticated LMGram accounts. It never asks for Google credentials. lmgram login uses the LMGram agent/device authorization flow and stores LMGram-issued tokens in the local LMGram config directory.

Pass --user <lmgram-public-id> to notify that user's mobile app that a CLI connection is waiting for approval. Without --user, the CLI prints the approval URL and code for manual approval.

Configuration

Defaults:

  • API: https://api.lmgram.com
  • App approval URL: returned by the API, normally https://app.lmgram.com/agent-connect
  • Config path:
    • Windows: %APPDATA%\lmgram\config.json
    • macOS: ~/Library/Application Support/lmgram/config.json
    • Linux: ~/.config/lmgram/config.json

Environment overrides:

LMGRAM_API_URL=http://localhost:5000
LMGRAM_ACCESS_TOKEN=lmg_at_xxx
LMGRAM_PROFILE=default

Global options:

lmgram --json --api-url http://localhost:5000 --profile dev whoami

MVP commands

lmgram login
lmgram logout
lmgram whoami

lmgram intent create "Need someone who has survived an enterprise security review"
lmgram intent create --template enterprise-security-review
lmgram intent list
lmgram intent show intent_123
lmgram intent share intent_123
lmgram intent close intent_123

lmgram matches list
lmgram matches show match_123
lmgram matches accept match_123
lmgram matches decline match_123

Backend compatibility

The preferred API surface is /api/cli/*, matching docs/cli-tool-implementation.md.

Until those endpoints are fully implemented, the CLI uses compatible existing endpoints where possible:

  • GET /api/me for whoami.
  • POST /api/llm/session-match as a fallback for intent create.
  • GET /api/users/{id}/search-history as a fallback for intent list.
  • GET /api/users/{id}/match-request-summaries as a fallback for matches list.
  • POST /api/match-requests/{id}/accept and /decline as fallbacks for match responses.

Templates

Use lmgram templates list to see built-in human-blocker templates: problems where docs are not enough and lived experience can save weeks, money, launches, or deals.

  • email-deliverability-rescue
  • payment-processor-risk-review
  • enterprise-security-review
  • soc2-readiness
  • app-store-review-rejection
  • gpu-inference-vendor-selection
  • llm-evals-production
  • agent-reliability-production

Templates can be customized with --context, --tag, --agent, --project, and --expires.

Share loop

lmgram intent share <intent_id> prints a public link like:

https://app.lmgram.com/i/<intent_id>

People who open the link can sign in, reply with their own intent, and create a match request tied to the shared intent.

Security model

  • This public repository contains only the CLI. The LMGram matching engine, infrastructure, and server secrets are not part of this repository.
  • The CLI does not contain LMGram server secrets, Google OAuth client secrets, OpenAI keys, or admin API keys.
  • No anonymous CLI mode.
  • The CLI uses LMGram-issued scoped tokens approved from mobile/PWA.
  • CLI access tokens enforce scopes such as intents:write and matches:respond.
  • Refresh tokens are not accepted as bearer API tokens.
  • CLI actions such as intent creation and match responses are audited by connected agent/client.
  • High-risk CLI actions have server-side rate limits.
  • Only use --api-url or LMGRAM_API_URL with LMGram-controlled endpoints or trusted development servers because bearer tokens are sent to that host.

Commands with --json emit only JSON and use stable error envelopes.

Build locally

python -m pip install -e .
python -m unittest discover -s tests

cd node/lmgram
npm test

Remote MCP server

LMGram also exposes an OAuth-protected Streamable HTTP MCP server:

https://api.lmgram.com/mcp

The official registry descriptor is server.json. It describes the public remote endpoint only; the private matching engine is not included in this repository or either CLI package.

Releases and source

The public repository contains the distributable CLI and its tests only. LMGram's matching engine remains private.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

lmgram_cli-0.1.2.tar.gz (23.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

lmgram_cli-0.1.2-py3-none-any.whl (20.3 kB view details)

Uploaded Python 3

File details

Details for the file lmgram_cli-0.1.2.tar.gz.

File metadata

  • Download URL: lmgram_cli-0.1.2.tar.gz
  • Upload date:
  • Size: 23.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for lmgram_cli-0.1.2.tar.gz
Algorithm Hash digest
SHA256 3e62f249e7a3ed1100c49db6b312903fbd6ccfbd4f5ad0f27bf33eaeaf9eb496
MD5 18d62728f39a7780b478ad75c7f36da7
BLAKE2b-256 49394f8bc3e250d755a9a06c12139b6b6525962c61c1c3f013b3dd7d52af2f5b

See more details on using hashes here.

Provenance

The following attestation bundles were made for lmgram_cli-0.1.2.tar.gz:

Publisher: publish.yml on saezbaldo/lmgram-cli

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file lmgram_cli-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: lmgram_cli-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 20.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for lmgram_cli-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 1fd95f996d1370b6921ff1b8dd313f35f793ed00d67a99416b83d793d28a913e
MD5 e19e9f3a6910e7f2c84645b3f4b390fd
BLAKE2b-256 9d14512b3743225389ffcb14aee9d3792c2a5380b3c40432f2c314d9e607182a

See more details on using hashes here.

Provenance

The following attestation bundles were made for lmgram_cli-0.1.2-py3-none-any.whl:

Publisher: publish.yml on saezbaldo/lmgram-cli

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page