daberu

Crates.iodaberu
lib.rsdaberu
version0.5.0
created_at2023-06-02 12:12:51.853769+00
updated_at2025-07-10 00:54:52.148391+00
descriptionClaude client tool that reads your message from stdin and writes the response to stdout
homepagehttps://github.com/sile/daberu
repositoryhttps://github.com/sile/daberu
max_upload_size
id880773
size48,161
Takeru Ohta (sile)

documentation

README

daberu

daberu Actions Status License

A simple command-line tool for conversing with Claude.

"daberu" is a Japanese translation of "chatting".

$ daberu -h
Claude client tool that reads your message from stdin and writes the response to stdout

Usage: daberu [OPTIONS]

Options:
      --version                         Print version
  -h, --help                            Print help ('--help' for full help, '-h' for summary)
      --anthropic-api-key <STRING>      Anthropic API key [env: ANTHROPIC_API_KEY]
  -l, --log <PATH>                      Path to log file for saving the last conversation [env: DABERU_LOG_PATH]
  -c, --continue                        Continue conversation from the existing log file instead of truncating it
  -m, --model <MODEL_NAME>              Model name [env: DABERU_MODEL] [default: claude-sonnet-4-20250514]
  -s, --system <STRING>                 System message
      --gist <new | EXISTING_GIST_ID>   Save the output to GitHub Gist
  -r, --resource <PATH>                 File path to be used as a resource for the conversion
      --resource-size-limit <BYTE_SIZE> Maximum byte size per resource [env: DABERU_RESOURCE_SIZE_LIMIT] [default: 100000]
      --shell-executable <SHELL>        Shell executable to use for running shell commands [env: DABERU_SHELL_EXECUTABLE] [default: sh]
  -e, --shell-command <COMMAND>         Shell command to be used as a resource for the conversion

Installation

$ cargo install daberu

$ export ANTHROPIC_API_KEY="YOUR API KEY"

Usage Examle

// Conversation without history.
$ echo hi | daberu
Hello! How can I assist you today?

// Conversation with history.
$ echo "Translate to Japanese: 'hi'" | daberu --log chat.log
こんにちは

$ echo "Next, translate to Spanish" | daberu --log chat.log
hola

$ jq . chat.log
[
  {
    "role": "user",
    "content": "Translate to Japanese: 'hi'\n"
  },
  {
    "role": "assistant",
    "content": "こんにちは"
  },
  {
    "role": "user",
    "content": "Next, translate to Spanish\n"
  },
  {
    "role": "assistant",
    "content": "hola"
  }
]

References

Commit count: 164

cargo fmt