Skip to content

docs: Documentation for developing local commands - #259

Merged
agessaman merged 6 commits into
agessaman:devfrom
hickey:docs/develop-local-commands
Sep 20, 2026
Merged

agessaman merged 6 commits into
agessaman:devfrom
hickey:docs/develop-local-commands

Conversation

@hickey

@hickey hickey commented Aug 29, 2026

Copy link
Copy Markdown
Contributor

What this changes

Adds documentation for other developers to jumpstart their development of local commands.

Why

Mostly looking to build a framework that a developer can start with to get most of the boilerplate code without having to create it from scratch. Also looking to include recommendations and explanations to some of the common structures in the bot command files.

Testing

N/A given this is just documentation.

Checklist

  • Branched from dev and targeting dev
  • make test passes
  • make lint passes (ruff + mypy)
  • Frontend lint passes if templates changed (npm run lint:frontend)
  • Tests added or updated for behavior changes
  • CHANGELOG.md updated under ## [Unreleased] if user-visible
  • Config changes are reflected in config.ini.example (and the minimal/quickstart
    templates where relevant) — CI validates these with validate_config.py --strict
  • New docs pages are added to nav: in mkdocs.yml
  • Any new command justifies its airtime and defaults conservatively

Signed-off-by: Gerard Hickey <hickey@kinetic-compute.com>
@hickey
hickey marked this pull request as draft August 29, 2026 18:25
@hickey

hickey commented Aug 29, 2026

Copy link
Copy Markdown
Contributor Author

This is the first draft. I have done a very quick cursory look at the document but it needs a much more comprehensive review. There are a few things that I have found that need to be refined or extended.

Signed-off-by: Gerard Hickey <hickey@kinetic-compute.com>
@agessaman

Copy link
Copy Markdown
Owner

Read through it—this is going to be genuinely useful, thanks for writing it up. Three things I noticed checking the samples against the code:

  • [YourCommand_Command] should be [Yourcommand_Command]; the section is name.title() + "_Command". Sneaky one, because CamelCase still satisfies your own get_config_value() calls while enabled/channels/aliases and the Plugins page read the derived name. DadJoke/WebViewer only work via a hardcoded table a local command cannot join.
  • cache_value() is (cache_key, cache_value, cache_type, cache_hours). The value= kwarg in the Generic Cache example raises, and the Best Practices I keep getting a URLLIB3.Connectionpool:Retrying error #4 call passes them positionally in an order that silently swaps value and cache_type.
  • Needs a nav: line in mkdocs.yml or the page will not show up on the docs site.

I have all three patched locally if you would rather I just push them to your branch. Otherwise ping me when you take it out of draft.

Signed-off-by: Gerard Hickey <hickey@kinetic-compute.com>
Signed-off-by: Gerard Hickey <hickey@kinetic-compute.com>
@hickey
hickey force-pushed the docs/develop-local-commands branch from 96d34e1 to 2ecdcb4 Compare September 14, 2026 17:32
Signed-off-by: Gerard Hickey <hickey@kinetic-compute.com>
@hickey

hickey commented Sep 14, 2026

Copy link
Copy Markdown
Contributor Author

I have done some updates and clarifications. Also implemented your suggestions.

I think that there is one outstanding item to be cleaned up before merging. This document needs to be reconciled with docs/local-plugins.md. There is some cross over and maybe some items from docs/local-plugins.md needs to be brought into this document? If so that my eliminate the need for docs/local-plugins.md.

@hickey
hickey marked this pull request as ready for review September 14, 2026 17:39
@agessaman
agessaman merged commit 0fe22d2 into agessaman:dev Sep 20, 2026
10 checks passed
agessaman added a commit that referenced this pull request Sep 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants