feat(scripts): add scripts area with per-script docs and TLS cert tool#13
Open
behobu wants to merge 5 commits into
Open
feat(scripts): add scripts area with per-script docs and TLS cert tool#13behobu wants to merge 5 commits into
behobu wants to merge 5 commits into
Conversation
Establish a home for scripts that interact with Monad via its API, with a convention that every script ships usage and limitations documentation. - scripts/: one directory per script, each with a required README; a catalog table (with a Category column) in scripts/README.md; a copy-to-start _template/ (doc template + script stub with API-key/curl-config conventions). - CONTRIBUTING.md: how to add a script + PR checklist (Limitations section required; no committed secrets; dry-run for state-changing scripts). - LICENSE: add MIT. - README.md: fix stale clone URL (monad-community/monad-community -> monad-inc/community) and add a Scripts section. - First script: tls-cert-to-syslog-input (registers device TLS cert SHA-256 fingerprints on a pipeline's Syslog input for SNI-less routing) with full usage + limitations README. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Rename monad-tls-cert-to-pipeline.sh to tls-cert-to-syslog-input.sh so the script file name matches its directory slug, and update the in-script header, usage, and examples plus the README references accordingly. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Replace the MIT license added in this PR with the Apache License 2.0, retaining the Monad, Inc. copyright notice. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Add the standard Apache 2.0 source header to the script template and the TLS cert fingerprint script, and bump the usage() sed anchor so --help output skips the header and stays unchanged. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The previous usage() implementation was doubly broken: it anchored the doc block at a hard-coded line number (which silently breaks when the header grows or shrinks), and it ended at the FIRST '# ----' divider, which sits before the Usage section — so --help never actually printed the usage and options text. Anchor on structure instead: print from the first blank line (end of the license header) up to the first line of code. --help output now includes the full Usage, options, and examples sections. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Establishes a home for scripts that interact with Monad via its API, with the convention that every script ships usage and limitations documentation.
Structure
scripts/— one directory per script (scripts/<slug>/), each with a requiredREADME.md.scripts/README.md— catalog table with a Category column (flatscripts/<slug>/layout for now).scripts/_template/— copy-to-start scaffold: a per-script doc template (with a mandatory Limitations & caveats section) and a script stub showing the API-key /curl --configconventions.CONTRIBUTING.md— how to add a script + a PR checklist that requires the Limitations section, forbids committed secrets, and asks for a dry-run on state-changing scripts.LICENSE— MIT.README.md— fixes the stale clone URL (monad-community/monad-community→monad-inc/community) and adds a Scripts section.First script
scripts/tls-cert-to-syslog-input/—monad-tls-cert-to-pipeline.sh: probes devices over TLS (or bulk-loads precomputed hashes) and registers their certificate SHA-256 fingerprints on a pipeline's Syslog input (settings.cert_fingerprints) so SNI-less sources route correctly. Ships a full usage + limitations README.Why
The repo advertised a "Code Snippets / scripts" category but had no home for it. This makes "add a script → add its usage and limitations" the default path rather than an afterthought.
Notes
scripts/<slug>/with a Category column (vs. category subfolders) chosen for now; easy to reorganize later.bash -n.🤖 Generated with Claude Code