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.2.0.tar.gz (186.0 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.2.0-py3-none-any.whl (30.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: discord_bot_cli-0.2.0.tar.gz
  • Upload date:
  • Size: 186.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.21 {"installer":{"name":"uv","version":"0.11.21","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.2.0.tar.gz
Algorithm Hash digest
SHA256 77c34e2805d1fdda55bc31cdcb2f8fe538ea957bd365a12d724a31882523a71d
MD5 9ab6368ed0858f1a40a940ecda0b5ac3
BLAKE2b-256 8faef3d725cc30f3c4d9296116231a6df1914f16f8502f4afa0eded03b504167

See more details on using hashes here.

File details

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

File metadata

  • Download URL: discord_bot_cli-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 30.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.21 {"installer":{"name":"uv","version":"0.11.21","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.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ee92b0e0b5059d5546867c19c51d98b8b821fcd6c976526ca031a66c31a254fc
MD5 a54ac171571e043e19150f85f817996b
BLAKE2b-256 84a069a77d234c6f3f8c34b2be3558d20b7393c616d3220da64ebde848cb8357

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