generated from coulomb/repo-seed
109 lines
2.7 KiB
Markdown
109 lines
2.7 KiB
Markdown
# Command Cheatsheet
|
|
|
|
Use `mkt --help` and `mkt <command> --help` for the live command surface. This
|
|
cheatsheet is organized by intent.
|
|
|
|
## Inspect Markdown
|
|
|
|
```bash
|
|
mkt parse file.md --format json
|
|
mkt parse file.md --format tree
|
|
mkt ast show file.md --format yaml
|
|
mkt ast stats file.md
|
|
mkt metrics file.md
|
|
```
|
|
|
|
## Validate Structure
|
|
|
|
```bash
|
|
mkt validate file.md --schema schema.md
|
|
mkt schema validate schema.md
|
|
mkt contract validate contract.md
|
|
mkt contract check file.md --contract contract.md
|
|
mkt contract form-state file.md --contract contract.md --context context.yaml
|
|
```
|
|
|
|
## Query And Extract
|
|
|
|
```bash
|
|
mkt query file.md 'sections[heading=Decision]'
|
|
mkt extract file.md 'sections[heading=Decision]' --format text
|
|
mkt query file.md '$.sections[*].heading.text' --engine jsonpath
|
|
```
|
|
|
|
## Transform And Reuse
|
|
|
|
```bash
|
|
mkt transform file.md --set status=ready
|
|
mkt compose one.md two.md --title Combined
|
|
mkt include file.md --base-dir .
|
|
mkt ref resolve context.md 'std:clauses.md#payment-terms' --root examples/references
|
|
mkt process file.md --root .
|
|
```
|
|
|
|
## Split And Literate Workflows
|
|
|
|
```bash
|
|
mkt explode file.md --output-dir parts
|
|
mkt implode parts --output rebuilt.md
|
|
mkt tangle examples/literate/app.md --output-dir build
|
|
mkt weave examples/literate/app.md --output woven.md
|
|
```
|
|
|
|
## Generate Markdown
|
|
|
|
```bash
|
|
mkt template inspect template.md
|
|
mkt template render template.md --data data.yaml
|
|
mkt generate stub --contract contract.md --include-optional
|
|
mkt generate rules generation.md --output-dir out
|
|
mkt function list
|
|
mkt function check file.md
|
|
mkt function render file.md
|
|
```
|
|
|
|
## Index, Search, And Refresh
|
|
|
|
```bash
|
|
mkt cache init --root .
|
|
mkt cache build docs --root .
|
|
mkt cache status docs --root .
|
|
mkt cache index docs --root .
|
|
mkt cache query 'sections[heading=Decision]' --root .
|
|
mkt search latency --root . --limit 10
|
|
mkt backend refresh-plan docs --root .
|
|
```
|
|
|
|
## Policy-Aware Access
|
|
|
|
```bash
|
|
mkt policy check public-agent read object-id --policy policy.yaml
|
|
mkt policy subject claims.yaml --policy-map policy-map.yaml
|
|
mkt policy resource-manifest manifest.yaml
|
|
mkt search internal --root . --policy policy.yaml --subject internal-agent
|
|
```
|
|
|
|
## Workflows And Context Packages
|
|
|
|
```bash
|
|
mkt workflow inspect workflow.md
|
|
mkt workflow plan workflow.md --output-dir out
|
|
mkt workflow run workflow.md --output-dir out
|
|
mkt context pack query --source file.md --max-items 5
|
|
mkt context activate package-id
|
|
mkt context explain package-id
|
|
mkt context refresh package-id
|
|
mkt context list
|
|
```
|
|
|
|
## Discovery And Docs
|
|
|
|
```bash
|
|
mkt completion bash --instructions
|
|
mkt extension list
|
|
mkt extension inspect backend.local-sqlite
|
|
mkt extension commands
|
|
mkt docs cli --output docs/cli-reference.md
|
|
mkt docs api --output docs/api-reference.md
|
|
```
|