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.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3e62f249e7a3ed1100c49db6b312903fbd6ccfbd4f5ad0f27bf33eaeaf9eb496
|
|
| MD5 |
18d62728f39a7780b478ad75c7f36da7
|
|
| BLAKE2b-256 |
49394f8bc3e250d755a9a06c12139b6b6525962c61c1c3f013b3dd7d52af2f5b
|
Provenance
The following attestation bundles were made for lmgram_cli-0.1.2.tar.gz:
Publisher:
publish.yml on saezbaldo/lmgram-cli
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
lmgram_cli-0.1.2.tar.gz -
Subject digest:
3e62f249e7a3ed1100c49db6b312903fbd6ccfbd4f5ad0f27bf33eaeaf9eb496 - Sigstore transparency entry: 2218536403
- Sigstore integration time:
-
Permalink:
saezbaldo/lmgram-cli@8823116eacdef458f643e057e691abff523ac6a1 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/saezbaldo
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@8823116eacdef458f643e057e691abff523ac6a1 -
Trigger Event:
workflow_dispatch
-
Statement type:
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1fd95f996d1370b6921ff1b8dd313f35f793ed00d67a99416b83d793d28a913e
|
|
| MD5 |
e19e9f3a6910e7f2c84645b3f4b390fd
|
|
| BLAKE2b-256 |
9d14512b3743225389ffcb14aee9d3792c2a5380b3c40432f2c314d9e607182a
|
Provenance
The following attestation bundles were made for lmgram_cli-0.1.2-py3-none-any.whl:
Publisher:
publish.yml on saezbaldo/lmgram-cli
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
lmgram_cli-0.1.2-py3-none-any.whl -
Subject digest:
1fd95f996d1370b6921ff1b8dd313f35f793ed00d67a99416b83d793d28a913e - Sigstore transparency entry: 2218536443
- Sigstore integration time:
-
Permalink:
saezbaldo/lmgram-cli@8823116eacdef458f643e057e691abff523ac6a1 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/saezbaldo
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@8823116eacdef458f643e057e691abff523ac6a1 -
Trigger Event:
workflow_dispatch
-
Statement type: