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

pipx 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]
                                The chatbot provider service name  [default:
                                OpenAI]
  -H, --history                 Print history of sessions

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

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

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: WARNING]
  -v, --verbose             Increase the default WARNING verbosity by one level
                            for each additional repetition of the option.
                            [default: 0]
  --version                 Show the version and exit.
  -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.3.0.tar.gz (12.2 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.3.0-py3-none-any.whl (12.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: dotchatbot-0.3.0.tar.gz
  • Upload date:
  • Size: 12.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.11

File hashes

Hashes for dotchatbot-0.3.0.tar.gz
Algorithm Hash digest
SHA256 c99aee3424a8fe707375246690308cb5d1cb7c2d8931e228a5f35fff299375a1
MD5 98ff0e983dc10fbe212c82e3389a6d93
BLAKE2b-256 d32f942b24d3fc1255e570cc2a342a7b505331f19851854add12e38f66830461

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dotchatbot-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 12.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.11

File hashes

Hashes for dotchatbot-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 33abd84a5dd32380a91e60cf6a226dd02a1f53789263aa0016cae94b2fdbf49f
MD5 3093bfd4344e41fd60b897c1b51e775f
BLAKE2b-256 851a3753a29ede6e0a9e208b048156ac930f1926a8e6de0f58c4f3486d62bb15

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