content/create.md
Learn how to create and edit InfluxData documentation.
Example: Editing a product-specific page
Use docs scripts with AI agents to help you create and edit documentation locally, especially when working with shared content for multiple products.
Prerequisites:
Clone or fork the docs-v2 repository:
git clone https://github.com/influxdata/docs-v2.git
cd docs-v2
Run yarn in the repository root to install dependencies
Optional: Set up GitHub CLI
[!Tip] To run and test your changes locally, enter the following command in your terminal:
bashyarn hugo serverTo refresh shared content after making changes,
touchor edit the frontmatter file, or stop the server (Ctrl+C) and restart it.To list all available scripts, run:
bashyarn run
Use the npx docs edit command to open an existing page in your editor.
npx docs edit https://docs.influxdata.com/influxdb3/enterprise/get-started/
Use the npx docs create command with your AI agent tool to scaffold frontmatter and generate new content.
npx docs create command accepts draft input from stdin or from a file path and generates a prompt file from the draft and your product selectionsnpx docs create is designed to work automatically with claude, but you can
use the generated prompt file with any AI agent (for example, copilot or codex)<!-- Coming soon: generate content from an issue with labels -->[!Tip]
docs-v2contains custom configuration for agents like Claude and Copilot Agent mode.
{{% tabs-wrapper %}} {{% tabs %}} Interactive (Claude Code) Non-interactive (any agent) {{% /tabs %}} {{% tab-content %}}
{{% /tab-content %}} {{% tab-content %}}
Open a Claude Code prompt:
claude code
In the prompt, run the docs create command with the path to your draft file.
Optionally, include the --products flag and product namespaces to preselect products--for example:
npx docs create .context/drafts/"Upgrading Enterprise 3 (draft).md" \
--products influxdb3_enterprise,influxdb3_core
If you don't include the --products flag, you'll be prompted to select products after running the command.
The script first generates a prompt file, then the agent automatically uses it to generate content and frontmatter based on the draft and the products you select.
{{% /tab-content %}} {{% tab-content %}}
Use npx docs create to generate a prompt file and then pipe it to your preferred AI agent.
Include the --products flag and product namespaces to preselect products
The following example uses Copilot to process a draft file:
npx docs create .context/drafts/"Upgrading Enterprise 3 (draft).md" \
--products "influxdb3_enterprise,influxdb3_core" | \
copilot --prompt --allow-all-tools
{{% /tab-content %}} {{< /tabs-wrapper >}}
After you create or edit content, test and review your changes, and then create a pull request.
[!Important]
Check AI-generated content
Always review and validate AI-generated content for accuracy. Make sure example commands are correct for the version you're documenting.
Run a local Hugo server to preview your changes:
yarn hugo server
Visit http://localhost:1313 to review your changes in the browser.
[!Note] If you need to preview changes in a live production-like environment that you can also share with others, the Docs team can deploy your branch to the staging site.
git add content
git commit -m "feat(product): Your commit message"
git push origin your-branch-name
master branch of the docs-v2 repository@influxdata/docs-team{{< tabs-wrapper >}} {{% tabs %}} GitHub gh CLI {{% /tabs %}} {{% tab-content %}}
@influxdata/docs-team and other reviewers{{% /tab-content %}} {{% tab-content %}}
gh pr create \
--base master \
--head your-branch-name \
--title "Your PR title" \
--body "Your PR description" \
--reviewer influxdata/docs-team,<other-reviewers>
{{% /tab-content %}} {{< /tabs-wrapper >}}
DOCS-*.md: Documentation standards and guidelines