Commit graph

26 commits

Author SHA1 Message Date
John Kerl
54237c04d6
More AI skill/MCP docs (#2140)
* Iterating on AI/MCP docs

* docs iterate

* mlr skill

* docs iterate

* agent-skill.md.in

* docs iterate

* docs iterate

* edits

* codex/gemini info
2026-07-04 14:45:29 -04:00
John Kerl
a9de5824ba
docs: add "Miller and AI" page (#2098) (#2134)
* docs: add "Miller and AI agents" quick-start page (#2098)

Umbrella page for the AI-friendly feature stack: one-line MCP setup as
the fast path, plus the plain-CLI path (which, help --as-json,
describe, --explain, --errors-json, --no-shell) with live CI-tested
examples, and the discover -> constrain -> validate -> run loop.
Cross-linked with the MCP server page; listed under Getting started.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* docs: reframe AI page as "Miller and AI" (#2098)

Rename ai-agents.md to ai.md and restructure around the pre-MCP
feature stack, organized as the loop each feature serves: Discover
(catalog/index/which, cache keys, single-sourced usage text),
Constrain (enum value-sets + describe: tool shape vs data shape),
Validate (--explain), Run and recover (--errors-json, --no-shell,
env-var trio). MCP is now one closing section pointing at the
mcp-server.md detail page. All examples are live and CI-tested,
including Miller querying its own catalog.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* docs: retitle MCP page to "The MCP server" under the Miller-and-AI umbrella

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* docs: add bare-minimum getting-started section to Miller-and-AI page

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* docs: AI features land in Miller 6.20

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* docs: hyperlink SKILL.md references to the repo

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* docs: rename section to 'The essentials'

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-07-03 20:31:20 -04:00
John Kerl
41f5188bd0
Add mlr mcp MCP server + agent playbook, with a --no-shell gate (#2098 PR7) (#2133)
* Plan: flesh out PR7 (MCP server + Agent Skill) design

stdio transport (no HTTP port), mlr mcp terminal in the main binary,
SDK-vs-handroll decision, tool list, in-process vs subprocess split,
run-tool safety (--no-shell prerequisite), single-sourced skill, tests.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* Add mlr mcp: MCP server + agent playbook; --no-shell gate (#2098 PR7)

New terminal `mlr mcp` runs a Model Context Protocol server over stdio
(spawned by MCP clients; no network port), exposing five tools --
list_capabilities, which, validate_dsl, describe_data, run -- plus an
agent playbook as MCP prompt/resource. Catalog tools are served
in-process from the help registries; the rest subprocess this same
binary with MLR_ERRORS_JSON=1, a timeout, and an output cap.

Prerequisite: a new --no-shell flag / MLR_NO_SHELL env var (one-way
gate) disables the DSL system/exec functions, piped redirects, and
--prepipe/--prepipex; the MCP server sets it on the commands it runs
unless started with --allow-shell.

Adds the github.com/modelcontextprotocol/go-sdk dependency.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* Force LF checkout for the embedded SKILL.md (Windows CI fix)

go:embed embeds checkout bytes, so a CRLF checkout on Windows made the
embedded playbook differ per platform and failed
TestPlaybookHasFrontmatter. Pin the file to eol=lf in .gitattributes.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* Move no-shell test DSL into per-case mlr files (Windows CI fix)

Inline single-quoted DSL in cmd files is mangled by the Windows shell
(single quotes are not quote characters there); the harness's
put -f ${CASEDIR}/mlr pattern avoids shell quoting entirely.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-07-03 19:41:49 -04:00
John Kerl
f4d365bbde
Page-refactor for CSV/JSON troubleshooting (#2128)
* new troubleshooting-csv-and-json-input.md.in page

* ../README-docs.md

* ../README-docs.md
2026-07-03 10:19:09 -04:00
John Kerl
299636038c
Shell tab-completion for bash and zsh (#2096)
* initial attempt

* fix bash

* fix zsh

* Add shell-completion docs page

Documents the new 'mlr completion {bash,zsh}' feature: the then-chain
context model, install instructions for bash and zsh (including the macOS
bash-3.2 'eval' caveat and zsh compinit self-init), and examples of
context-aware completion. Added to the nav under "Miller in more detail".

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* Add enum value completion for format and separator flags

Completes the argument value for arg-taking main flags whose values are a
known set: file-format names for -i/-o/--io, separator aliases for
--ifs/--ofs/--ips/etc., and regex-separator aliases for --ifs-regex/--ips-regex.
Other arg-taking flags continue to fall back to filename completion.

Candidate sets come from new cli getters (GetFileFormatNames,
GetSeparatorAliasNames, GetSeparatorRegexAliasNames) that read the same maps
Miller uses at runtime, so there is no separate list to keep in sync. The
command-line walk now records which flag a value position belongs to.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* Include format-conversion keystroke-savers in bare-dash completion

Reverts the suppression of --c2j/--x2y-style flags from 'mlr -<TAB>'. The full
set of main flags (297) is now offered, matching what is valid on the command
line. GetFlagNames no longer takes an includeSuppressed argument.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* Complete terminal subcommands and top-level help/version flags

'mlr <TAB>' now offers subcommand names (help, version, repl, regtest, script,
completion, terminal-list) alongside verb names, and 'mlr -<TAB>' offers the
top-level terminal flags (-h, --help, --version, --bare-version, and the help
shorthands -g/-l/-L/-f/-F/-k/-K). Subcommand names are offered only as the
first non-flag token, where they are valid.

To let the completion engine know these names without an import cycle
(pkg/terminals imports pkg/terminals/completion), the canonical terminal names
and version-flag spellings are factored into a new leaf package
pkg/terminals/registry, imported by pkg/terminals, pkg/climain, and completion.
The help-flag spellings come from a new help.GetTerminalFlagNames derived from
the existing shorthand table, so nothing drifts.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* Complete 'mlr help' topics and topic arguments

'mlr help <TAB>' now completes help topics (flags, verb, function, keyword,
list-verbs, ...), and topics that take a name argument complete it too:
'mlr help verb <TAB>' -> verb names, 'mlr help function <TAB>' -> function
names, 'mlr help keyword <TAB>' -> keyword names, 'mlr help flag <TAB>' ->
flag names. 'mlr completion <TAB>' completes bash/zsh.

A terminal subcommand consumes the rest of the command line, so the walk now
returns a ctxTerminalArgs context carrying the terminal name and the words
typed after it. New getters supply the candidate names without drift:
help.GetTopicNames, help.GetFunctionNames/GetKeywordNames (wrapping new
cst.BuiltinFunctionManager.GetBuiltinFunctionNames and cst.GetKeywordNames).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* docs-neaten

* Move flag-value-candidate logic into pkg/cli; fix verb-flag collision

The mapping of which flags take a format/separator/regex-separator argument is
flag metadata, so it now lives with the flags in pkg/cli as
cli.FlagValueCandidates, alongside the existing GetFileFormatNames /
GetSeparatorAliasNames getters, replacing the maps that were in
pkg/terminals/completion/value_completion.go (now removed).

This also fixes a bug: value completion now applies only to main flags, not to
identically-spelled verb flags. Previously 'mlr uniq -o <TAB>' offered file
formats because uniq's -o (an output field name) collided with the main -o
format flag; it now correctly falls back to filename completion.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-21 12:47:54 -04:00
Andrea Borruso
1fe2645989
Enable admonition extension (#1636)
In PR #1634 I have added an admonition note.
I assumed that the admonition extension was enabled, but it was not. I apologize John.

I have now enabled it as per the documentation:
https://squidfunk.github.io/mkdocs-material/reference/admonitions/?h=ad#admonitions
2024-08-27 12:02:27 -04:00
Andrea Borruso
d247fab73d
To have edit and copy code in each page (#1632) 2024-08-26 09:20:08 -04:00
John Kerl
268a96d002
Export library code in pkg/ (#1391)
* Export library code in `pkg/`

* new doc page
2023-09-10 17:15:13 -04:00
John Kerl
748a908b7a Label head docs as "Miller Dev Documentation" 2023-03-06 09:54:28 -05:00
John Kerl
36f3c3cb0f Clarify locations of performance info 2022-11-26 18:32:16 -05:00
John Kerl
318019996f
helm/kubectl examples (#1005) 2022-03-29 00:31:49 -04:00
John Kerl
3903e8059e Freshen notes on how to create a release 2022-03-07 23:38:13 -05:00
John Kerl
1eae19421b
New doc page: Parsing and formatting fields (#973) 2022-03-06 23:28:16 -05:00
Andrea Borruso
b8aa0793db
Add on mouse over permalink anchor for titles (#942)
This option adds an anchor link containing the paragraph symbol ¶ or another custom symbol at the end of each headline, exactly like on the page you're currently viewing. (the [doc](https://squidfunk.github.io/mkdocs-material/setup/extensions/python-markdown/?h=toc_depth#table-of-contents)).

I find it very convenient for sharing URLs, especially in very long pages.

![](https://i.imgur.com/T4nTTrD.png)
2022-02-11 09:22:34 -05:00
John Kerl
01859bdaa5 Correctly label latest docs as such 2022-01-27 09:26:36 -05:00
John Kerl
28cb345072 Expose new-in-miller-6 page a bit more on lefthand navstrip 2022-01-07 23:57:32 -05:00
John Kerl
4f57e802fe another missing file for previous doc commit 2021-12-25 14:20:08 -05:00
Andrea Borruso
08cf55f9d5
Updated the edit PATH (#775) 2021-12-12 23:01:44 -05:00
Andrea Borruso
8ca1d56f7c
To enable 404 'age (#757) 2021-11-22 22:37:47 -05:00
John Kerl
feec887738 rename docs title from Miller 6 to Miller 6.0.0 2021-11-10 13:27:25 -05:00
John Kerl
91def6906f More Miller 6 release prep 2021-11-06 12:57:24 -04:00
Andrea Borruso
18dda9e01e
to have back to top botton (#733)
It's very useful for long pages
2021-11-05 11:28:23 -04:00
John Kerl
3105beb742 Fix some doc links 2021-11-05 11:14:14 -04:00
John Kerl
847b422b6b merge 2021-11-04 18:10:55 -04:00
John Kerl
970fc43b81 Merge branch 'patch-2' of github.com:aborruso/miller into aborruso-patch-2 2021-11-04 18:09:56 -04:00
John Kerl
7578b789f6
Remove Miller-5 source/doc/manpage directories, along with C-build files (#731) 2021-11-04 00:45:44 -04:00
Renamed from docs6/mkdocs.yml (Browse further)