sq / site
AGENTS.md2.6k starsChanged 12 days agoMITView on GitHub
Conventions specific to the sq.io website under site/. Repo-wide rules in AGENTS.md still apply here. This is the source for the sq.io website under site/ in the sq monorepo. It is a Hugo-based documentation site for the sq CLI tool, uses the Doks theme and Bun tooling, and is deployed on Netlify. The site's own test/lint suite is link-checking only (lychee): Formatting and JS linting are handled repo-wide, not by site scripts. Markdown, JSON, YAML, TOML, SCSS/CSS, Go, and site…
We split this AGENTS.md into the rules it gives an agent
8 rules. About 0 are common, 2 are distinctive, and 6 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
6
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- could be automatic: a setting could enforce it
- Very specific: line 109
Regeneration: Run bun run gen:cmd-help when sq commands change (requires sq installed)
- Very specific: line 183
Third-party scripts and CSP: when adding scripts in layouts/partials/head/custom-head.html, update Content-Security-Policy in netlify.toml …
- Distinctive: line 212
When bumping that plugin, move the override with it, or local numbers stop predicting preview numbers.
- Very specific: line 251
Module cache issue: If you see "shortcode 'asciicast' not found", run bun install to refresh Hugo modules.
- Distinctive: line 256
Use Hugo alert shortcodes for callouts:
- Very specific: line 266
Hugo aliases: Use Hugo's alias front matter for content-based redirects
- Very specific: line 267
Static redirects: Add entries to static/_redirects for non-content redirects (Netlify format)
- Very specific: line 277
Module cache: Run bun install if Hugo module issues occur
≈ “Common” is an estimate: at least 1 in 5 of the 36,368 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
AGENTS.md (site/)
Conventions specific to the sq.io website under site/. Repo-wide rules in
AGENTS.md still apply here.
Project Overview
This is the source for the sq.io website under site/ in the
sq monorepo. It is a Hugo-based documentation site
for the sq CLI tool, uses the Doks theme and Bun tooling, and is deployed on Netlify.
Tech Stack:
- Hugo 0.139.2+ (extended version) - static site generator
- Bun 1.2+ - JavaScript runtime and package manager
- Doks theme (Hugo theme for documentation sites)
- Netlify for hosting and CI/CD
Development Commands
Local Development
# Install dependencies (includes Hugo via hugo-installer)
make deps
# or
bun install
# Start local dev server at http://localhost:1313
# Note: May take 1+ minute to start, be patient
make site-local
# or
bun start
# Build production site (output to ./public)
make site-build
# or
bun run build
# One-shot CI-equivalent check (deps -> test -> build)
make ci
# Build and preview locally
bun run previewLinting and Testing
The site's own test/lint suite is link-checking only (lychee):
make site-test # internal link check (bun run test:ci); matches Site CI
make site-test-full # + external link crawl (bun run test:full)
bun run lint:links:internal # the internal check directlyFormatting and JS linting are handled repo-wide, not by site scripts. Markdown, JSON, YAML, TOML, SCSS/CSS, Go, and site JS are formatted by dprint, and site JS is linted by Biome. Run these from the repo root:
make fmt # dprint fmt (plus Go imports)
make lint # golangci-lint, shellcheck, dprint check, BiomeThe repo-root Format workflow gates this.
Content Generation
# Regenerate sq command help documentation
# Requires sq CLI to be installed and in PATH
bun run gen:cmd-help
# Regenerate syntax highlighting CSS (Chroma themes)
bun run gen:syntax-cssArchitecture
Content Organization
Content structure:
content/en/docs/- Main documentation in Englishcmd/- Auto-generated command documentation (see below)drivers/- Database driver docsoutput/- Output format docsinspect/- Inspect command docsconfig/- Configuration docsoverview.md,install.md- Key landing pages
Hugo modules:
- Uses
cj.rs/gohugo-asciinemamodule for embedded terminal recordings - Module defined in
go.mod, cached by Hugo
Command Documentation System
The content/en/docs/cmd/ directory contains auto-generated help text for sq commands:
- Generation script:
content/en/docs/cmd/generate-cmd-help.sh- Runs
sq <command> --helpfor each command - Outputs to
.help.txtfiles (e.g.,add.help.txt,driver-ls.help.txt) - Also generates config option help in
./options/*.help.txt
- Runs
- Markdown integration: Corresponding
.mdfiles include the help text via Hugo shortcodes - Regeneration: Run
bun run gen:cmd-helpwhen sq commands change (requires sq installed)
Layouts and Templates
layouts/_default/- Base templateslayouts/shortcodes/- Custom shortcodes for documentation- Includes asciinema player shortcode for terminal recordings
layouts/partials/- Reusable template partials
Assets Pipeline
assets/scss/- SCSS stylesheets compiled by Hugo Pipesassets/js/- JavaScript bundled with esbuildstatic/- Static assets served as-isstatic/casts/- Asciinema terminal recordings (.cast files)static/_redirects- Netlify redirects (e.g., sq.io/install.sh)
Configuration
Hugo configuration is split by environment:
config/_default/- Base config (config.toml, params.toml, menus, etc.)config/production/- Production overridesconfig/next/- Staging/next environment
Syntax Highlighting
Uses Hugo's built-in Chroma (not highlight.js):
- Themes: Nord (light and dark modes)
- Generation:
generate-syntax-css.shcreates SCSS files - Output:
assets/scss/components/_syntax.scssand_syntax-dark.scss
Link Checking
check-links.sh:
- Builds a fresh site with Hugo into
.serve-lint - Maps generated
https://sq.ioURLs back to the local build - Runs the package.json-pinned lychee binary against every generated HTML file
- Reads shared request policy and host exclusions from
lychee.toml
Two scopes, selected via LYCHEE_SCOPE (or a full/internal argument):
internal(bun run lint:links:internal): only checks pages and assets served by the generated site. Stable, no network dependency; this is whatmake ciand PR gating use.full(bun run lint:links, the default): also follows third-party external links. Used by the nightlySite Linksworkflow. To keep "red" meaningful despite flaky third parties, it downgrades403/429/5xxresponses (genuine404/410/network errors stay fatal). Lychee handles per-request timeouts, retries, and per-host throttling.
bun install downloads lychee as a checksummed release binary. The pin is
otherDependencies.lychee in package.json; update that value and the platform
checksums in scripts/install-lychee.sh together. Rust and Cargo are not required.
CI/CD Workflow
Triggers and actions:
- Push to
masterordevelopwith changes undersite/**→ GitHub Actions runsmake ci(lint, build, artifact validation); no production deploy - PR to
masterordevelopwith changes undersite/**→ CI + Netlify deploy preview - Stable GitHub release (
vX.Y.Z, not pre-release) →site-publish-release.ymldeploys to https://sq.io and runs post-deploy smoke checks - Manual
Site Publish (dispatch)for ad-hoc publishes before the next release. RequiresNETLIFY_AUTH_TOKENandNETLIFY_SITE_ID. - Nightly (
site-data-nightly.yml, 07:00 UTC) regeneratessite/data/github.toml; a push triggers Site CI only (no deploy). RequiresSITE_DATA_PUSH_TOKEN(admin PAT with Contents read/write).
Third-party scripts and CSP: when adding scripts in
layouts/partials/head/custom-head.html, update
Content-Security-Policy in netlify.toml in the same PR.
Netlify configuration (netlify.toml):
- Build command:
bun run build(deploy previews only; production is skipped viaignore) - Publish directory:
public - Plugins: Lighthouse audits, sitemap submission
- Deploy previews run Lighthouse against the deployed URL. Scores appear in the build log and Netlify's deploy summary; no report page is published to the site.
- Netlify automatically detects
bun.lockand usesbun install BUN_FLAGS = "--force"makes that install reinstall every dependency. Netlify restores a per-branchnode_modulescache, and installing a newerbun.lockover a stale tree can leave nested dependencies missing, which crashes the install stage (#1210). Despite the flag's description,--forcestill resolves frombun.lockand does not float to newer in-range versions.
Lighthouse
Two separate runners produce Lighthouse scores, and they only agree if kept aligned:
- Deploy previews:
@netlify/plugin-lighthouseaudits the deployed preview URL. It runsonSuccess, after the deploy, using the lighthouse version it depends on. - Locally:
make site-lighthousebuilds the production site, serves it with gzip/brotli, and auditshttp://localhost:8090.
lighthouse reaches node_modules as a dependency of @netlify/plugin-lighthouse, and
overrides in package.json pins it so the plugin and the harness always run the same version.
When bumping that plugin, move the override with it, or local numbers stop predicting preview
numbers.
The harness runs node_modules/.bin/lighthouse. Do not switch it back to bunx lighthouse: bunx
prefers the local binary but silently falls back to the registry's latest from any other
directory, and the versions are not interchangeable. The same page scored SEO 93 under 9.6.3 and
69 under 13.4.1, because the single failing audit (is-crawlable) was reweighted from 1-of-15 to
4-of-11. Accessibility went from 54 audits to 76, and the PWA category was removed in v12.
Even at matching versions, a local run does not reproduce a production score, by design:
- The plugin passes
skipAudits: ['is-crawlable']when auditing a deploy URL, because Netlify injectsx-robots-tag: noindexon previews. The harness serves without that header, so the audit passes on its own merits instead of being skipped. - Local runs see no Netlify headers (no CSP, no
netlify.tomlcaching rules) and no CDN latency. - Third-party scripts behave differently from
localhost. Measured the same day on 9.6.8: Best Practices was 100 locally and 92 onhttps://sq.io, because the analytics beacon logs a console error under a headless browser against the real origin but not against the local server.
So use the harness for relative comparisons, not to predict the number a deploy preview reports.
The plugin's full-config is not a distinct configuration: in 9.6.8 it is
{extends: 'lighthouse:default', settings: {}}, so the harness's default-config mobile run
already matches it.
Content Style Guide
Asciinema Terminal Recordings
Include terminal recordings using the asciicast shortcode:
{{< asciicast src="/casts/filename.cast" theme="monokai" poster="npt:0:20" rows="10" speed="1.5" idleTimeLimit="3" >}}- Store casts in
static/casts/ poster="npt:0:20"sets cover image at 20 seconds- Usually do NOT set
autoPlay="true"
Module cache issue: If you see "shortcode 'asciicast' not found", run bun install to
refresh Hugo modules.
Alerts
Use Hugo alert shortcodes for callouts:
{{< alert icon="👉" >}}
Important note for readers.
{{< /alert >}}Redirects
- Hugo aliases: Use Hugo's
aliasfront matter for content-based redirects - Static redirects: Add entries to
static/_redirectsfor non-content redirects (Netlify format)- Automatically appended to
public/_redirectsduring build
- Automatically appended to
Important Notes
- Hugo version: Extended version required (specified in package.json otherDependencies)
- Bun version: Requires Bun 1.2+ (enforced in package.json engines)
- Build time: Initial local server start can take 1+ minute
- Command help: The
gen:cmd-helpscript requires thesqCLI installed locally - Module cache: Run
bun installif Hugo module issues occur - Lockfile: Project uses
bun.lock(text-based lockfile, introduced in Bun 1.2+) for dependency management
Trending
Less talk lately.about the whole repository
Who's talking about neilotoole/sq
- avelino/awesome-go“few packages that can be added”GitHub · Dec 25, 2024 · 5 reactions
- A Hacker News story“sq: Swiss-army knife for data”Hacker News · Mar 5, 2021 · 5 points
- sudosubin/agents.nix“claude-code-plugins.github.neilotoole.sq: init at 0.55.0”GitHub · Oct 28, 2026
- sudosubin/agents.nix“claude-code-marketplaces.github.neilotoole.sq: init at 0.55.0”GitHub · Oct 28, 2026
- NixOS/nixpkgs“sq: 0.54.1 -> 0.55.0”GitHub · Sep 10, 2026
The biggest 5 of 44 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 44
Talked about on GitHub and Hacker News (44 times).
On GitHub · 43
- Dec 25, 2024few packages that can be added — avelino/awesome-go5 reactions
- Oct 28, 2026claude-code-plugins.github.neilotoole.sq: init at 0.55.0 — sudosubin/agents.nix0 reactions
- Oct 28, 2026claude-code-marketplaces.github.neilotoole.sq: init at 0.55.0 — sudosubin/agents.nix0 reactions
- Sep 10, 2026sq: 0.54.1 -> 0.55.0 — NixOS/nixpkgs0 reactions · 3 comments
- Sep 10, 2026sq 0.55.0 — Homebrew/homebrew-core0 reactions · 1 comment
38 more on GitHub
- Aug 1, 2026sq: 0.50.0 -> 0.54.1, adopt package — NixOS/nixpkgs0 reactions · 1 comment
- Jun 30, 2026Add XLSX spreadsheet compare/diff support — ONLYOFFICE/DocumentServer0 reactions · 2 comments
- Jun 19, 2026sq 0.54.0 — Homebrew/homebrew-core0 reactions · 1 comment
- Jun 7, 2026Recipe: Lima/Colima profile for cluster discovery from macOS — sakiladb/rqlite0 reactions · 1 comment
- Jun 7, 2026Docs: document the host-side cluster-discovery footgun (single-node and cluster-compose) — sakiladb/rqlite0 reactions · 1 comment
- Jun 7, 2026Schema divergence from canonical SQLite Sakila: NUMERIC affinity, missing AUTOINCREMENT, missing DEFAULT — sakiladb/rqlite0 reactions
- May 26, 2026sq 0.53.0 — Homebrew/homebrew-core0 reactions · 1 comment
- May 18, 2026[Request]: sq — ScoopInstaller/Main0 reactions
- May 16, 2026sq 0.52.0 — Homebrew/homebrew-core0 reactions · 1 comment
- May 1, 2026sq: 0.50.0 -> 0.54.1 — NixOS/nixpkgs0 reactions · 5 comments
- Apr 24, 2026sq 0.50.2 — Homebrew/homebrew-core0 reactions · 1 comment
- Mar 28, 2026sq: 0.48.12 -> 0.50.0 — NixOS/nixpkgs0 reactions
- Feb 15, 2026sq 0.49.0 — Homebrew/homebrew-core0 reactions · 1 comment
- Jan 30, 2026sq 0.48.12 — Homebrew/homebrew-core0 reactions · 1 comment
- Jan 19, 2026sq: 0.48.10 -> 0.48.12 — NixOS/nixpkgs0 reactions · 1 comment
- Jan 18, 2026sq 0.48.11 — Homebrew/homebrew-core0 reactions · 1 comment
- Jan 3, 2026sq: 0.48.5 -> 0.48.10 — NixOS/nixpkgs0 reactions · 1 comment
- Dec 28, 2025Failure to detect XLSX — h2non/filetype0 reactions
- Nov 21, 2025[WIP] Investigate replacing jq executable calls with sq library — github/gh-aw0 reactions
- Mar 9, 2025Add nixos as a supported package manager — neilotoole/sq-web0 reactions · 1 comment
- Jan 20, 2025sq: 0.48.4 -> 0.48.5 — NixOS/nixpkgs0 reactions
- Dec 27, 2024add package neilotoole/sq — avelino/awesome-go0 reactions · 1 comment
- Nov 25, 2024sq: 0.48.3 -> 0.48.4 — NixOS/nixpkgs0 reactions
- Oct 8, 2024feat: 🎸 "sq" のインストールスクリプトを追加した — nikukyugamer/dotfiles0 reactions
- Oct 8, 2024Add github.com/neilotoole/sq — aquaproj/aqua-registry0 reactions · 2 comments
- Jan 30, 2024sq: 0.46.1 -> 0.47.4 — NixOS/nixpkgs0 reactions · 3 comments
- Dec 8, 2023sq: 0.42.1 -> 0.46.1 — NixOS/nixpkgs0 reactions
- Sep 26, 2023sq: 0.42.0 -> 0.42.1 — NixOS/nixpkgs0 reactions
- Aug 26, 2023sq: 0.40.0 -> 0.42.0 — NixOS/nixpkgs0 reactions
- May 31, 2023sq: 0.35.0 -> 0.36.2 — NixOS/nixpkgs0 reactions
- May 8, 2023sq: 0.33.0 -> 0.35.0 — NixOS/nixpkgs0 reactions · 1 comment
- Mar 14, 2023sq: 0.24.0 -> 0.24.1 — NixOS/nixpkgs0 reactions
- Dec 31, 2022sq: 0.18.2 -> 0.20.0 — NixOS/nixpkgs0 reactions
- Dec 26, 2022sq: 0.16.0 -> 0.18.2 — NixOS/nixpkgs0 reactions
- Dec 20, 2022sq: 0.15.11 -> 0.16.0 — NixOS/nixpkgs0 reactions
- Nov 10, 2022sq: 0.15.6 -> 0.15.11 — NixOS/nixpkgs0 reactions
- Aug 10, 2022sq: 0.15.4 -> 0.15.6 — NixOS/nixpkgs0 reactions
- Sep 16, 2021Initial code — neilotoole/jsoncolor0 reactions
On Hacker News · 1
- Mar 5, 2021sq: Swiss-army knife for data5 points
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.
Of the AGENTS.md files we read, the 28,693 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository8 other files it gives its agents.
- AGENTS.mdAGENTS.md
- cli/AGENTS.mdAGENTS.md
- code-reviewSkill
- sq-actions-dependabotSkill
- sq-ci-triageSkill
- sq-gomod-dependabotSkill
- sq-site-dependabotSkill
- sqSkill
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
Reviews can't be read right now.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

