feat: Update InfluxDB 3 CLI documentation for v3.2.0 features

- Add influxdb3 show license command documentation for Enterprise
- Update create database command with --retention-period option
- Update create table command with Enterprise --retention-period option
- Update delete database/table commands with --hard-delete options
- Update CLI command index to include license command
- Update planning documentation for CLI sync process
- Closes #6160
jts-6160-3-2-cli
Jason Stirnaman 2025-06-26 16:36:26 -05:00
parent 29da031c70
commit 52e6eeca8a
7 changed files with 277 additions and 26 deletions

View File

@ -0,0 +1,91 @@
---
title: influxdb3 show license
description: >
The `influxdb3 show license` command displays license information for your
InfluxDB 3 Enterprise server.
menu:
influxdb3_enterprise:
parent: influxdb3 show
name: influxdb3 show license
weight: 300
---
The `influxdb3 show license` command displays license information for your {{< product-name >}} instance.
{{% show-in "enterprise" %}}
This command is only available in InfluxDB 3 Enterprise.
{{% /show-in %}}
## Usage
<!--pytest.mark.skip-->
```bash
influxdb3 show license [OPTIONS]
```
## Options
| Option | | Description |
| :----- | :----------- | :--------------------------------------------------------------------------------------- |
| `-H` | `--host` | Host URL of the running {{< product-name >}} server (default is `http://127.0.0.1:8181`) |
| | `--cluster-id` | _({{< req >}})_ Cluster identifier |
| | `--node-id` | _({{< req >}})_ Node identifier |
| | `--object-store` | _({{< req >}})_ Object store type (file, memory, s3, gcs, azure) |
| | `--token` | Authentication token |
| | `--tls-ca` | Path to a custom TLS certificate authority (for testing or self-signed certificates) |
| `-h` | `--help` | Print help information |
| | `--help-all` | Print detailed help information |
> [!Note]
> **CLI help documentation bug in v3.2.0**
>
> The `influxdb3 show license --help` output in v3.2.0 does not display the required `--object-store`, `--cluster-id`, and `--node-id` options and related object store configuration options.
> This command requires object store configuration and cluster/node identification to function properly.
### Additional object store options
Depending on the `--object-store` type specified, additional configuration options may be required:
- **S3**: AWS credentials and bucket configuration
- **GCS**: Google Cloud credentials and bucket configuration
- **Azure**: Azure credentials and container configuration
- **File**: Local file system path configuration
### Option environment variables
You can use the following environment variables to set command options:
| Environment Variable | Option |
| :------------------------ | :----------- |
| `INFLUXDB3_HOST_URL` | `--host` |
| `INFLUXDB3_AUTH_TOKEN` | `--token` |
## Examples
### Display license information with file object store
{{% code-placeholders "AUTH_TOKEN|CLUSTER_ID|NODE_ID" %}}
<!--pytest.mark.skip-->
```bash
influxdb3 show license \
--cluster-id CLUSTER_ID \
--node-id NODE_ID \
--object-store file \
--token AUTH_TOKEN
```
{{% /code-placeholders %}}
In the example above, replace the following:
- {{% code-placeholder-key %}}`AUTH_TOKEN`{{% /code-placeholder-key %}}:
Authentication token
- {{% code-placeholder-key %}}`CLUSTER_ID`{{% /code-placeholder-key %}}:
Your cluster identifier
- {{% code-placeholder-key %}}`NODE_ID`{{% /code-placeholder-key %}}:
Your node identifier
The command displays information about your Enterprise license, including license type, expiration date, and usage limits.

View File

