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.1.tar.gz (121.4 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.1-py3-none-any.whl (31.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: clent-0.3.1.tar.gz
  • Upload date:
  • Size: 121.4 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.1.tar.gz
Algorithm Hash digest
SHA256 992af08b559b3bfdb7c7c909286571e51e674fbcdca32393a43f1c21cbad2af6
MD5 a9e5a72688d145ae1e7a51e5f189bda8
BLAKE2b-256 59e96cc9471a6ffc5fea20466fb8e5847d1c2bce82757e6e71eb7e12cc6d95f0

See more details on using hashes here.

File details

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

File metadata

  • Download URL: clent-0.3.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 5c9193e997b20196c177724faf6faab133cbc18ba8aed13988fbc104d24be388
MD5 9fb19c4bd1c241c100b68177a3c96d7e
BLAKE2b-256 126c3b4ae989a120a74526e1546bbee2380e6f6ec2b56e3a9b3a9357ff4f4230

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