Traditional Chinese Medicine research — from question to answer

Ask in natural language. tcm-cli plans the analysis, selects the right tools, executes them, validates results, and returns data-backed conclusions.

$ tcm "What herbs are used for Spleen Qi deficiency?"
▌ planning... executing... synthesizing...
• Core herbs: 党参、人参、白术、茯苓、黄芪
• Actions: 益气健脾,运化失司 → 脾气虚
• Evidence: 12 RCTs (2018–2025), 3 meta-analyses

Install

Pick one of the options below. Requires Python 3.10+.

Quick install

One-liner to get started fast.

curl -fsSL https://raw.githubusercontent.com/tigerneil/tcm-cli/main/install.sh | bash

pipx (recommended)

Installs in an isolated environment.

pipx install tcm-cli
tcm setup   # configure API keys and run health check

pip

Or include optional scientific stacks.

pip install tcm-cli
pip install "tcm-cli[all]"
Authentication
# Interactive (recommended)
tcm setup

# Or set directly
export OPENAI_API_KEY="sk-..."

# Non-interactive
tcm setup --api-key YOUR_API_KEY

Quick examples

Herb lookup

$ tcm "Tell me about 黄芪 (Astragalus) — properties, compounds, and clinical evidence"

Formula analysis

$ tcm "Analyze the composition of 四君子汤 using the 君臣佐使 framework"

Syndrome differentiation

$ tcm "Patient has fatigue, loose stools, poor appetite, pale tongue. What TCM syndrome?"

Network pharmacology

$ tcm "Build a network pharmacology analysis for 补中益气汤 against diabetes targets"

Safety check

$ tcm "Check interactions between 人参, 藜芦, and Warfarin"

Data management

$ tcm data pull tcmsp
tcm data status

Why tcm?

30+ TCM research tools

Herb lookup, formula analysis, syndrome differentiation, network pharmacology, safety checks, literature search, and more.

LLM-powered reasoning

Powered by leading LLMs (OpenAI GPT-4o, o3, and more). Plans multi-step research workflows, calls tools, and synthesizes findings.

Bilingual

Full support for Chinese (中文) and English terminology.

10+ database APIs

PubMed, TCMSP, UniProt, STRING, KEGG, ClinicalTrials.gov, Open Targets — no setup required.

Research UX

Interactive terminal with @mentions, slash commands, session export, and clipboard support.

Open source

MIT licensed. Contributions welcome.

FAQ

What models does tcm-cli support?

OpenAI GPT-4o by default. You can list and switch models via tcm model list and tcm model set ....

Do I need to download datasets?

No. tcm works with remote APIs out of the box. Local datasets are optional and can speed up heavy analysis.

Where do I report issues?

Open an issue on GitHub: tigerneil/tcm-cli.