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

Uploaded Python 3

File details

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

File metadata

  • Download URL: discord_bot_cli-0.3.0.tar.gz
  • Upload date:
  • Size: 188.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.22 {"installer":{"name":"uv","version":"0.11.22","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.3.0.tar.gz
Algorithm Hash digest
SHA256 706ea55a10a15587a387721814f9c1f6320e2aa5bc4a1334c9608cc2df6a4358
MD5 a07c5eb029e761493f4f3131ffae9c10
BLAKE2b-256 5fd80a1e7fcb7554b2db4b642d13ad69d2de497bfad73218ad5117309e1b5edc

See more details on using hashes here.

File details

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

File metadata

  • Download URL: discord_bot_cli-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 30.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.22 {"installer":{"name":"uv","version":"0.11.22","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.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0f33fa6ad75fc998c5e48c7a472bc54bc676485ce676c8f834a8154bb15f7da2
MD5 8e18fa66490be0db3dd751f9d58885d9
BLAKE2b-256 fa07a84395fead60e95ab17b40cc275ea6edaa8045db9361e14eb448d375f6ea

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