Skip to main content

Chatbot CLI

Project description

dotchatbot

PyPI - Version PyPI - Python Version

A simple file-based interface for chatbots

Demo of dotchatbot


Table of Contents

Features

  • File-based sessions
  • Markdown output rendering via rich
  • Session history and session resuming by just passing -
  • Automatic filenames via prompting

Installation

uv tool install dotchatbot

Usage

Usage: dotchatbot [OPTIONS] [FILENAME]

  Starts a session with the chatbot, resume by providing FILENAME. Provide -
  for FILENAME to use the previous session (stored in SESSION_HISTORY_FILE).

Options:
  -p, --system-prompt TEXT      The default system prompt to use  [default: You
                                are a helpful assistant.]
  --no-pager                    Do not output using pager
  --no-rich                     Do not output using rich
  -r, --reverse                 Reverse the conversation in the editor
  -y, --assume-yes              Automatic yes to prompts; assume "yes" as
                                answer to all prompts and run non-
                                interactively.
  -n, --assume-no               Automatic no to prompts; assume "no" as answer
                                to all prompts and run non-interactively.
  -c, --current-directory       Use the current directory as the session file
                                location
  --session-history-file TEXT   The file where the session history is stored
  --session-file-location TEXT  The location where session files are stored
  --session-file-ext TEXT       The extension to use for session files
                                [default: .dcb]
  --summary-prompt TEXT         The prompt to use for the summary (for building
                                the filename for the session)  [default: Given
                                the conversation so far, summarize it in just 4
                                words. Only respond with these 4 words]
  -s, --service-name [OpenAI|Anthropic|Google]
                                The chatbot provider service name  [default:
                                OpenAI]
  --summary-service-name [OpenAI|Anthropic|Google]
                                The chatbot provider service name for filename
                                generation  [default: OpenAI]
  --quick-service-name TEXT     Call this model first, then the main model.
  --quick-system-prompt TEXT    System prompt for the quick response model
                                [default: You are a queryable information
                                engine that returns a max of 5 bullet-points.
                                Do not respond with a summary. Only respond
                                with a list of bullet-points. Be succinct and
                                use less bullet points when possible. Include
                                examples.]
  -H, --history                 Print history of sessions

OpenAI options:
  --openai-model TEXT          [default: gpt-4o]
  --quick-openai-model TEXT    [default: gpt-4o]
  --summary-openai-model TEXT  [default: gpt-4o]

Anthropic options:
  --anthropic-model TEXT          [default: claude-3-7-sonnet-latest]
  --quick-anthropic-model TEXT    [default: claude-3-sonnet-latest]
  --summary-anthropic-model TEXT  [default: claude-3-sonnet-latest]
  --anthropic-max-tokens INTEGER  [default: 16384]

Google options:
  --google-model TEXT          [default: gemini-2.5-pro]
  --quick-google-model TEXT    [default: gemini-2.5-flash-lite]
  --summary-google-model TEXT  [default: gemini-2.5-flash-lite]

Markdown options:
  --markdown-justify [default|left|center|right|full]
                                [default: default]
  --markdown-code-theme TEXT    [default: monokai]
  --markdown-hyperlinks
  --markdown-inline-code-lexer TEXT
  --markdown-inline-code-theme TEXT
  --markdown-max-width INTEGER  Maximum width of the output  [default: 125]

Other options:
  -C, --config CONFIG_PATH  Location of the configuration file. Supports glob
                            pattern of local path and remote URL.  [default: ~/
                            .config/dotchatbot/*.{toml,yaml,yml,json,ini,xml}]
  --show-params             Show all CLI parameters, their provenance, defaults
                            and value, then exit.
  --color, --ansi / --no-color, --no-ansi
                            Strip out all colors and all ANSI codes from
                            output.  [default: color]
  --verbosity LEVEL         Either CRITICAL, ERROR, WARNING, INFO, DEBUG.
                            [default: 30]
  -v, --verbose             Increase the default WARNING verbosity by one level
                            for each additional repetition of the option.
                            [default: 0]
  -h, --help                Show this message and exit.

License

dotchatbot is distributed under the terms of the MIT license.

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

dotchatbot-0.10.1.tar.gz (15.1 kB view details)

Uploaded Source

Built Distribution

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

dotchatbot-0.10.1-py3-none-any.whl (15.0 kB view details)

Uploaded Python 3

File details

Details for the file dotchatbot-0.10.1.tar.gz.

File metadata

  • Download URL: dotchatbot-0.10.1.tar.gz
  • Upload date:
  • Size: 15.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.22

File hashes

Hashes for dotchatbot-0.10.1.tar.gz
Algorithm Hash digest
SHA256 de6f30054be4cf2ccf132432fa4203f031f322f1813385fb15276ab398f4c5fc
MD5 4408def8952dd90fa5c5f80238472645
BLAKE2b-256 67464d03635356e630dc50a2c60951b3a733d57675616e26737cb8d6f7dd7c21

See more details on using hashes here.

File details

Details for the file dotchatbot-0.10.1-py3-none-any.whl.

File metadata

File hashes

Hashes for dotchatbot-0.10.1-py3-none-any.whl
Algorithm Hash digest
SHA256 00f280c41cd5757b01474f6b11eef1423f0eab4d1c67bf93f52198f02fbb8882
MD5 9241f97cdee4482048f2c174ef5575a8
BLAKE2b-256 605d70404e640fbae6d8580d66fa0880101492363b5a2359ab93f120156b33a7

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