{"id":23947,"library":"langchain-cli","title":"LangChain CLI","description":"The official CLI for scaffolding, interacting, and managing LangChain projects. Version 0.0.37, requires Python >=3.9. Release cadence is irregular; active development.","status":"active","version":"0.0.37","language":"python","source_language":"en","source_url":"https://github.com/langchain-ai/langchain-cli","tags":["cli","langchain","llm","scaffolding"],"install":[{"cmd":"pip install langchain-cli","lang":"bash","label":"Install from PyPI"},{"cmd":"pip install langchain-cli --upgrade","lang":"bash","label":"Upgrade to latest version"}],"dependencies":[],"imports":[{"note":"The package name has an underscore, not a hyphen.","wrong":"import langchaincli","symbol":"langchain_cli","correct":"import langchain_cli"},{"note":"The main module is under langchain_cli, not langchain.","wrong":"from langchain.cli import app","symbol":"langchain_cli.cli","correct":"from langchain_cli.cli import app"}],"quickstart":{"code":"import langchain_cli\nfrom langchain_cli.cli import app\nfrom typer.testing import CliRunner\nrunner = CliRunner()\nresult = runner.invoke(app, [\"--version\"])\nprint(result.output.strip())","lang":"python","description":"Test CLI invocation programmatically. Shows the installed version."},"warnings":[{"fix":"Install langchain-cli without langchain unless you specifically need the full SDK.","message":"The `langchain` pip package itself is not needed for the CLI. Installing both can cause conflicts.","severity":"deprecated","affected_versions":"all"},{"fix":"Ensure `pip list | grep langchain-cli` shows the package.","message":"The CLI uses Typer under the hood. Do not try to import from `langchain_cli` if you only installed `langchain` — you need a separate install.","severity":"gotcha","affected_versions":"all"},{"fix":"Replace `langchain-cli serve` with `langchain-cli run` in your commands.","message":"In v0.0.30+, the `langchain-cli serve` command was renamed to `langchain-cli run`. Old scripts using `serve` will break.","severity":"breaking","affected_versions":">=0.0.30"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Run `pip install langchain-cli` and import using `import langchain_cli`.","cause":"Package not installed or installed under different name (langchain-cli vs langchain_cli).","error":"ModuleNotFoundError: No module named 'langchain_cli'"},{"fix":"Use `langchain-cli run` instead of `langchain-cli serve`.","cause":"The `serve` command was renamed to `run` in v0.0.30+.","error":"Error: No such command 'serve'"},{"fix":"Provide a valid subcommand like `new`, `run`, or `--help`.","cause":"Running `langchain-cli` without any subcommand.","error":"Usage: langchain-cli [OPTIONS] COMMAND [ARGS]...\nTry 'langchain-cli --help' for help.\n\nError: Missing argument 'COMMAND'."}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}