Skip to main content

Add your description here

Project description

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.

Project details


Download files

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

Source Distribution

clent-0.3.2.tar.gz (23.1 kB view details)

Uploaded Source

Built Distribution

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

clent-0.3.2-py3-none-any.whl (31.9 kB view details)

Uploaded Python 3

File details

Details for the file clent-0.3.2.tar.gz.

File metadata

  • Download URL: clent-0.3.2.tar.gz
  • Upload date:
  • Size: 23.1 kB
  • Tags: Source
  • Uploaded using 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}

File hashes

Hashes for clent-0.3.2.tar.gz
Algorithm Hash digest
SHA256 6164e13bd985efd1a39869374fbcaac524d6b380955f28e5e3eae6b2b61845f7
MD5 2a870dd02a6ae1cc25a5217c4fb84cbc
BLAKE2b-256 1c35e86d458b317c7ed54b1cf789dc91679bc5adfb84ec2b388dabedb4db8a1e

See more details on using hashes here.

File details

Details for the file clent-0.3.2-py3-none-any.whl.

File metadata

  • Download URL: clent-0.3.2-py3-none-any.whl
  • Upload date:
  • Size: 31.9 kB
  • Tags: Python 3
  • Uploaded using 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}

File hashes

Hashes for clent-0.3.2-py3-none-any.whl
Algorithm Hash digest
SHA256 1c6ade4bc0a989297250bb3cc573d5deedb003cf99b8f8012e67c18cfb021c42
MD5 18280a93c346d981252721568981ea2e
BLAKE2b-256 8c2827a318baf5ab86defa9e8ed984f8ed7fab659b30f3d5bbc5496113369209

See more details on using hashes here.

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