docs-v2/data
Jason Stirnaman e8a48e3482
chore(docs): Redesign docs CLI tools for creating and editing content, add content/create.md tutorial page for the How to creat… (#6506)
* chore(docs): Add content/create.md tutorial page for the How to create your own documentation tutorial

chore(scripts): docs:create and docs:edit scripts for content creation and editing

Major improvements to docs:create UX for both Claude Code and external tool integration:

**New `docs` CLI command:**
- Add scripts/docs-cli.js - main CLI with subcommand routing
- Add bin field to package.json for `docs` command
- Usage: `docs create` and `docs edit` (cleaner than yarn commands)

**Smart piping detection:**
- Auto-detect when stdout is piped (\!process.stdout.isTTY)
- When piping: automatically output prompt text (no flag needed)
- When interactive: output prompt file path
- --print-prompt flag now optional (auto-enabled when piping)

**Specify products:**
- simplify link following behavior - treat relative paths as local files, all HTTP/HTTPS as external
- stdin now requires --products flag with product keys
- --products now accepts keys from products.yml (influxdb3_core, telegraf, etc.)

Examples:
  --products influxdb3_core
  --products influxdb3_core,influxdb3_enterprise
  --products telegraf

**Usage examples:**
  # Inside Claude Code - automatic execution
  docs create drafts/new-feature.md

  # Pipe to external AI - prompt auto-detected
  docs create FILE --products X | claude -p
  docs create FILE --products X | copilot -p

  # Pipe from stdin
  echo 'content' | docs create --products X | claude -p

Benefits:
- Cleaner syntax (no yarn --silent needed)
- No manual --print-prompt flag when piping
- Consistent with industry tools (git, npm, etc.)
- Backward compatible with yarn commands

WIP: docs:create usage examples

- Redesign of the docs CLI tools for creating and editing content
- Cleaner interface works better for piping output to agents and downstream utilities
- Updates README.md and other authoring docs

This repository includes a `docs` CLI tool for common documentation workflows:

```sh
npx docs create drafts/new-feature.md --products influxdb3_core

npx docs edit https://docs.influxdata.com/influxdb3/core/admin/

npx docs placeholders content/influxdb3/core/admin/upgrade.md

npx docs --help
```

**Run test cases:**

```sh
npx docs test
```

* Update content/create.md

* Update content/create.md

* Update content/create.md

* Update content/create.md

* Update scripts/templates/chatgpt-prompt.md

* Update DOCS-SHORTCODES.md
2025-11-03 10:18:15 -06:00
..
clockface.yml Enhance Flux functions lists (#5221) 2023-11-07 13:56:49 -07:00
flux_influxdb_minor_versions.yml Update Flux/InfluxDB version modal (#5668) 2024-11-12 08:20:54 -07:00
flux_influxdb_versions.yml Update Flux/InfluxDB version modal (#5668) 2024-11-12 08:20:54 -07:00
flux_stdlib_frontmatter.yml Update shared content usage in v2 docs and more (#5953) 2025-04-02 15:54:32 -06:00
influxd_flags.yml feat(oss2): Add influxd_flags entry for option 2025-05-15 16:05:43 -05:00
influxdb_urls.yml Merge pull request #6079 from influxdata/chore-js-refactor-footer-scripts-modules 2025-06-09 14:40:37 -05:00
list_filters.yml Adapt keywords to the ones used in Telegraf plugins 2025-06-18 22:36:29 +02:00
notifications.yaml chore: update notifications for InfluxDB 3.6 release (#6498) 2025-10-30 11:04:04 -04:00
products.yml chore(docs): Redesign docs CLI tools for creating and editing content, add content/create.md tutorial page for the How to creat… (#6506) 2025-11-03 10:18:15 -06:00
query_examples.yml fix: moving_average code example (#4862) 2023-05-09 09:20:24 -05:00
telegraf_plugins.yml Telegraf v1.36.2 (#6430) 2025-09-30 09:13:25 -05:00