Skip to main content

clent

Terminal-first LLM chat client built on LangGraph with MCP (Model Context Protocol) tool calling.

clent runs an interactive chat loop, persists sessions locally, and can call tools exposed by built-in MCP servers (e.g. a local shell tool and Gmail tools).

Features

  • Interactive CLI chat with streaming responses (via langchain-openai).
  • Tool calling via MCP (built-in servers included).
  • Local session history with /new, /sessions, /resume, /rename, /compact, /clear.
  • First-run configuration wizard (/config) that writes a per-user settings.json.
  • Works with OpenAI-compatible endpoints via an optional base_url.

Requirements

  • Python >=3.12

Install

pip install clent

Quickstart

Run:

clent

On first run, clent launches a setup wizard to collect:

  • API key
  • (Optional) Base URL for your model provider
  • Default model name (and optional “thinking” / “code” model names)
  • Sessions directory
  • Theme

After saving settings, clent asks you to restart and then you can chat normally.

Commands

Inside the app:

  • /? or /help — show commands
  • /new — start a new session
  • /sessions — list sessions
  • /resume — resume a previous session
  • /rename — rename the current session (LLM-generated)
  • /compact — summarize and compact session history
  • /clear — delete current session history
  • /config — re-run the setup wizard
  • /bye — exit

Configuration

clent stores user settings under a per-user “clent home” directory.

Override the location with:

CLENT_HOME=/path/to/dir clent

The wizard writes a settings.json that looks like:

{
  "env": {
    "CLENT_API_KEY": "…",
    "CLENT_BASE_URL": "",
    "CLENT_MODELS": { "default": "…", "thinking": "", "code": "" }
  },
  "theme": "dark",
  "sessions_dir": "sessions"
}

Notes:

  • CLENT_API_KEY and CLENT_MODELS.default are required.
  • CLENT_BASE_URL is optional (use it for OpenAI-compatible providers).
  • sessions_dir can be absolute or relative (relative paths resolve inside CLENT_HOME).

Gmail tools (optional)

clent includes a built-in Gmail MCP server. To enable it:

  1. Create an OAuth “Desktop app” client in Google Cloud Console.
  2. Download the credentials JSON file.
  3. Save it as credentials.json in your CLENT_HOME directory.

The first time the agent uses a Gmail tool, it will prompt you to complete OAuth and will attempt to persist a token to CLENT_HOME/token.json.

Tooling / Development

This repo uses uv (optional). Typical workflow:

uv sync
uv run clent

Troubleshooting

  • If startup immediately launches the wizard again, re-run /config and ensure you set both the API key and default model name.
  • If clent cannot write to the default config directory, set CLENT_HOME to a writable path.

Safety

clent ships with a local “shell” tool (MCP server) that can execute commands on your machine when the model requests it. Only use clent with models/providers you trust, and review tool calls in the terminal before relying on their results.

Metadata

Release files for clent 0.3.2

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

Source distribution (sdist)

Source distribution for clent 0.3.2
File Size Uploaded Provenance Actions
clent-0.3.2.tar.gz 23.1 kB Without provenance Details for clent-0.3.2.tar.gz

Built distribution (wheel)

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

Total release size: 55.0 kB

Release files / clent-0.3.2.tar.gz

Download URL clent-0.3.2.tar.gz
Size 23.1 kB
Tags Source
SHA-256 checksum
How to use checksums
6164e13bd985efd1a39869374fbcaac524d6b380955f28e5e3eae6b2b61845f7
BLAKE2b-256 checksum
How to use checksums
1c35e86d458b317c7ed54b1cf789dc91679bc5adfb84ec2b388dabedb4db8a1e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.10.6 {"installer":{"name":"uv","version":"0.10.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / clent-0.3.2-py3-none-any.whl

Download URL clent-0.3.2-py3-none-any.whl
Size 31.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1c6ade4bc0a989297250bb3cc573d5deedb003cf99b8f8012e67c18cfb021c42
BLAKE2b-256 checksum
How to use checksums
8c2827a318baf5ab86defa9e8ed984f8ed7fab659b30f3d5bbc5496113369209
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.10.6 {"installer":{"name":"uv","version":"0.10.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Security for clent 0.3.2

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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