@ -19,13 +19,14 @@ You can also set the database name using the `INFLUXDB3_DATABASE_NAME` environme
## Options
| Option | | Description |
| :----- | :----------- | :--------------------------------------------------------------------------------------- |
| `-H` | `--host` | Host URL of the running {{< product-name >}} server (default is `http://127.0.0.1:8181`) |
| | `--token` | Authentication token |
| | `--tls-ca` | Path to a custom TLS certificate authority (for testing or self-signed certificates) |
| `-h` | `--help` | Print help information |
| | `--help-all` | Print detailed help information |
| Option | | Description |
| :----- | :------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------- |
| `-H` | `--host` | Host URL of the running {{< product-name >}} server (default is `http://127.0.0.1:8181`) |
| | `--retention-period` | Database [retention period](/influxdb3/version/reference/glossary/#retention-period) ([duration](/influxdb3/version/reference/glossary/#duration) value, for example: `30d`, `24h`, `1h`) |
| | `--token` | Authentication token |
| | `--tls-ca` | Path to a custom TLS certificate authority (for testing or self-signed certificates) |
| `-h` | `--help` | Print help information |
| | `--help-all` | Print detailed help information |
### Option environment variables
@ -69,4 +70,14 @@ Flags override their associated environment variables.
influxdb3 create database --token AUTH_TOKEN DATABASE_NAME
```
### Create a database with a retention period
Creates a database with a specific retention period.
<!--pytest.mark.skip-->
```bash
influxdb3 create database --retention-period 30d DATABASE_NAME
```
{{% /code-placeholders %}}

View File

@ -24,6 +24,7 @@ influxdb3 create table [OPTIONS] \
## Options
{{% hide-in "enterprise" %}}
| Option | | Description |
| :----- | :----------- | :--------------------------------------------------------------------------------------- |
| `-H` | `--host` | Host URL of the running {{< product-name >}} server (default is `http://127.0.0.1:8181`) |
@ -34,6 +35,22 @@ influxdb3 create table [OPTIONS] \
| | `--tls-ca` | Path to a custom TLS certificate authority (for testing or self-signed certificates) |
| `-h` | `--help` | Print help information |
| | `--help-all` | Print detailed help information |
{{% /hide-in %}}
<!-- Using the show-in shortcode for only the retention-period option breaks the formatting in Core -->
{{% show-in "enterprise" %}}
| Option | | Description |
| :----- | :------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------- |
| `-H` | `--host` | Host URL of the running {{< product-name >}} server (default is `http://127.0.0.1:8181`) |
| `-d` | `--database` | _({{< req >}})_ Name of the database to operate on |
| | `--retention-period` | [Retention period](/influxdb3/version/reference/glossary/#retention-period) ([duration](/influxdb3/version/reference/glossary/#duration) value, for example: `30d`, `24h`, `1h`) for data in the table|
| | `--token` | _({{< req >}})_ Authentication token |
| | `--tags` | _({{< req >}})_ Comma-separated list of tag columns to include in the table |
| | `--fields` | Comma-separated list of field columns and their types to include in the table |
| | `--tls-ca` | Path to a custom TLS certificate authority (for testing or self-signed certificates) |
| `-h` | `--help` | Print help information |
| | `--help-all` | Print detailed help information |
{{% /show-in %}}
> [!Important]
>
@ -90,6 +107,22 @@ influxdb3 create table \
TABLE_NAME
```
{{% show-in "enterprise" %}}
### Create a table with a retention period
<!--pytest.mark.skip-->
```bash
influxdb3 create table \
--tags room,sensor_id \
--fields temp:float64,hum:float64 \
--retention-period 7d \
--database DATABASE_NAME \
--token AUTH_TOKEN \
TABLE_NAME
```
{{% /show-in %}}
### Verification
Use the `SHOW TABLES` query to verify that the table was created successfully:
@ -114,7 +147,7 @@ Example output:
+---------------+--------------------+----------------------------+------------+
```
>[!Note]
> [!Note]
> `SHOW TABLES` is an SQL query. It isn't supported in InfluxQL.
{{% /code-placeholders %}}

View File

@ -17,13 +17,14 @@ influxdb3 delete database [OPTIONS] <DATABASE_NAME>
## Options
| Option | | Description |
| :----- | :----------- | :--------------------------------------------------------------------------------------- |
| `-H` | `--host` | Host URL of the running {{< product-name >}} server (default is `http://127.0.0.1:8181`) |
| | `--token` | Authentication token |
| | `--tls-ca` | Path to a custom TLS certificate authority (for testing or self-signed certificates) |
| `-h` | `--help` | Print help information |
| | `--help-all` | Print detailed help information |
| Option | | Description |
| :----- | :------------ | :--------------------------------------------------------------------------------------- |
| `-H` | `--host` | Host URL of the running {{< product-name >}} server (default is `http://127.0.0.1:8181`) |
| | `--hard-delete` | When to hard delete data (never/now/default/timestamp). Default behavior is a soft delete that allows recovery |
| | `--token` | Authentication token |
| | `--tls-ca` | Path to a custom TLS certificate authority (for testing or self-signed certificates) |
| `-h` | `--help` | Print help information |
| | `--help-all` | Print detailed help information |
### Option environment variables
@ -36,8 +37,8 @@ You can use the following environment variables to set command options:
## Examples
- [Delete a database](#delete-a-new-database)
- [Delete a database while specifying the token inline](#delete-a-new-database-while-specifying-the-token-inline)
- [Delete a database](#delete-a-database)
- [Delete a database while specifying the token inline](#delete-a-database-while-specifying-the-token-inline)
In the examples below, replace the following:
@ -64,4 +65,24 @@ influxdb3 delete database DATABASE_NAME
influxdb3 delete database --token AUTH_TOKEN DATABASE_NAME
```
### Hard delete a database immediately
Permanently delete a database and all its data immediately without the ability to recover.
<!--pytest.mark.skip-->
```bash
influxdb3 delete database --hard-delete now DATABASE_NAME
```
### Hard delete a database at a specific time
Schedule a database for permanent deletion at a specific timestamp.
<!--pytest.mark.skip-->
```bash
influxdb3 delete database --hard-delete "2024-01-01T00:00:00Z" DATABASE_NAME
```
{{% /code-placeholders %}}

View File

@ -15,14 +15,15 @@ influxdb3 delete table [OPTIONS] --database <DATABASE_NAME> <TABLE_NAME>
## Options
| Option | | Description |
| :----- | :----------- | :--------------------------------------------------------------------------------------- |
| `-H` | `--host` | Host URL of the running {{< product-name >}} server (default is `http://127.0.0.1:8181`) |
| `-d` | `--database` | _({{< req >}})_ Name of the database to operate on |
| | `--token` | _({{< req >}})_ Authentication token |
| | `--tls-ca` | Path to a custom TLS certificate authority (for testing or self-signed certificates) |
| `-h` | `--help` | Print help information |
| | `--help-all` | Print detailed help information |
| Option | | Description |
| :----- | :------------ | :--------------------------------------------------------------------------------------- |
| `-H` | `--host` | Host URL of the running {{< product-name >}} server (default is `http://127.0.0.1:8181`) |
| `-d` | `--database` | _({{< req >}})_ Name of the database to operate on |
| | `--hard-delete` | When to hard delete data (never/now/default/timestamp). Default behavior is a soft delete that allows recovery |
| | `--token` | _({{< req >}})_ Authentication token |
| | `--tls-ca` | Path to a custom TLS certificate authority (for testing or self-signed certificates) |
| `-h` | `--help` | Print help information |
| | `--help-all` | Print detailed help information |
### Option environment variables
@ -49,9 +50,23 @@ influxdb3 delete table \
TABLE_NAME
```
### Hard delete a table immediately
Permanently delete a table and all its data immediately without the ability to recover.
<!--pytest.mark.skip-->
```bash
influxdb3 delete table \
--database DATABASE_NAME \
--token AUTH_TOKEN \
--hard-delete now \
TABLE_NAME
```
{{% /code-placeholders %}}
In the example above, replace the following:
In the examples above, replace the following:
- {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}:
Database name

View File

@ -14,6 +14,7 @@ influxdb3 show <SUBCOMMAND>
| Subcommand | Description |
| :---------------------------------------------------------------------- | :--------------------------------------------- |
| [databases](/influxdb3/version/reference/cli/influxdb3/show/databases/) | List database |
{{% show-in "enterprise" %}}| [license](/influxdb3/version/reference/cli/influxdb3/show/license/) | Display license information |{{% /show-in %}}
| [system](/influxdb3/version/reference/cli/influxdb3/show/system/) | Display system table data |
| [tokens](/influxdb3/version/reference/cli/influxdb3/show/tokens/) | List authentication tokens |
| help | Print command help or the help of a subcommand |

View File

@ -0,0 +1,79 @@
# Plan: Update InfluxDB 3 CLI Reference Documentation
## Automation and Process Improvements
### Immediate Improvements:
1. **Create CLI documentation sync script:**
```bash
# Script: /Users/ja/Documents/github/docs-v2/scripts/sync-cli-docs.sh
# - Extract help text from influxdb3 CLI at /Users/ja/.influxdb//influxdb3
# - Compare with existing docs
# - Generate report of differences
# - Auto-update basic command syntax
# - Real-time CLI verification capability established
```
2. **Establish documentation standards:**
- Standardize frontmatter across CLI docs
- Create templates for command documentation
- Define Enterprise vs Core content patterns using Hugo shortcodes
### Long-term Automation Strategy:
1. **CI/CD Integration:**
- Add GitHub Actions workflow to detect CLI changes
- Auto-generate CLI help extraction on new releases
- Create pull requests for documentation updates
2. **Release Process Integration:**
- Include CLI documentation review in release checklist
- Link release notes to specific CLI documentation updates
- Automated cross-referencing between release notes and CLI docs
3. **Content Management Improvements:**
- Use Hugo shortcodes for Enterprise-specific content
- Implement version-aware documentation
- Create shared content templates for common CLI patterns
## Phase 4: Validation and Testing
### Content accuracy verification:
- ✅ **CLI Access Available**: Direct verification via `influxdb3 --help` commands
- ✅ **Real-time Validation**: All commands and options verified against actual CLI output
- **Process**: Use `influxdb3 [command] --help` to validate documentation accuracy
- **Verification**: Cross-reference documented options with actual CLI behavior
### Documentation completeness check:
- Ensure all v3.2.0 features are documented
- Verify examples and use cases
- Check internal links and cross-references
## Suggested Recurring Process
### Pre-release (during development):
- Monitor CLI changes in pull requests
- Update documentation as features are added
- Maintain CLI help extraction automation
### At release (when tagging versions):
- Run automated CLI documentation sync
- Review and approve auto-generated updates
- Publish updated documentation
### Post-release (after release):
- Validate documentation accuracy
- Gather user feedback on CLI documentation
- Plan improvements for next cycle
## Related Documentation Paths
### InfluxDB 3 Product Documentation (affects CLI usage examples):
- `/content/influxdb3/core/write-data/influxdb3-cli.md`
- `/content/influxdb3/enterprise/write-data/influxdb3-cli.md`
- `/content/shared/influxdb3-write-guides/influxdb3-cli.md`
### Admin Documentation (affects retention and license features):
- `/content/influxdb3/core/admin/`
- `/content/influxdb3/enterprise/admin/`
- `/content/influxdb3/enterprise/admin/license.md`
This plan ensures comprehensive documentation updates for v3.2.0 while establishing sustainable processes for future releases.