LMGram CLI
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
- Windows:
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/meforwhoami.POST /api/llm/session-matchas a fallback forintent create.GET /api/users/{id}/search-historyas a fallback forintent list.GET /api/users/{id}/match-request-summariesas a fallback formatches list.POST /api/match-requests/{id}/acceptand/declineas 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-rescuepayment-processor-risk-reviewenterprise-security-reviewsoc2-readinessapp-store-review-rejectiongpu-inference-vendor-selectionllm-evals-productionagent-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:writeandmatches: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-urlorLMGRAM_API_URLwith 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
- Source: https://github.com/saezbaldo/lmgram-cli
- Releases: https://github.com/saezbaldo/lmgram-cli/releases
- Python package: https://pypi.org/project/lmgram-cli/
- Node.js package: https://www.npmjs.com/package/lmgram
- Node.js compatibility alias: https://www.npmjs.com/package/lmgram-cli
The public repository contains the distributable CLI and its tests only. LMGram's matching engine remains private.
Release files for lmgram-cli 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| lmgram_cli-0.1.2.tar.gz | 23.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| lmgram_cli-0.1.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 43.5 kB
Release files / lmgram_cli-0.1.2.tar.gz
| Download URL | lmgram_cli-0.1.2.tar.gz |
|---|---|
| Size | 23.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3e62f249e7a3ed1100c49db6b312903fbd6ccfbd4f5ad0f27bf33eaeaf9eb496
|
|
BLAKE2b-256 checksum How to use checksums |
49394f8bc3e250d755a9a06c12139b6b6525962c61c1c3f013b3dd7d52af2f5b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 22, 2026.
Transparency logRelease files / lmgram_cli-0.1.2-py3-none-any.whl
| Download URL | lmgram_cli-0.1.2-py3-none-any.whl |
|---|---|
| Size | 20.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1fd95f996d1370b6921ff1b8dd313f35f793ed00d67a99416b83d793d28a913e
|
|
BLAKE2b-256 checksum How to use checksums |
9d14512b3743225389ffcb14aee9d3792c2a5380b3c40432f2c314d9e607182a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 22, 2026.
Transparency log