Skip to main content

Language Model Terminal Interface

Often I just want to talk to LMs without the agentic clutter: I dont want it to read my stuff, access my files or consume through a gazillion tokens of tools, skills, MCPs and what not. I just want a recipe for gazpacho, c'mon :(

For that, I normally have to log into a WebApp from a provider (i.e. Mistral LeChat, Gemini, ChatGPT). But I live on the terminal, so I made a thin wrapper.

assets/demo.gif

If somehow you landed here but you are looking for an actual agent that can manage your system, I'd recommend you look into pi, opencode or mistral-vibe (in that order). If your desire is to become vendor locked and further push private companies in their quest for the oligopoly, you could check Claude Code or Codex, I guess :)

FAQ

  • Can I talk with LMs from different providers from the terminal? - Yes :)
  • Does the app have access to my files? - No
  • Can the app run terminal commands? - Nope
  • Can the app execute code? - Nein
  • Does the app have any sort of agentic loop? - Negative
  • Can I connect the app to MCPs or other tools? - Also no

Installation

uv tool install lmti

Usage

# Start with the default model
lmti

# Start with a specific model
lmti -m vertex:gemini-2.5-flash

lmti supports several commands: to reset a conversation, undo some message, change models, etc. Simply type forward slash (/) while on the REPL to see a list of actions.

Config

Settings live in ~/.config/lmti.yaml; API keys in ~/.lmti/auth.yaml. Conversation history is under ~/.lmti/history/. Many settings can also be changed from the REPL (/model, /render, etc.).

~/.config/lmti.yaml:

settings:
  render_markdown: true
  model: mistral:mistral-small-2603
models:
- mistral:mistral-small-2603
- vertex:gemini-2.5-flash

~/.lmti/auth.yaml:

MISTRAL_API_KEY: your-key-here

Known limitations

With render_markdown: true (the default), assistant replies are streamed through Rich Live + Markdown. In practice you may see duplicated lines (“echo”), layout glitches, or other artifacts while tokens arrive. This comes from how Rich redraws live content when output overflows the terminal—not from the model itself.

Upstream workarounds exist (for example chatlas #71, which monkeypatches LiveRender for rich #3263 until rich #3637 lands), but they do not fully solve streaming markdown in our stack. A durable fix likely means replacing the current prompt-toolkit + Rich UI with something built for live TUI updates (e.g. Textual). That is a large refactor and is tracked in #14—not planned for the near term.

Until then you can turn off live markdown with /render or set render_markdown: false in config.

Development

Structure

src/lmti/
├── cli.py      # Argument parsing and entry point
├── config.py   # Configuration management
├── errors.py   # Error handling
├── repl.py     # Main REPL loop logic
├── ui.py       # Terminal UI (prompt-toolkit and rich)
├── commands/   # Slash command implementations
└── __init__.py

Tooling

We use just for development tasks. Use:

  • just sync: Updates lockfile and syncs environment.
  • just format: Lints and formats with ruff.
  • just check-types: Static analysis with ty.
  • just check-complexity: Cyclomatic complexity checks with complexipy.
  • just test: Runs pytest with 90% coverage threshold.

See justfile for a complete list of dev commands.

Contribute

  1. Hooks: Install pre-commit hooks via just install-hooks.
  2. Issues: Open an issue first using the default template.
  3. PRs: Link your PR to the relevant issue.

License

MIT

Made with mold template

Metadata

Release files for lmti 1.5.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for lmti 1.5.1
File Size Uploaded
lmti-1.5.1.tar.gz 12.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for lmti 1.5.1
File Interpreter ABI Platform
lmti-1.5.1-py3-none-any.whl Python 3 none any Details

Total release size: 30.5 kB

Release files / lmti-1.5.1.tar.gz

Download URL lmti-1.5.1.tar.gz
Size 12.9 kB
Tags Source
SHA-256 checksum
How to use checksums
981ac4bdb2fda31615e103d975b6d0fd76c1e5e63d79e5ec6a523d3aa8be99cd
BLAKE2b-256 checksum
How to use checksums
9220c27f00b500e8e0e0804c909531c84e4ff7d9d442a8e77f8f13a6c5c23235
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.17 {"installer":{"name":"uv","version":"0.11.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / lmti-1.5.1-py3-none-any.whl

Download URL lmti-1.5.1-py3-none-any.whl
Size 17.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5c9abfd41aa1978bae826a523563b89cd11e0fa10f6714c513b57d30b9e25c9f
BLAKE2b-256 checksum
How to use checksums
b010b9d5dd19d5d2abafa724da3543f4044363b85605cc894758f4af53236d15
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.17 {"installer":{"name":"uv","version":"0.11.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release history Release notifications | RSS feed

This release

1.5.1 This release

2 release files

1.5.0

2 release files

1.4.0

2 release files

1.3.0

2 release files

1.2.0

2 release files

1.1.0

2 release files

1.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page