Skip to content

Add baseline tooling (bootstrap/doctor/lint/CI)#6

Merged
daedalus merged 2 commits intomasterfrom
copilot/add-foundational-repo-tooling
Feb 23, 2026
Merged

Add baseline tooling (bootstrap/doctor/lint/CI)#6
daedalus merged 2 commits intomasterfrom
copilot/add-foundational-repo-tooling

Conversation

Copy link
Contributor

Copilot AI commented Feb 23, 2026

Adds foundational repo tooling for this mixed-language utilities repo: standardised editor config, a Makefile with common targets, shell scripts for setup/diagnostics/linting, a CI workflow, and an updated README.

New files

  • .editorconfig — charset, indent style/size, LF endings, trailing-whitespace trimming per file type
  • .env.example — placeholder env vars; scripts/bootstrap copies to .env on first run
  • Makefile — targets: bootstrap, doctor, lint, format, test (placeholder), ci

Scripts (scripts/)

All scripts are executable and use #!/usr/bin/env bash with set -euo pipefail.

Script What it does
bootstrap Checks git, makes scripts executable, creates .env, optionally installs pre-commit
doctor Prints env info; version-checks critical (git, bash) and optional (python3, node, go, shellcheck, shfmt, pre-commit) tools; exits non-zero if critical tools missing
lint Runs shellcheck + shfmt -d on scripts/* and bin/*; uses pre-commit run --all-files if config present. Omits -e intentionally so all checkers run before exiting
format Runs shfmt -w; defers to pre-commit if configured

CI (.github/workflows/ci.yml)

  • Triggers on all pushes and PRs
  • Installs shellcheck; conditionally sets up Python + pre-commit only when .pre-commit-config.yaml is present
  • Runs make lint
  • Scoped to permissions: contents: read

README

Added Quickstart, tooling reference table, and bin/ vs scripts/ convention docs.

Original prompt

Create a pull request against branch master in repository daedalus/misc that adds foundational repo tooling and scripts suitable for a mixed-language "misc" utilities repository.

Add the following files and ensure they work together:

  1. README.md
  • Provide an index/overview of repo purpose and structure.
  • Document how to run scripts, how to bootstrap, and conventions (bin/ for user-facing commands, scripts/ for internal helpers).
  • Include quickstart examples.
  1. .editorconfig
  • Standardize indentation, newline, charset, trimming trailing whitespace.
  1. Makefile
  • Add common targets that call the scripts below:
    • bootstrap, doctor, lint, format, test (test may be a placeholder that explains no tests if none exist), ci.
  • Make targets robust (print helpful messages if tools missing).
  1. scripts/bootstrap (shell script)
  • Verify required common tools exist (git).
  • Optionally install/check pre-commit if Python is available; otherwise print guidance.
  • Create .env from .env.example if present and .env missing.
  • Ensure scripts are executable.
  1. scripts/doctor (shell script)
  • Print diagnostic info and check for common tools:
    • git, bash/sh
    • if present: python3, node, go
    • print versions and warn if missing.
  • Exit non-zero if critical tools missing (git + shell).
  1. scripts/lint and scripts/format (shell scripts)
  • Run pre-commit run --all-files if pre-commit is installed and config exists.
  • Otherwise run lightweight checks:
    • If shellcheck exists, run on scripts/* and bin/* shell scripts.
    • If shfmt exists, check (lint) / apply (format) formatting on shell scripts.
    • Provide clear output and exit codes.
  1. .github/workflows/ci.yml
  • Minimal CI to run on pushes and PRs.
  • Steps:
    • checkout
    • setup python (latest stable) for pre-commit if config present
    • run make ci (or make lint)
  • Ensure workflow is safe and doesn’t assume private secrets.
  1. (Optional but recommended) .env.example
  • Include placeholder comments.

General requirements:

  • Use portable POSIX-ish shell where possible; prefer #!/usr/bin/env bash if using bash features.
  • Provide helpful usage output when scripts run without args.
  • Ensure files have correct line endings and executable bit where applicable.
  • Keep changes minimal and not opinionated beyond the above.

Open the PR with a concise title like: "Add baseline tooling (bootstrap/doctor/lint/CI)".

This pull request was created from Copilot chat.


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Co-authored-by: daedalus <115175+daedalus@users.noreply.github.com>
Copilot AI changed the title [WIP] Add foundational repo tooling and scripts for utilities repository Add baseline tooling (bootstrap/doctor/lint/CI) Feb 23, 2026
Copilot AI requested a review from daedalus February 23, 2026 17:59
@daedalus daedalus marked this pull request as ready for review February 23, 2026 18:01
@daedalus daedalus merged commit 472ace2 into master Feb 23, 2026
1 check failed
@daedalus daedalus deleted the copilot/add-foundational-repo-tooling branch February 23, 2026 18:04
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