Skip to main content

Agent + CLI that gives an agent Discord access via a bot.

Project description

discord-bot-cli

Agent + CLI that gives an agent Discord access via a bot.

What you get

  • An agent-first CLI cited from teken (afi-cli) — the runtime package has no third-party dependencies.
  • A mesh identityculture.yaml (suffix + backend) and the matching prompt file (CLAUDE.md for backend: claude).
  • The canonical guildmaster skill kit (11 skills) under .claude/skills/, vendored cite-don't-import. See docs/skill-sources.md.
  • A build + deploy baseline — pytest, lint, the agent-first rubric gate, and PyPI Trusted Publishing wired into GitHub Actions.

Quickstart

uv sync
uv run pytest -n auto                 # run the test suite
uv run discord-bot-cli whoami  # identity from culture.yaml
uv run discord-bot-cli learn   # self-teaching prompt (add --json)
uv run teken cli doctor . --strict    # the agent-first rubric gate CI runs

CLI

Introspection verbs

Verb What it does
whoami Report this agent's nick, version, backend, and model from culture.yaml.
learn Print a structured self-teaching prompt.
explain <path> Markdown docs for any noun/verb path.
overview Read-only descriptive snapshot of the agent.
doctor Check the agent-identity invariants (prompt-file-present, backend-consistency).
cli overview Describe the CLI surface itself.

Every command supports --json. Results go to stdout, errors/diagnostics to stderr (never mixed). Exit codes: 0 success, 1 user error, 2 environment error, 3+ reserved.

Discord verbs

Give an agent Discord access through a bot. These need a bot token and the optional discord extra (which pulls in discord.py):

uv pip install 'discord-bot-cli[discord]'   # or: pip install 'discord-bot-cli[discord]'
export DISCORD_BOT_TOKEN=...                 # read from the env, never a flag
Verb What it does
channel list <guild_id> List a guild's channels.
channel messages <channel_id> [--limit N] Read the last N messages (1–100, default 20).
message post <channel_id> <content> Post a message; returns its id.
message reply <channel_id> <message_id> <content> Reply to a message.
message react <channel_id> <message_id> <emoji> Add a reaction.
thread create <channel_id> --name <name> [--message <id>] Create a thread (anchored or standalone).
thread post <thread_id> <content> Post a message into a thread.
user get <user_id> Look up a user's public profile.

Each verb is one-shot: it connects, performs one action, and exits (no daemon, no gateway subscription). post/reply/thread create return the created id in --json so output composes into the next call. A missing token or the absent extra exits 2 with a hint; bad ids exit 1.

# discover, read, write, compose
discord channel list 1234567890 --json
discord channel messages 1234567890 --limit 50 --json
MSG=$(discord message post 1234567890 "hello" --json | python3 -c 'import sys,json;print(json.load(sys.stdin)["id"])')
discord message react 1234567890 "$MSG" 👍

The runtime package itself stays dependency-free — discord.py is imported lazily inside the verb handlers, so a plain install never pulls it in.

Make it your own

  1. Rename the package discord_bot_cli/ and the discord-bot-cli CLI/dist name throughout pyproject.toml, the package, tests/, sonar-project.properties, and this README.md. The name is hard-coded in ~100 places, so list every occurrence first — see the git grep discovery command in CLAUDE.md, the authoritative rename procedure.
  2. Edit culture.yaml with your suffix and backend.
  3. Rewrite CLAUDE.md for your agent and run /init.
  4. Re-vendor only the skills you need from guildmaster (see docs/skill-sources.md).

See CLAUDE.md for the full conventions (version-bump-every-PR, the cicd PR lane, deploy setup).

License

MIT — see 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

discord_bot_cli-0.4.0.tar.gz (197.3 kB view details)

Uploaded Source

Built Distribution

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

discord_bot_cli-0.4.0-py3-none-any.whl (30.9 kB view details)

Uploaded Python 3

File details

Details for the file discord_bot_cli-0.4.0.tar.gz.

File metadata

  • Download URL: discord_bot_cli-0.4.0.tar.gz
  • Upload date:
  • Size: 197.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.23 {"installer":{"name":"uv","version":"0.11.23","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for discord_bot_cli-0.4.0.tar.gz
Algorithm Hash digest
SHA256 798c5a1ed2ad1ca42ac15b8b29496dd4693eed8abb2b3eb1a78bedc37308901d
MD5 36c5d5db729f147f56b1b77f89394d7d
BLAKE2b-256 73ee7f1ddfdc5918b568dd84ac59ca3ae58680d9eef31a364078315f5ee7719f

See more details on using hashes here.

File details

Details for the file discord_bot_cli-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: discord_bot_cli-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 30.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.23 {"installer":{"name":"uv","version":"0.11.23","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for discord_bot_cli-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 89270172fd8556956c0b56b6b97cdc3b14c988e4213794724bb65e3264a5dc0c
MD5 86ff1b3a11a8d7024f3b5636f3452fb0
BLAKE2b-256 694dc614c471af354133c7f181682bfa5f09118bea2e98441b1689f4bd12c19f

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