docs-v2/content
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
..
chronograf/v1
enterprise_influxdb/v1 chore(enterprise_influxdb): specify Enterprise v1 and remove new sign… (#6485) 2025-10-24 12:52:47 -05:00
flux/v0
influxdb Jts/obsolete monitor enterprise with cloud (#6453) 2025-10-10 22:17:09 -05:00
influxdb3 feat: functional changes (#6500) 2025-10-30 09:52:25 -05:00
kapacitor/v1 Release Kapacitor v1.8.2 2025-09-29 14:24:11 +02:00
platform chore(enterprise_influxdb): specify Enterprise v1 and remove new sign… (#6485) 2025-10-24 12:52:47 -05:00
resources
shared feat: functional changes (#6500) 2025-10-30 09:52:25 -05:00
telegraf/v1 Telegraf v1.36.3 (#6473) 2025-10-21 12:23:21 -05:00
.remarkrc.yaml Jts contrib and linting fixes (#6494) 2025-10-27 20:24:25 -05:00
CLAUDE.md Update content/CLAUDE.md 2025-09-23 10:40:39 -05:00
_index.md
create.md 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
example.md
test-version-detector.md feat(influxdb): Version detector shortcode triggers a modal 2025-09-30 19:01:21 -05:00