diff --git a/CHANGELOG.md b/CHANGELOG.md index 1cfee20..15f6739 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Removed + +- **The documentation feature.** The guides are moving to [wpvilla.in](https://wpvilla.in/), so wp-ops no longer searches or links documentation. + - `wp-ops docs` is gone, along with the "the documentation mentions it" hint in `search`. + - The `@doc` manifest directive is gone: the catalog `doc` field, the `Docs:` line in `--help`, the `doc` key in `list --json`, the `docs:` line in the MCP command detail, and the lint that checked the path. The `# @doc` lines are stripped from every script header. + - `command_search` and `command_run` clients that read the `doc` field will no longer see it. + ## [5.40.0] - 2026-10-28 ### Deprecated diff --git a/README.md b/README.md index d9ccb52..3f9fbcd 100644 --- a/README.md +++ b/README.md @@ -100,7 +100,7 @@ sudo mv wp-ops /usr/local/bin/ # or anywhere on your PATH wp-ops init ``` -The scripts, playbooks and guides are embedded in the binary — once it's on your PATH +The scripts and playbooks are embedded in the binary — once it's on your PATH you can delete the clone. @@ -117,7 +117,6 @@ Running `wp-ops` with no arguments opens an interactive picker of every command: wp-ops search webp # find a command by name or description wp-ops backup --help # every command in one category wp-ops list --platform wordpress # only what works on any WordPress site, Trellis or not -wp-ops docs oom # search the guides ``` More in [Using the CLI](docs/cli/usage.md) and the diff --git a/docs/cli/usage.md b/docs/cli/usage.md index de7bd83..2f6fc04 100644 --- a/docs/cli/usage.md +++ b/docs/cli/usage.md @@ -49,33 +49,9 @@ project you're standing in, `wp-ops db-pull example.com ` offers completion, and anything else prints a one-line hint saying what the argument is. Typing a dash offers the command's own flags. -## Searching the guides +## Guides -A good deal of what this repo knows is written down rather than scripted, so -`wp-ops docs` searches the prose the way `wp-ops search` searches the catalog: - -```bash -wp-ops docs # list every guide -wp-ops docs "search-replace" # show matching lines, grouped by document -wp-ops docs oom -w # whole words only (so "oom" skips "server room") -wp-ops docs oom -l # paths only, for piping: wp-ops docs oom -l | xargs $EDITOR -``` - -When `wp-ops search` finds no command for a term, it checks the documentation and -points you there. - -`docs/nginx/`, `docs/troubleshooting/`, and `docs/bedrock/` hold guides and config -templates rather than runnable scripts, so they carry no commands and no CLI -category — reach them through `wp-ops docs`. - -Every catalog entry is something that runs. Copy-paste-into-a-theme reference -material — WP-CLI guides and the speed-optimization notes — lives under -`docs/wordpress-utilities/` instead. To pull one into a project, `wp-ops docs -l -` gives you the path: - -```bash -cat "$(wp-ops docs -l wp-template | head -1)" -``` +wp-ops carries no documentation of its own. The guides live on [wpvilla.in](https://wpvilla.in/), and every command explains itself with `wp-ops --help`. ## Where commands run diff --git a/docs/wordpress-utilities/README.md b/docs/wordpress-utilities/README.md index abc10e5..625ac17 100644 --- a/docs/wordpress-utilities/README.md +++ b/docs/wordpress-utilities/README.md @@ -50,14 +50,6 @@ Each utility is self-contained and can be integrated independently: 3. Copy the necessary files to your WordPress theme or plugin 4. Follow the installation and configuration instructions -### Via wp-ops - -These files are reference guides, not runnable scripts. Find them with `wp-ops docs`: - -```bash -wp-ops docs -l wp-template # print the path of the matching guide -``` - ### General Prerequisites Most utilities may require one or more of: diff --git a/docs/wordpress-utilities/speed-optimization/README.md b/docs/wordpress-utilities/speed-optimization/README.md index bfff493..564de68 100644 --- a/docs/wordpress-utilities/speed-optimization/README.md +++ b/docs/wordpress-utilities/speed-optimization/README.md @@ -7,10 +7,8 @@ Measuring TTFB with `curl` and `wget`, the 0.8 s / 1.8 s thresholds, and why to Two runnable scripts back the manual `curl`/`wget` checks above with repeatable, averaged measurements. They live in [`scripts/monitoring/`](../../../scripts/monitoring/), not this folder — everything -under `wordpress-utilities/` is treated by the `wp-ops` CLI as a copy-paste -reference snippet (printed or clipboard-copied, never executed), which doesn't -fit an actual runnable tool. This README stays the docs home; `@doc` on both -scripts points back here. +under `wordpress-utilities/` is reference material, which doesn't fit an +actual runnable tool. - [`../../scripts/monitoring/ttfb-test.sh`](../../../scripts/monitoring/ttfb-test.sh) — runs `curl` against a URL 5 times from your machine, averages diff --git a/go/cmd/docs.go b/go/cmd/docs.go deleted file mode 100644 index 458f43c..0000000 --- a/go/cmd/docs.go +++ /dev/null @@ -1,281 +0,0 @@ -// Port of the bash CLI's "Documentation Search" section (wp-ops:1610-1736) -// and its dispatch (wp-ops:2196-2211) — M4 task 5, -// docs/dev/m4-go-cli-completion.md. Unrelated to the per-command @doc manifest -// directive (catalog.Entry.Doc, already surfaced by executors' --help and -// --json): this is a full-text search over every *.md file in the repo, -// independent of any command's manifest. -package cmd - -import ( - "bufio" - "fmt" - "io/fs" - "os" - "path/filepath" - "regexp" - "sort" - "strings" - - "github.com/spf13/cobra" -) - -// docMatchLimit caps how many matching lines are shown per document before -// the rest are summarised as "… N more" — a long guide can otherwise bury -// every other matching document under one file's hits (wp-ops:1621). -const docMatchLimit = 3 - -// docLineWidth truncates a shown matching line so a long paragraph stays on -// one row (wp-ops:1624). -const docLineWidth = 96 - -var ( - docsPathsOnly bool - docsWholeWord bool -) - -var docsCmd = &cobra.Command{ - Use: "docs [term]", - Short: "Search the guides (no term lists them)", - Args: cobra.MaximumNArgs(1), - RunE: func(cc *cobra.Command, args []string) error { - term := "" - if len(args) > 0 { - term = args[0] - } - os.Exit(runDocs(term, docsPathsOnly, docsWholeWord)) - return nil - }, -} - -func init() { - docsCmd.Flags().BoolVarP(&docsPathsOnly, "files", "l", false, "Print only matching file paths") - docsCmd.Flags().BoolVar(&docsPathsOnly, "paths", false, "Alias for --files") - docsCmd.Flags().BoolVarP(&docsWholeWord, "word", "w", false, "Match whole words only") - rootCmd.AddCommand(docsCmd) -} - -// docLine is one matching line, already collapsed/truncated for display. -type docLine struct { - number int - text string -} - -// docResult is one document with at least one match. -type docResult struct { - relPath string - matchCount int - lines []docLine -} - -func runDocs(term string, pathsOnly, wholeWord bool) int { - root, err := repoRoot() - if err != nil { - fmt.Fprintln(os.Stderr, err) - return 1 - } - - if term == "" { - printDocsList(root) - return 0 - } - - results, err := searchDocs(root, term, wholeWord) - if err != nil { - fmt.Fprintln(os.Stderr, err) - return 1 - } - - if len(results) == 0 { - fmt.Printf("No documents match '%s'.\n\n", term) - fmt.Printf("Try %s search %s to look for a command instead.\n", cmdName(), term) - return 1 - } - - if pathsOnly { - for _, r := range results { - fmt.Println(r.relPath) - } - return 0 - } - - noun := "documents" - if len(results) == 1 { - noun = "document" - } - fmt.Printf("%d %s matching '%s':\n\n", len(results), noun, term) - - for _, r := range results { - matchNoun := "matches" - if r.matchCount == 1 { - matchNoun = "match" - } - fmt.Printf(" %s (%d %s)\n", r.relPath, r.matchCount, matchNoun) - for _, l := range r.lines { - fmt.Printf(" %5d %s\n", l.number, l.text) - } - if r.matchCount > docMatchLimit { - fmt.Printf(" %5s … %d more\n", "", r.matchCount-docMatchLimit) - } - fmt.Println() - } - - if wholeWord { - fmt.Printf("Paths only (for piping to an editor): %s docs %s -l\n\n", cmdName(), term) - } else { - fmt.Printf("Whole words only: %s docs %s -w · paths only: %s docs %s -l\n\n", cmdName(), term, cmdName(), term) - } - - return 0 -} - -func printDocsList(root string) { - docs, err := findDocs(root) - if err != nil { - fmt.Fprintln(os.Stderr, err) - return - } - - fmt.Printf("Documentation (%d files)\n\n", len(docs)) - for _, d := range docs { - fmt.Printf(" %s\n", relDocPath(root, d)) - } - fmt.Println() - fmt.Printf("Search inside them with: %s docs \n", cmdName()) - fmt.Println() -} - -// hasDocMatches backs search.go's "the documentation mentions it though" -// cross-reference (wp-ops:1582-1586) when a command search comes up empty. -func hasDocMatches(term string) bool { - root, err := repoRoot() - if err != nil { - return false - } - results, err := searchDocs(root, term, false) - return err == nil && len(results) > 0 -} - -// searchDocs walks every *.md file under root and returns one docResult per -// file with at least one match, in findDocs' (sorted, repo-relative-path) -// order. -func searchDocs(root, term string, wholeWord bool) ([]docResult, error) { - re, err := compileDocTerm(term, wholeWord) - if err != nil { - return nil, err - } - - docs, err := findDocs(root) - if err != nil { - return nil, err - } - - var results []docResult - for _, doc := range docs { - count, lines, err := searchDocFile(doc, re) - if err != nil { - // Matches bash's `2>/dev/null` on the grep calls: an unreadable - // file is skipped, not a hard failure. - continue - } - if count > 0 { - results = append(results, docResult{ - relPath: relDocPath(root, doc), - matchCount: count, - lines: lines, - }) - } - } - return results, nil -} - -// findDocs mirrors find_docs (wp-ops:1630-1634): every *.md file in the -// repo, excluding .git/node_modules/vendor, sorted. -func findDocs(root string) ([]string, error) { - var docs []string - err := filepath.WalkDir(root, func(path string, d fs.DirEntry, err error) error { - if err != nil { - return err - } - if d.IsDir() { - switch d.Name() { - case ".git", "node_modules", "vendor": - return fs.SkipDir - } - return nil - } - if strings.HasSuffix(d.Name(), ".md") { - docs = append(docs, path) - } - return nil - }) - if err != nil { - return nil, err - } - sort.Strings(docs) - return docs, nil -} - -func relDocPath(root, path string) string { - rel, err := filepath.Rel(root, path) - if err != nil { - return path - } - return rel -} - -// compileDocTerm builds the case-insensitive matcher grep -i (or grep -wi -// for --word) implements, per DOC_GREP_OPTS (wp-ops:1628). -func compileDocTerm(term string, wholeWord bool) (*regexp.Regexp, error) { - pattern := regexp.QuoteMeta(term) - if wholeWord { - pattern = `\b` + pattern + `\b` - } - return regexp.Compile("(?i)" + pattern) -} - -// collapseDocWhitespace mirrors print_docs_results' sed pipeline -// (wp-ops:1719-1720): markdown indentation and list markers carry no -// meaning once a line is shown out of context. -var docWhitespaceRun = regexp.MustCompile(`[ \t]{2,}`) - -func collapseDocWhitespace(s string) string { - s = strings.TrimLeft(s, " \t") - s = docWhitespaceRun.ReplaceAllString(s, " ") - - runes := []rune(s) - if len(runes) > docLineWidth { - return string(runes[:docLineWidth-1]) + "…" - } - return s -} - -// searchDocFile scans one file line by line, matching grep -c (matchCount, -// the number of matching lines) and grep -n | head -N (the first -// docMatchLimit matching lines, collapsed/truncated for display). -func searchDocFile(path string, re *regexp.Regexp) (matchCount int, lines []docLine, err error) { - f, err := os.Open(path) - if err != nil { - return 0, nil, err - } - defer f.Close() - - scanner := bufio.NewScanner(f) - scanner.Buffer(make([]byte, 0, 64*1024), 1024*1024) - - lineNum := 0 - for scanner.Scan() { - lineNum++ - text := scanner.Text() - if !re.MatchString(text) { - continue - } - matchCount++ - if len(lines) < docMatchLimit { - lines = append(lines, docLine{number: lineNum, text: collapseDocWhitespace(text)}) - } - } - if err := scanner.Err(); err != nil { - return 0, nil, err - } - return matchCount, lines, nil -} diff --git a/go/cmd/docs_test.go b/go/cmd/docs_test.go deleted file mode 100644 index 98ee66d..0000000 --- a/go/cmd/docs_test.go +++ /dev/null @@ -1,190 +0,0 @@ -package cmd - -import ( - "os" - "path/filepath" - "testing" -) - -// writeDocs materializes a small doc tree under t.TempDir() and returns its -// root, so findDocs/searchDocs can be exercised against real files without -// touching the repo checkout. -func writeDocs(t *testing.T, files map[string]string) string { - t.Helper() - root := t.TempDir() - for rel, content := range files { - path := filepath.Join(root, rel) - if err := os.MkdirAll(filepath.Dir(path), 0o755); err != nil { - t.Fatalf("mkdir for %s: %v", rel, err) - } - if err := os.WriteFile(path, []byte(content), 0o644); err != nil { - t.Fatalf("writing %s: %v", rel, err) - } - } - return root -} - -// TestFindDocs ports find_docs (wp-ops:1630-1634): every *.md file, sorted, -// excluding .git/node_modules/vendor and non-.md files. -func TestFindDocs(t *testing.T) { - root := writeDocs(t, map[string]string{ - "README.md": "top", - "guides/backup.md": "guide", - "guides/notes.txt": "not markdown", - ".git/COMMIT_EDITMSG": "not a doc", - "node_modules/pkg/README.md": "vendored, excluded", - "vendor/lib/README.md": "vendored, excluded", - }) - - got, err := findDocs(root) - if err != nil { - t.Fatalf("findDocs: %v", err) - } - - want := []string{ - filepath.Join(root, "README.md"), - filepath.Join(root, "guides/backup.md"), - } - if len(got) != len(want) { - t.Fatalf("findDocs = %v, want %v", got, want) - } - for i := range want { - if got[i] != want[i] { - t.Errorf("findDocs[%d] = %q, want %q", i, got[i], want[i]) - } - } -} - -// TestCompileDocTerm covers the -w/--word distinction (DOC_GREP_OPTS, -// wp-ops:1628): a bare term matches as a substring, --word requires a word -// boundary so short terms like "oom" don't hit inside "server room". -func TestCompileDocTerm(t *testing.T) { - tests := []struct { - name string - term string - wholeWord bool - text string - want bool - }{ - {"substring match", "oom", false, "the server room is loud", true}, - {"whole word rejects a substring hit", "oom", true, "the server room is loud", false}, - {"whole word matches a standalone word", "oom", true, "an OOM killer event", true}, - {"case-insensitive by default", "Manifest", false, "the manifest file", true}, - {"regex metacharacters are literal", "wp-ops", false, "run wp-ops docs", true}, - } - - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - re, err := compileDocTerm(tt.term, tt.wholeWord) - if err != nil { - t.Fatalf("compileDocTerm: %v", err) - } - if got := re.MatchString(tt.text); got != tt.want { - t.Errorf("MatchString(%q) = %v, want %v", tt.text, got, tt.want) - } - }) - } -} - -// TestCollapseDocWhitespace ports the sed pipeline in print_docs_results -// (wp-ops:1719-1720): trim leading indentation, collapse runs of 2+ -// whitespace, then truncate to docLineWidth with an ellipsis. -func TestCollapseDocWhitespace(t *testing.T) { - tests := []struct { - name string - in string - want string - }{ - {"trims leading indentation", " - a list item", "- a list item"}, - {"collapses internal runs", "a b c", "a b c"}, - {"short line is untouched otherwise", "hello world", "hello world"}, - } - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - if got := collapseDocWhitespace(tt.in); got != tt.want { - t.Errorf("collapseDocWhitespace(%q) = %q, want %q", tt.in, got, tt.want) - } - }) - } - - long := "" - for i := 0; i < 120; i++ { - long += "x" - } - got := collapseDocWhitespace(long) - if len(got) == 0 { - t.Fatal("collapseDocWhitespace returned empty string") - } - runes := []rune(got) - if len(runes) != docLineWidth { - t.Errorf("truncated length = %d, want %d", len(runes), docLineWidth) - } - if runes[len(runes)-1] != '…' { - t.Errorf("truncated line should end with an ellipsis, got %q", got) - } -} - -// TestSearchDocFile pins matchCount against grep -c (matching lines, not -// occurrences) and the docMatchLimit cap on lines actually returned. -func TestSearchDocFile(t *testing.T) { - root := writeDocs(t, map[string]string{ - "many.md": "manifest one\nmanifest two\nmanifest three\nmanifest four\nno hit here\n", - }) - re, err := compileDocTerm("manifest", false) - if err != nil { - t.Fatalf("compileDocTerm: %v", err) - } - - count, lines, err := searchDocFile(filepath.Join(root, "many.md"), re) - if err != nil { - t.Fatalf("searchDocFile: %v", err) - } - if count != 4 { - t.Errorf("matchCount = %d, want 4", count) - } - if len(lines) != docMatchLimit { - t.Fatalf("len(lines) = %d, want %d", len(lines), docMatchLimit) - } - if lines[0].number != 1 || lines[0].text != "manifest one" { - t.Errorf("lines[0] = %+v, want {1 manifest one}", lines[0]) - } -} - -// TestSearchDocs covers the end-to-end aggregation: only files with at -// least one match are returned, in findDocs' sorted order. -func TestSearchDocs(t *testing.T) { - root := writeDocs(t, map[string]string{ - "a.md": "nothing relevant here", - "b.md": "the manifest directive lives here", - "c.md": "MANIFEST in caps, twice: manifest", - }) - - results, err := searchDocs(root, "manifest", false) - if err != nil { - t.Fatalf("searchDocs: %v", err) - } - if len(results) != 2 { - t.Fatalf("len(results) = %d, want 2", len(results)) - } - if results[0].relPath != "b.md" || results[1].relPath != "c.md" { - t.Errorf("results in wrong order: %+v", results) - } - if results[1].matchCount != 1 { - t.Errorf("c.md matchCount = %d, want 1 (grep -c counts matching lines, not occurrences)", results[1].matchCount) - } -} - -// TestSearchDocsNoMatches confirms an empty result set, not an error, is -// how "no documents match" is signalled — runDocs relies on this to print -// its own message rather than propagating a search error. -func TestSearchDocsNoMatches(t *testing.T) { - root := writeDocs(t, map[string]string{"a.md": "irrelevant content"}) - - results, err := searchDocs(root, "zzznomatchxyz", false) - if err != nil { - t.Fatalf("searchDocs: %v", err) - } - if len(results) != 0 { - t.Errorf("results = %v, want none", results) - } -} diff --git a/go/cmd/list.go b/go/cmd/list.go index 36d2873..b791725 100644 --- a/go/cmd/list.go +++ b/go/cmd/list.go @@ -199,7 +199,6 @@ func printJSON(c *catalog.Catalog) { Path string `json:"path"` RunsOn string `json:"runs_on"` Requires string `json:"requires"` - Doc string `json:"doc"` } var lines []string @@ -212,7 +211,6 @@ func printJSON(c *catalog.Catalog) { Path: e.Key, RunsOn: e.RunsOn, Requires: e.RequiresString(), - Doc: e.Doc, } var buf bytes.Buffer diff --git a/go/cmd/root.go b/go/cmd/root.go index 2f87f26..6385154 100644 --- a/go/cmd/root.go +++ b/go/cmd/root.go @@ -123,7 +123,6 @@ func rootLong(name string) string { {"", ""}, {name + " list", "List every command by category"}, {name + " search ", "Search commands by name or description"}, - {name + " docs [term] [-l]", "Search the guides (no term lists them)"}, {name + " doctor", "Check dependencies and environment"}, {name + " init", "Install shell completions"}, {name + " mcp-register", "Show MCP registration snippets for Claude/Mistral/Codex"}, diff --git a/go/cmd/search.go b/go/cmd/search.go index 30b11b5..0344723 100644 --- a/go/cmd/search.go +++ b/go/cmd/search.go @@ -41,9 +41,6 @@ func runSearch(term string) { if len(matches) == 0 { fmt.Printf("No commands match '%s'.\n\n", term) - if hasDocMatches(term) { - fmt.Printf("The documentation mentions it though — try %s docs %s.\n\n", cmdName(), term) - } fmt.Printf("Run %s to browse everything by category.\n", cmdName()) os.Exit(1) } diff --git a/go/internal/catalog/catalog.go b/go/internal/catalog/catalog.go index 330301a..760dcd4 100644 --- a/go/internal/catalog/catalog.go +++ b/go/internal/catalog/catalog.go @@ -47,7 +47,6 @@ type Entry struct { // ansible executor's --help) care about "either" specifically. Runs string `json:"runs,omitempty"` Requires []string `json:"requires,omitempty"` - Doc string `json:"doc,omitempty"` Args []manifest.Param `json:"args,omitempty"` Flags []manifest.Param `json:"flags,omitempty"` Examples []string `json:"examples,omitempty"` diff --git a/go/internal/catalog/catalog.json b/go/internal/catalog/catalog.json index a60739a..1962f79 100644 --- a/go/internal/catalog/catalog.json +++ b/go/internal/catalog/catalog.json @@ -9,7 +9,6 @@ "requires": [ "ssh" ], - "doc": "trellis/backup/README.md", "args": [ { "name": "site-name", @@ -68,7 +67,6 @@ "requires": [ "trellis" ], - "doc": "trellis/backup/README.md", "args": [ { "name": "site-name", @@ -134,7 +132,6 @@ "requires": [ "wp" ], - "doc": "trellis/backup/README.md", "args": [ { "name": "site-name", @@ -165,7 +162,6 @@ "wp", "gzip" ], - "doc": "scripts/backup/README.md", "flags": [ { "name": "--path", @@ -479,7 +475,6 @@ "unzip", "gzip" ], - "doc": "scripts/README.md", "args": [ { "name": "backup-dir", @@ -631,7 +626,6 @@ "requires": [ "find" ], - "doc": "scripts/misc/README-FIND-AND-REPLACE.md", "args": [ { "name": "filename", @@ -774,7 +768,6 @@ "requires": [ "gawk" ], - "doc": "trellis/monitoring/README.md", "args": [ { "name": "log_file", @@ -817,7 +810,6 @@ "script_path": "scripts/monitoring/error-monitor.sh", "runs_on": "server", "runs": "server", - "doc": "trellis/monitoring/README.md", "args": [ { "name": "domain", @@ -863,7 +855,6 @@ "requires": [ "gawk" ], - "doc": "trellis/monitoring/README.md", "args": [ { "name": "hours", @@ -930,7 +921,6 @@ "requires": [ "ssh" ], - "doc": "docs/wordpress-utilities/speed-optimization/README.md", "args": [ { "name": "ssh-host", @@ -968,7 +958,6 @@ "requires": [ "gawk" ], - "doc": "trellis/monitoring/README.md", "args": [ { "name": "log_file", @@ -1022,7 +1011,6 @@ "requires": [ "ssh" ], - "doc": "trellis/monitoring/README.md", "args": [ { "name": "ssh-target", @@ -1179,7 +1167,6 @@ "python3", "geoip2fast" ], - "doc": "scripts/README.md", "args": [ { "name": "country-code", @@ -1269,7 +1256,6 @@ "requires": [ "gawk" ], - "doc": "trellis/monitoring/README.md", "args": [ { "name": "log_file", @@ -1316,7 +1302,6 @@ "curl", "bc" ], - "doc": "docs/wordpress-utilities/speed-optimization/README.md", "args": [ { "name": "url", @@ -1346,7 +1331,6 @@ "requires": [ "grep" ], - "doc": "trellis/monitoring/README.md", "args": [ { "name": "site_url", @@ -1384,7 +1368,6 @@ "requires": [ "magick" ], - "doc": "scripts/patterns/README.md", "args": [ { "name": "screenshots-dir", @@ -1430,7 +1413,6 @@ "requires": [ "node" ], - "doc": "scripts/patterns/README.md", "args": [ { "name": "input-file", @@ -1500,7 +1482,6 @@ "requires": [ "node" ], - "doc": "scripts/patterns/README.md", "args": [ { "name": "pattern-slug", @@ -1530,7 +1511,6 @@ "requires": [ "node" ], - "doc": "scripts/patterns/README.md", "args": [ { "name": "url", @@ -1609,7 +1589,6 @@ "requires": [ "magick" ], - "doc": "scripts/patterns/README.md", "args": [ { "name": "screenshots-dir", @@ -1647,7 +1626,6 @@ "requires": [ "rsync" ], - "doc": "docs/bedrock/local-package-development/README.md", "args": [ { "name": "kind", @@ -1733,7 +1711,6 @@ "requires": [ "ansible-playbook" ], - "doc": "trellis/backup/README.md", "args": [ { "name": "site", @@ -1775,7 +1752,6 @@ "requires": [ "ansible-playbook" ], - "doc": "trellis/backup/README.md", "args": [ { "name": "site", @@ -1816,7 +1792,6 @@ "requires": [ "ansible-playbook" ], - "doc": "trellis/backup/README.md", "args": [ { "name": "site", @@ -1857,7 +1832,6 @@ "requires": [ "ansible-playbook" ], - "doc": "trellis/backup/README.md", "args": [ { "name": "site", @@ -1899,7 +1873,6 @@ "requires": [ "ansible-playbook" ], - "doc": "trellis/backup/README.md", "args": [ { "name": "site", @@ -1951,7 +1924,6 @@ "requires": [ "ansible-playbook" ], - "doc": "trellis/backup/README.md", "args": [ { "name": "site", @@ -1992,7 +1964,6 @@ "requires": [ "ansible-playbook" ], - "doc": "trellis/monitoring/README.md", "args": [ { "name": "site", @@ -2045,7 +2016,6 @@ "requires": [ "ansible-playbook" ], - "doc": "trellis/monitoring/README.md", "args": [ { "name": "site", @@ -2114,7 +2084,6 @@ "requires": [ "ansible-playbook" ], - "doc": "trellis/monitoring/README.md", "args": [ { "name": "site", @@ -2175,7 +2144,6 @@ "requires": [ "ansible-playbook" ], - "doc": "trellis/monitoring/README.md", "args": [ { "name": "site", @@ -2238,7 +2206,6 @@ "jq", "trellis" ], - "doc": "trellis/security/README.md", "flags": [ { "name": "--full", @@ -2268,7 +2235,6 @@ "requires": [ "curl" ], - "doc": "trellis/security/README.md", "args": [ { "name": "ip", @@ -2298,7 +2264,6 @@ "requires": [ "git" ], - "doc": "trellis/updater/README.md", "flags": [ { "name": "--yes", @@ -2404,7 +2369,6 @@ "requires": [ "ssh" ], - "doc": "wp-cli/content-creation/PAGE-CREATION.md", "args": [ { "name": "content-file", @@ -2617,7 +2581,6 @@ "requires": [ "wp" ], - "doc": "docs/bedrock/wp-cli-config/README.md", "args": [ { "name": "path", @@ -2692,7 +2655,6 @@ "requires": [ "wp" ], - "doc": "docs/wordpress-utilities/snippets/admin-user-creation-wpcli.md", "args": [ { "name": "username", @@ -2772,7 +2734,6 @@ "requires": [ "ssh" ], - "doc": "wp-cli/security/README.md", "args": [ { "name": "site-name", @@ -2870,7 +2831,6 @@ "requires": [ "wp" ], - "doc": "wp-cli/security/README.md", "args": [ { "name": "path", @@ -2900,7 +2860,6 @@ "requires": [ "wp" ], - "doc": "wp-cli/security/README.md", "args": [ { "name": "path", @@ -2930,7 +2889,6 @@ "requires": [ "wp" ], - "doc": "wp-cli/security/README.md", "args": [ { "name": "path", @@ -2960,7 +2918,6 @@ "requires": [ "wp" ], - "doc": "wp-cli/seo/README.md", "flags": [ { "name": "--path", @@ -3006,7 +2963,6 @@ "requires": [ "wp" ], - "doc": "wp-cli/seo/README.md", "flags": [ { "name": "--host", @@ -3061,7 +3017,6 @@ "requires": [ "wp" ], - "doc": "wp-cli/seo/README.md", "flags": [ { "name": "--path", @@ -3108,7 +3063,6 @@ "requires": [ "wp" ], - "doc": "wp-cli/seo/README.md", "flags": [ { "name": "--path", @@ -3155,7 +3109,6 @@ "requires": [ "curl" ], - "doc": "wp-cli/seo/README.md", "flags": [ { "name": "--url", @@ -3201,7 +3154,6 @@ "curl", "perl" ], - "doc": "wp-cli/seo/README.md", "args": [ { "name": "site-url", diff --git a/go/internal/catalog/gen/main.go b/go/internal/catalog/gen/main.go index b230a47..9e2101a 100644 --- a/go/internal/catalog/gen/main.go +++ b/go/internal/catalog/gen/main.go @@ -154,7 +154,6 @@ func main() { Platform: cmd.Platform, Runs: cmd.Runs, Requires: cmd.Requires, - Doc: cmd.Doc, Args: cmd.Args, Flags: cmd.Flags, Examples: cmd.Examples, @@ -187,7 +186,7 @@ func main() { // regressions), but a script can validly have zero manifest directives // at all and fall back to the header scrape, and Lint() flags that // exact case as "missing @desc" too. Only real malformations - // (bad @runs, malformed @arg/@flag, a dangling @doc) should break the + // (bad @runs, malformed @arg/@flag) should break the // build. var hardErrors []string for _, e := range lintErrors { diff --git a/go/internal/exec/ansible_test.go b/go/internal/exec/ansible_test.go index 166e776..84d8eba 100644 --- a/go/internal/exec/ansible_test.go +++ b/go/internal/exec/ansible_test.go @@ -34,7 +34,6 @@ func TestFormatHelp_AnnotatedPlaybook(t *testing.T) { "env", "production|staging|development", "Requires: ansible-playbook", - "Docs: trellis/backup/README.md", "Script: trellis/backup/database-backup.yml", "Runs via ansible-playbook against the Trellis project at $TRELLIS_DIR", "(currently: /srv/trellis-project)", diff --git a/go/internal/exec/help.go b/go/internal/exec/help.go index 3b51e7b..3d168d8 100644 --- a/go/internal/exec/help.go +++ b/go/internal/exec/help.go @@ -137,10 +137,6 @@ func DetailBody(e catalog.Entry) string { // trellis-cli uses and the one `--help` output conventionally carries. writeParamBlock(&b, "Options:", e.Flags) - if e.Doc != "" { - fmt.Fprintf(&b, "Docs: %s\n", e.Doc) - } - return strings.TrimRight(b.String(), "\n") } @@ -206,9 +202,6 @@ func writeManifestHelpBody(b *strings.Builder, e catalog.Entry) { fmt.Fprintln(b) } - if e.Doc != "" { - fmt.Fprintf(b, "Docs: %s\n", e.Doc) - } fmt.Fprintf(b, "Script: %s\n", e.ScriptPath) } diff --git a/go/internal/manifest/manifest.go b/go/internal/manifest/manifest.go index a7a7ba0..127fd97 100644 --- a/go/internal/manifest/manifest.go +++ b/go/internal/manifest/manifest.go @@ -55,7 +55,6 @@ type Command struct { Args []Arg Flags []Flag Examples []string - Doc string // Mutates is the raw @mutates value ("true", "false", or "" when unset). // Kept as the raw string rather than a bool for the same reason Runs and // Platform are: "" has to stay distinguishable from an explicit value so @@ -111,7 +110,7 @@ var ( // docblock) is silently ignored, matching bash's case statement. var directivesHandled = map[string]bool{ "@desc": true, "@category": true, "@runs": true, "@requires": true, - "@doc": true, "@example": true, "@arg": true, "@flag": true, "@platform": true, + "@example": true, "@arg": true, "@flag": true, "@platform": true, "@mutates": true, "@deprecated": true, } @@ -228,10 +227,6 @@ func Parse(key, scriptPath string) (*Command, error) { if cmd.Requires == nil && value != "" { cmd.Requires = strings.Fields(value) } - case "@doc": - if cmd.Doc == "" { - cmd.Doc = value - } case "@example": cmd.Examples = append(cmd.Examples, value) case "@arg": @@ -252,8 +247,8 @@ func (c *Command) RequiresString() string { } // Lint validates one command's directives, mirroring -// lint_manifest_command(). repoRoot is used to resolve @doc paths. It -// returns one message per problem found (nil/empty when clean). +// lint_manifest_command(). repoRoot is kept for lint rules that resolve repo +// paths. It returns one message per problem found (nil/empty when clean). func Lint(cmd *Command, repoRoot string) []string { var errs []string @@ -310,11 +305,5 @@ func Lint(cmd *Command, repoRoot string) []string { } } - if cmd.Doc != "" { - if _, err := os.Stat(repoRoot + "/" + cmd.Doc); err != nil { - errs = append(errs, fmt.Sprintf("%s: @doc points at a missing file '%s'", cmd.Key, cmd.Doc)) - } - } - return errs } diff --git a/go/internal/manifest/manifest_test.go b/go/internal/manifest/manifest_test.go index 2e4cdf5..42d0917 100644 --- a/go/internal/manifest/manifest_test.go +++ b/go/internal/manifest/manifest_test.go @@ -26,9 +26,6 @@ func TestParse_ShellScriptWithChoiceArgs(t *testing.T) { if got, want := cmd.Requires, []string{"wp"}; !reflect.DeepEqual(got, want) { t.Errorf("Requires = %v, want %v", got, want) } - if got, want := cmd.Doc, "trellis/backup/README.md"; got != want { - t.Errorf("Doc = %q, want %q", got, want) - } if got, want := cmd.Examples, []string{"wp-ops scripts/backup/db-backup example.com production"}; !reflect.DeepEqual(got, want) { t.Errorf("Examples = %v, want %v", got, want) } @@ -139,9 +136,9 @@ func TestLint_MalformedCommandReportsEveryProblem(t *testing.T) { errs := Lint(cmd, "../../..") // missing @desc, bad @runs, malformed @arg (no requiredness token), bad - // @flag requiredness, missing @doc target — five independent problems. - if len(errs) != 5 { - t.Fatalf("Lint() = %v (%d errors), want 5", errs, len(errs)) + // @flag requiredness — four independent problems. + if len(errs) != 4 { + t.Fatalf("Lint() = %v (%d errors), want 4", errs, len(errs)) } } diff --git a/go/internal/manifest/testdata/database-backup.yml b/go/internal/manifest/testdata/database-backup.yml index 5c977de..2079816 100644 --- a/go/internal/manifest/testdata/database-backup.yml +++ b/go/internal/manifest/testdata/database-backup.yml @@ -8,7 +8,6 @@ # @arg site required {example.com} Site name as in wordpress_sites.yml # @arg env required {production|staging|development} Target environment # @example wp-ops trellis/backup/database-backup -e site=example.com -e env=production -# @doc trellis/backup/README.md - import_playbook: variable-check.yml vars: diff --git a/go/internal/manifest/testdata/db-backup.sh b/go/internal/manifest/testdata/db-backup.sh index 223b216..9ec34fa 100644 --- a/go/internal/manifest/testdata/db-backup.sh +++ b/go/internal/manifest/testdata/db-backup.sh @@ -24,6 +24,5 @@ # @arg site-name optional {example.com} Site directory under /srv/www # @arg backup-type optional {production|staging|development} Backup type # @example wp-ops scripts/backup/db-backup example.com production -# @doc trellis/backup/README.md set -e diff --git a/go/internal/manifest/testdata/malformed.sh b/go/internal/manifest/testdata/malformed.sh index d23c7c9..dcb3660 100644 --- a/go/internal/manifest/testdata/malformed.sh +++ b/go/internal/manifest/testdata/malformed.sh @@ -4,6 +4,5 @@ # @runs sometimes # @arg site # @flag --env maybe {production|staging} Target environment -# @doc docs/does-not-exist.md set -e diff --git a/go/internal/manifest/testdata/redirect-audit.sh b/go/internal/manifest/testdata/redirect-audit.sh index 609e55d..c1daa44 100644 --- a/go/internal/manifest/testdata/redirect-audit.sh +++ b/go/internal/manifest/testdata/redirect-audit.sh @@ -25,6 +25,5 @@ # @flag --verbose optional {} Show detailed curl output # @flag --output optional {results/audits} Output directory for reports # @example wp-ops wp-cli/seo/redirect-audit --url https://example.com --verbose -# @doc wp-cli/seo/README.md set -euo pipefail diff --git a/go/internal/manifest/testdata/scanner-wrapper.php b/go/internal/manifest/testdata/scanner-wrapper.php index b8c2b80..e55dc2f 100644 --- a/go/internal/manifest/testdata/scanner-wrapper.php +++ b/go/internal/manifest/testdata/scanner-wrapper.php @@ -18,5 +18,4 @@ * @requires wp * @arg path optional {/path/to/scan} Directory to scan (defaults to WordPress root) * @example wp-ops wp-cli/security/scanner-wrapper - * @doc wp-cli/security/README.md */ diff --git a/mcp-server/src/tools/catalog.ts b/mcp-server/src/tools/catalog.ts index cc3f8b6..7b3377e 100644 --- a/mcp-server/src/tools/catalog.ts +++ b/mcp-server/src/tools/catalog.ts @@ -179,7 +179,6 @@ export function formatEntryDetail(e: CatalogEntry): string { lines.push("examples:"); for (const ex of e.examples) lines.push(` ${ex}`); } - if (e.doc) lines.push("", `docs: ${e.doc}`); return lines.join("\n").replace(/\n{3,}/g, "\n\n"); } diff --git a/scripts/backup/db-backup.sh b/scripts/backup/db-backup.sh index 6ca1f8e..4aa9c7c 100755 --- a/scripts/backup/db-backup.sh +++ b/scripts/backup/db-backup.sh @@ -30,7 +30,6 @@ # @flag --host optional {example.com} SSH host to back up from (default: site-name) # @flag --dest optional {database_backup} Local destination directory # @example wp-ops db-backup example.com production -# @doc trellis/backup/README.md set -euo pipefail diff --git a/scripts/backup/db-pull.sh b/scripts/backup/db-pull.sh index 33439b7..78dc1d8 100755 --- a/scripts/backup/db-pull.sh +++ b/scripts/backup/db-pull.sh @@ -33,7 +33,6 @@ # @flag --yes optional {} Skip the confirmation prompt # @example wp-ops db-pull example.com production # @example wp-ops db-pull network.example.com production --multisite --yes -# @doc trellis/backup/README.md set -euo pipefail diff --git a/scripts/backup/site-backup.sh b/scripts/backup/site-backup.sh index 23ac739..4a4fd5d 100755 --- a/scripts/backup/site-backup.sh +++ b/scripts/backup/site-backup.sh @@ -21,7 +21,6 @@ # @requires wp # @arg site-name optional {example.com} Site directory under /srv/www # @example ssh web@example.com 'bash -s' < site-backup.sh example.com -# @doc trellis/backup/README.md set -euo pipefail diff --git a/scripts/backup/wp-db-backup.sh b/scripts/backup/wp-db-backup.sh index 4bf6fa8..32c63a8 100755 --- a/scripts/backup/wp-db-backup.sh +++ b/scripts/backup/wp-db-backup.sh @@ -45,7 +45,6 @@ # @flag --php-bin optional {/opt/plesk/php/8.2/bin/php} PHP binary to run --wp-bin with # @example wp-ops wp-db-backup --path ~/code/example # @example wp-ops wp-db-backup --host user@example.com --site-path /home/user/public_html -# @doc scripts/backup/README.md set -euo pipefail diff --git a/scripts/local-sandbox/updraft-to-valet.sh b/scripts/local-sandbox/updraft-to-valet.sh index 34c6a5e..cac376e 100755 --- a/scripts/local-sandbox/updraft-to-valet.sh +++ b/scripts/local-sandbox/updraft-to-valet.sh @@ -59,7 +59,6 @@ # @flag --password optional {password} Password to use with --reset-password (default: password) # @example wp-ops updraft-to-valet ~/Downloads/client-backup client --wp-version 6.7.1 # @example wp-ops updraft-to-valet ~/Downloads/client-backup client --wp-version 6.6.2 --secure --reset-password admin -# @doc scripts/README.md set -euo pipefail diff --git a/scripts/misc/find-and-replace-files.sh b/scripts/misc/find-and-replace-files.sh index f2d0ba6..9eab045 100755 --- a/scripts/misc/find-and-replace-files.sh +++ b/scripts/misc/find-and-replace-files.sh @@ -34,7 +34,6 @@ # @flag --list optional {} List found files without replacing # @flag --size optional {} Also show file sizes in listing # @example wp-ops find-and-replace-files -l -s create-pr.sh -# @doc scripts/misc/README-FIND-AND-REPLACE.md set -euo pipefail diff --git a/scripts/monitoring/ai-bot-monitor.sh b/scripts/monitoring/ai-bot-monitor.sh index e3262af..16411a5 100755 --- a/scripts/monitoring/ai-bot-monitor.sh +++ b/scripts/monitoring/ai-bot-monitor.sh @@ -21,7 +21,6 @@ # @arg output_file optional Path to save the report instead of printing it # @example ssh web@example.com 'bash -s' < ai-bot-monitor.sh # @example ssh web@example.com 'bash -s' < ai-bot-monitor.sh /srv/www/example.com/logs/access.log 168 -# @doc trellis/monitoring/README.md set -e diff --git a/scripts/monitoring/error-monitor.sh b/scripts/monitoring/error-monitor.sh index aab308d..d5accf3 100755 --- a/scripts/monitoring/error-monitor.sh +++ b/scripts/monitoring/error-monitor.sh @@ -32,7 +32,6 @@ # @arg output_file optional Path to save the report instead of printing it # @example ssh web@example.com 'bash -s' < error-monitor.sh # @example ssh root@example.com 'bash -s' < error-monitor.sh example.com 48 -# @doc trellis/monitoring/README.md set -uo pipefail diff --git a/scripts/monitoring/monitor.sh b/scripts/monitoring/monitor.sh index 40dc182..fa26d49 100755 --- a/scripts/monitoring/monitor.sh +++ b/scripts/monitoring/monitor.sh @@ -30,7 +30,6 @@ # @arg domain optional {example.com} Site domain # @example ssh web@example.com 'bash -s' < monitor.sh # @example ssh web@example.com 'bash -s' < monitor.sh 24 othersite.com -# @doc trellis/monitoring/README.md set -e diff --git a/scripts/monitoring/remote-ttfb-ua.sh b/scripts/monitoring/remote-ttfb-ua.sh index cc59139..9e05d15 100755 --- a/scripts/monitoring/remote-ttfb-ua.sh +++ b/scripts/monitoring/remote-ttfb-ua.sh @@ -23,7 +23,6 @@ # @arg ssh-host required {web@example.com} SSH user@host to run curl from # @arg url required {https://example.com} URL to test (repeatable) # @example wp-ops remote-ttfb-ua web@example.com https://example.com/ -# @doc docs/wordpress-utilities/speed-optimization/README.md set -euo pipefail diff --git a/scripts/monitoring/security-monitor.sh b/scripts/monitoring/security-monitor.sh index 0a24c98..f0cd9ed 100755 --- a/scripts/monitoring/security-monitor.sh +++ b/scripts/monitoring/security-monitor.sh @@ -22,7 +22,6 @@ # @arg output_file optional Path to save the report instead of printing it # @example ssh web@example.com 'bash -s' < security-monitor.sh # @example ssh web@example.com 'bash -s' < security-monitor.sh /srv/www/demo.example.com/logs/access.log 1 50 -# @doc trellis/monitoring/README.md set -e diff --git a/scripts/monitoring/server-monitor.sh b/scripts/monitoring/server-monitor.sh index 05490d2..c8ff2b7 100755 --- a/scripts/monitoring/server-monitor.sh +++ b/scripts/monitoring/server-monitor.sh @@ -19,7 +19,6 @@ # @arg ssh-target required {web@example.com} SSH target to connect to # @arg php-fpm-pool-pattern optional {php-fpm: pool} Pattern to match PHP-FPM pool processes # @example wp-ops server-monitor web@example.com -# @doc trellis/monitoring/README.md set -euo pipefail diff --git a/scripts/monitoring/traffic-by-country.sh b/scripts/monitoring/traffic-by-country.sh index 28ed52f..e9a1dbf 100755 --- a/scripts/monitoring/traffic-by-country.sh +++ b/scripts/monitoring/traffic-by-country.sh @@ -50,7 +50,6 @@ # @flag --show-bots optional Include bot traffic instead of filtering it out # @example wp-ops traffic-by-country --host web@example.com NL # @example wp-ops traffic-by-country -q --hours 24 --pattern "/contact/" US -# @doc scripts/README.md set -euo pipefail diff --git a/scripts/monitoring/traffic-monitor.sh b/scripts/monitoring/traffic-monitor.sh index 1383798..caa9aaa 100755 --- a/scripts/monitoring/traffic-monitor.sh +++ b/scripts/monitoring/traffic-monitor.sh @@ -21,7 +21,6 @@ # @arg output_file optional Path to save the report instead of printing it # @example ssh web@example.com 'bash -s' < traffic-monitor.sh # @example ssh web@example.com 'bash -s' < traffic-monitor.sh /srv/www/demo.example.com/logs/access.log 6 -# @doc trellis/monitoring/README.md set -e diff --git a/scripts/monitoring/ttfb-test.sh b/scripts/monitoring/ttfb-test.sh index 27b111b..8e0eaf4 100755 --- a/scripts/monitoring/ttfb-test.sh +++ b/scripts/monitoring/ttfb-test.sh @@ -21,7 +21,6 @@ # @requires curl bc # @arg url required {https://example.com} URL to test # @example wp-ops ttfb-test https://example.com -# @doc docs/wordpress-utilities/speed-optimization/README.md set -e diff --git a/scripts/monitoring/updown-webhook-handler.sh b/scripts/monitoring/updown-webhook-handler.sh index f3387e0..5dcb39d 100755 --- a/scripts/monitoring/updown-webhook-handler.sh +++ b/scripts/monitoring/updown-webhook-handler.sh @@ -24,7 +24,6 @@ # @arg site_url optional {example.com} Site domain (used to locate per-site logs) # @arg event_type optional {down} Event type from the updown.io webhook payload # @example ssh web@example.com 'bash -s' < updown-webhook-handler.sh example.com down -# @doc trellis/monitoring/README.md # set -e diff --git a/scripts/patterns/center-screenshots.sh b/scripts/patterns/center-screenshots.sh index 637405f..2427331 100755 --- a/scripts/patterns/center-screenshots.sh +++ b/scripts/patterns/center-screenshots.sh @@ -19,7 +19,6 @@ # @arg width optional {900} Target canvas width # @arg height optional {600} Target canvas height # @example wp-ops center-screenshots ./screenshots 900 600 -# @doc scripts/patterns/README.md set -euo pipefail diff --git a/scripts/patterns/png-to-webp.js b/scripts/patterns/png-to-webp.js index 9fa162c..8d73d25 100755 --- a/scripts/patterns/png-to-webp.js +++ b/scripts/patterns/png-to-webp.js @@ -34,7 +34,6 @@ * @flag --quality optional {85} WebP quality 1-100 * @flag --dry-run optional {} Show what would be done without writing files * @example wp-ops png-to-webp --all --dir=./screenshots --quality=90 - * @doc scripts/patterns/README.md */ const sharp = require('sharp'); diff --git a/scripts/patterns/screenshot-patterns.sh b/scripts/patterns/screenshot-patterns.sh index 381d965..d5336cd 100755 --- a/scripts/patterns/screenshot-patterns.sh +++ b/scripts/patterns/screenshot-patterns.sh @@ -36,7 +36,6 @@ # @requires node # @arg pattern-slug required {hero-dark} Pattern slug(s) to screenshot (repeatable) # @example PATTERN_NAMESPACE=mytheme SITE_URL=http://example.test wp-ops screenshot-patterns hero-dark -# @doc scripts/patterns/README.md set -euo pipefail diff --git a/scripts/patterns/screenshot-url.js b/scripts/patterns/screenshot-url.js index e351ab9..42c6a07 100755 --- a/scripts/patterns/screenshot-url.js +++ b/scripts/patterns/screenshot-url.js @@ -36,7 +36,6 @@ * @flag --selector optional {".entry-content > *:first-child"} Comma-separated CSS selectors, tried in order * @flag --full-page optional {} Skip selector matching and screenshot the entire page * @example wp-ops screenshot-url http://example.test/my-page/ --out=pattern.png - * @doc scripts/patterns/README.md */ const { chromium } = require('playwright'); diff --git a/scripts/patterns/trim-screenshots.sh b/scripts/patterns/trim-screenshots.sh index 7249314..320faa4 100755 --- a/scripts/patterns/trim-screenshots.sh +++ b/scripts/patterns/trim-screenshots.sh @@ -17,7 +17,6 @@ # @arg screenshots-dir required {./screenshots} Directory of pattern-*.webp screenshots # @arg width optional {900} Resize width after trimming # @example wp-ops trim-screenshots ./screenshots 900 -# @doc scripts/patterns/README.md set -euo pipefail diff --git a/scripts/sync/rsync-package-to-site.sh b/scripts/sync/rsync-package-to-site.sh index c45ea18..7075ada 100755 --- a/scripts/sync/rsync-package-to-site.sh +++ b/scripts/sync/rsync-package-to-site.sh @@ -47,7 +47,6 @@ # @arg source-dir optional {.} Package working tree (default: current directory) # @flag --dry-run optional {} Preview the sync without writing anything # @example wp-ops rsync-package-to-site theme my-theme -# @doc docs/bedrock/local-package-development/README.md set -euo pipefail usage() { diff --git a/trellis/backup/database-backup.yml b/trellis/backup/database-backup.yml index 340b7ab..b2d0dad 100644 --- a/trellis/backup/database-backup.yml +++ b/trellis/backup/database-backup.yml @@ -9,7 +9,6 @@ # @arg site required {example.com} Site name as in wordpress_sites.yml # @arg env required {production|staging|development} Target environment # @example wp-ops database-backup example.com production -# @doc trellis/backup/README.md - import_playbook: variable-check.yml vars: playbook: database-backup.yml diff --git a/trellis/backup/database-pull.yml b/trellis/backup/database-pull.yml index 7dee87d..5f2097e 100644 --- a/trellis/backup/database-pull.yml +++ b/trellis/backup/database-pull.yml @@ -9,7 +9,6 @@ # @arg site required {example.com} Site name as in wordpress_sites.yml # @arg env required {production|staging} Remote environment to pull from # @example wp-ops database-pull example.com production -# @doc trellis/backup/README.md - import_playbook: variable-check.yml vars: playbook: database-pull.yml diff --git a/trellis/backup/database-push.yml b/trellis/backup/database-push.yml index 7b559bb..f070303 100644 --- a/trellis/backup/database-push.yml +++ b/trellis/backup/database-push.yml @@ -9,7 +9,6 @@ # @arg site required {example.com} Site name as in wordpress_sites.yml # @arg env required {production|staging} Remote environment to push to # @example wp-ops database-push example.com staging -# @doc trellis/backup/README.md - import_playbook: variable-check.yml vars: playbook: database-push.yml diff --git a/trellis/backup/files-backup.yml b/trellis/backup/files-backup.yml index f774775..9e3597d 100644 --- a/trellis/backup/files-backup.yml +++ b/trellis/backup/files-backup.yml @@ -9,7 +9,6 @@ # @arg site required {example.com} Site name as in wordpress_sites.yml # @arg env required {production|staging|development} Target environment # @example wp-ops files-backup example.com production -# @doc trellis/backup/README.md - import_playbook: variable-check.yml vars: playbook: files-backup.yml diff --git a/trellis/backup/files-pull.yml b/trellis/backup/files-pull.yml index a0a5b95..1e0e721 100644 --- a/trellis/backup/files-pull.yml +++ b/trellis/backup/files-pull.yml @@ -11,7 +11,6 @@ # @flag delete optional {no} yes = mirror the remote exactly, deleting local uploads the remote no longer has # @example wp-ops files-pull example.com production # @example wp-ops files-pull example.com production --delete yes -# @doc trellis/backup/README.md - import_playbook: variable-check.yml vars: playbook: files-pull.yml diff --git a/trellis/backup/files-push.yml b/trellis/backup/files-push.yml index 38f8b41..6f3f877 100644 --- a/trellis/backup/files-push.yml +++ b/trellis/backup/files-push.yml @@ -9,7 +9,6 @@ # @arg site required {example.com} Site name as in wordpress_sites.yml # @arg env required {production|staging} Remote environment to push to # @example wp-ops files-push example.com staging -# @doc trellis/backup/README.md - import_playbook: variable-check.yml vars: playbook: files-push.yml diff --git a/trellis/monitoring/quick-status.yml b/trellis/monitoring/quick-status.yml index 5f6ae5b..cddb009 100644 --- a/trellis/monitoring/quick-status.yml +++ b/trellis/monitoring/quick-status.yml @@ -12,7 +12,6 @@ # @flag log_path optional {/path/to/access.log} Override the default per-site access log path # @example wp-ops quick-status example.com production # @example wp-ops quick-status example.com production --log_path /var/log/custom.log -# @doc trellis/monitoring/README.md - import_playbook: variable-check.yml vars: playbook: quick-status.yml diff --git a/trellis/monitoring/security-scan.yml b/trellis/monitoring/security-scan.yml index 51cfaa3..1adb62c 100644 --- a/trellis/monitoring/security-scan.yml +++ b/trellis/monitoring/security-scan.yml @@ -14,7 +14,6 @@ # @flag log_path optional {/path/to/access.log} Override the default per-site access log path # @example wp-ops security-scan example.com production # @example wp-ops security-scan example.com production --hours 48 --threshold 50 -# @doc trellis/monitoring/README.md - import_playbook: variable-check.yml vars: playbook: security-scan.yml diff --git a/trellis/monitoring/setup-monitoring.yml b/trellis/monitoring/setup-monitoring.yml index b66e6f6..b43c448 100644 --- a/trellis/monitoring/setup-monitoring.yml +++ b/trellis/monitoring/setup-monitoring.yml @@ -12,7 +12,6 @@ # @flag log_path optional {/path/to/access.log} Override the default per-site access log path # @example wp-ops setup-monitoring example.com production # @example wp-ops setup-monitoring example.com production --email alerts@example.com -# @doc trellis/monitoring/README.md - import_playbook: variable-check.yml vars: playbook: setup-monitoring.yml diff --git a/trellis/monitoring/traffic-report.yml b/trellis/monitoring/traffic-report.yml index 0f58dd7..6ce161a 100644 --- a/trellis/monitoring/traffic-report.yml +++ b/trellis/monitoring/traffic-report.yml @@ -13,7 +13,6 @@ # @flag log_path optional {/path/to/access.log} Override the default per-site access log path # @example wp-ops traffic-report example.com production # @example wp-ops traffic-report example.com production --hours 48 -# @doc trellis/monitoring/README.md - import_playbook: variable-check.yml vars: playbook: traffic-report.yml diff --git a/trellis/security/check-deny-ips.sh b/trellis/security/check-deny-ips.sh index 1ba2d25..69b8913 100755 --- a/trellis/security/check-deny-ips.sh +++ b/trellis/security/check-deny-ips.sh @@ -24,7 +24,6 @@ # @flag --full optional {} Full JSON output per IP via check-ips.sh, instead of the compact summary # @example wp-ops check-deny-ips # @example wp-ops check-deny-ips --full -# @doc trellis/security/README.md set -euo pipefail diff --git a/trellis/security/check-ips.sh b/trellis/security/check-ips.sh index 26c4b17..1d5d5a1 100755 --- a/trellis/security/check-ips.sh +++ b/trellis/security/check-ips.sh @@ -18,7 +18,6 @@ # @requires curl # @arg ip required {1.2.3.4} IP address to check (repeatable) # @example wp-ops check-ips 1.2.3.4 5.6.7.8 -# @doc trellis/security/README.md set -euo pipefail diff --git a/trellis/updater/trellis-updater.sh b/trellis/updater/trellis-updater.sh index b53ea86..f4aa184 100755 --- a/trellis/updater/trellis-updater.sh +++ b/trellis/updater/trellis-updater.sh @@ -28,7 +28,6 @@ # @flag --yes optional {} Skip the confirmation prompt before overwriting trellis/ # @example TRELLIS_DIR=~/code/example.com/trellis wp-ops trellis-updater # @example wp-ops trellis-updater --yes -# @doc trellis/updater/README.md set -e # Exit on error diff --git a/wp-cli/content-creation/page-creation.sh b/wp-cli/content-creation/page-creation.sh index a51208c..bcb4bd8 100755 --- a/wp-cli/content-creation/page-creation.sh +++ b/wp-cli/content-creation/page-creation.sh @@ -22,7 +22,6 @@ # @arg page-title required {About} Page title # @arg page-slug required {about} Page slug/post name # @example wp-ops page-creation about-page-content.html "About" about -# @doc wp-cli/content-creation/PAGE-CREATION.md set -e # Exit on error diff --git a/wp-cli/content-creation/wp-cli-pattern-validate.php b/wp-cli/content-creation/wp-cli-pattern-validate.php index 4fcb29e..559e44c 100644 --- a/wp-cli/content-creation/wp-cli-pattern-validate.php +++ b/wp-cli/content-creation/wp-cli-pattern-validate.php @@ -48,7 +48,6 @@ * @flag --compliance optional {} Also run project-specific compliance checks * @flag --compliance-only optional {} Skip Gutenberg validation, only run compliance checks * @example wp-ops wp-cli-pattern-validate web/app/themes/theme-name/patterns/ --fix - * @doc docs/bedrock/wp-cli-config/README.md */ if ( ! defined( 'WP_CLI' ) || ! WP_CLI ) { diff --git a/wp-cli/security/admin-user-create.sh b/wp-cli/security/admin-user-create.sh index fd9cac3..600e321 100755 --- a/wp-cli/security/admin-user-create.sh +++ b/wp-cli/security/admin-user-create.sh @@ -40,7 +40,6 @@ # @flag --site-path optional {/var/www/example.com} Site root on the server, required with --host # @example wp-ops admin-user-create temp_admin temp@example.com # @example wp-ops admin-user-create --path web/wp recovery recovery@example.com -# @doc docs/wordpress-utilities/snippets/admin-user-creation-wpcli.md set -euo pipefail diff --git a/wp-cli/security/malware-scan.sh b/wp-cli/security/malware-scan.sh index fdca30d..8a7c307 100755 --- a/wp-cli/security/malware-scan.sh +++ b/wp-cli/security/malware-scan.sh @@ -74,7 +74,6 @@ # @example wp-ops malware-scan example.com production # @example wp-ops malware-scan example.com production --mode both # @example wp-ops malware-scan example.com production --host deploy@example.com --path /home/deploy/public_html -# @doc wp-cli/security/README.md set -euo pipefail diff --git a/wp-cli/security/scanner-general.php b/wp-cli/security/scanner-general.php index e466c56..73fe884 100644 --- a/wp-cli/security/scanner-general.php +++ b/wp-cli/security/scanner-general.php @@ -41,7 +41,6 @@ * @requires wp * @arg path optional {/path/to/scan} Directory to scan (defaults to WordPress root) * @example wp-ops scanner-general - * @doc wp-cli/security/README.md */ // ============================================================================ diff --git a/wp-cli/security/scanner-targeted.php b/wp-cli/security/scanner-targeted.php index 05c6df2..de84a0f 100644 --- a/wp-cli/security/scanner-targeted.php +++ b/wp-cli/security/scanner-targeted.php @@ -35,7 +35,6 @@ * @requires wp * @arg path optional {/path/to/scan} Directory to scan (defaults to WordPress root) * @example wp-ops scanner-targeted - * @doc wp-cli/security/README.md */ // ============================================================================ diff --git a/wp-cli/security/scanner-wrapper.php b/wp-cli/security/scanner-wrapper.php index f04bbd9..0ac8c24 100644 --- a/wp-cli/security/scanner-wrapper.php +++ b/wp-cli/security/scanner-wrapper.php @@ -20,7 +20,6 @@ * @requires wp * @arg path optional {/path/to/scan} Directory to scan (defaults to WordPress root) * @example wp-ops scanner-wrapper - * @doc wp-cli/security/README.md */ // ============================================================================ diff --git a/wp-cli/seo/blog-audit.sh b/wp-cli/seo/blog-audit.sh index 6bce114..bb4e5c7 100755 --- a/wp-cli/seo/blog-audit.sh +++ b/wp-cli/seo/blog-audit.sh @@ -24,7 +24,6 @@ # @flag --output optional {audits} Output directory # @flag --site-url optional {https://example.com} Site URL for reports # @example wp-ops blog-audit --path web/wp --output reports/seo -# @doc wp-cli/seo/README.md set -euo pipefail diff --git a/wp-cli/seo/orphan-links-audit.sh b/wp-cli/seo/orphan-links-audit.sh index 8882b8c..9ae0b5c 100755 --- a/wp-cli/seo/orphan-links-audit.sh +++ b/wp-cli/seo/orphan-links-audit.sh @@ -41,7 +41,6 @@ # @flag --output optional {audits} Output directory # @example wp-ops orphan-links-audit --host web@example.com # @example wp-ops orphan-links-audit --path web/wp --output reports/seo -# @doc wp-cli/seo/README.md set -euo pipefail diff --git a/wp-cli/seo/orphan-pages-audit.sh b/wp-cli/seo/orphan-pages-audit.sh index ba479b3..00a9dea 100755 --- a/wp-cli/seo/orphan-pages-audit.sh +++ b/wp-cli/seo/orphan-pages-audit.sh @@ -25,7 +25,6 @@ # @flag --output optional {audits} Output directory # @flag --site-url optional {https://example.com} Site URL for reports # @example wp-ops orphan-pages-audit --path web/wp --output reports/seo -# @doc wp-cli/seo/README.md set -euo pipefail diff --git a/wp-cli/seo/page-audit.sh b/wp-cli/seo/page-audit.sh index c2c42c4..516aa14 100755 --- a/wp-cli/seo/page-audit.sh +++ b/wp-cli/seo/page-audit.sh @@ -25,7 +25,6 @@ # @flag --output optional {audits} Output directory # @flag --site-url optional {https://example.com} Site URL for reports # @example wp-ops page-audit --path web/wp --output reports/seo -# @doc wp-cli/seo/README.md set -euo pipefail diff --git a/wp-cli/seo/redirect-audit.sh b/wp-cli/seo/redirect-audit.sh index 2e795d3..27a9dd2 100755 --- a/wp-cli/seo/redirect-audit.sh +++ b/wp-cli/seo/redirect-audit.sh @@ -26,7 +26,6 @@ # @flag --verbose optional {} Show detailed curl output # @flag --output optional {results/audits} Output directory for reports # @example wp-ops redirect-audit --url https://example.com --verbose -# @doc wp-cli/seo/README.md set -euo pipefail diff --git a/wp-cli/seo/schema-audit.sh b/wp-cli/seo/schema-audit.sh index ad8c4fa..8826381 100755 --- a/wp-cli/seo/schema-audit.sh +++ b/wp-cli/seo/schema-audit.sh @@ -31,7 +31,6 @@ # @flag --pages optional {/,/about/,/contact/} Comma-separated page paths or URLs (default: sitemap pages) # @flag --max-pages optional {25} Maximum number of sitemap pages to check # @example wp-ops schema-audit https://example.com --pages /,/services/,/contact/ -# @doc wp-cli/seo/README.md set -euo pipefail