diff --git a/crowdsec-docs/docs/cscli/cscli_appsec-configs.md b/crowdsec-docs/docs/cscli/cscli_appsec-configs.md index 7f08a35f3..9c32273ce 100644 --- a/crowdsec-docs/docs/cscli/cscli_appsec-configs.md +++ b/crowdsec-docs/docs/cscli/cscli_appsec-configs.md @@ -10,10 +10,10 @@ Manage hub appsec-configs ``` cscli appsec-configs list -a -cscli appsec-configs install crowdsecurity/vpatch -cscli appsec-configs inspect crowdsecurity/vpatch -cscli appsec-configs upgrade crowdsecurity/vpatch -cscli appsec-configs remove crowdsecurity/vpatch +cscli appsec-configs install crowdsecurity/virtual-patching +cscli appsec-configs inspect crowdsecurity/virtual-patching +cscli appsec-configs upgrade crowdsecurity/virtual-patching +cscli appsec-configs remove crowdsecurity/virtual-patching ``` diff --git a/crowdsec-docs/docs/cscli/cscli_appsec-configs_inspect.md b/crowdsec-docs/docs/cscli/cscli_appsec-configs_inspect.md index fdc827e9c..5282b33fa 100644 --- a/crowdsec-docs/docs/cscli/cscli_appsec-configs_inspect.md +++ b/crowdsec-docs/docs/cscli/cscli_appsec-configs_inspect.md @@ -17,7 +17,17 @@ cscli appsec-configs inspect [item]... [flags] ### Examples ``` -cscli appsec-configs inspect crowdsecurity/vpatch +# Display metadata, state, metrics and ancestor collections of appsec-configs (installed or not). +cscli appsec-configs inspect crowdsecurity/virtual-patching + +# Don't collect metrics (avoid error if crowdsec is not running). +cscli appsec-configs inspect crowdsecurity/virtual-patching --no-metrics + +# Display difference between a tainted item and the latest one. +cscli appsec-configs inspect crowdsecurity/virtual-patching --diff + +# Reverse the above diff +cscli appsec-configs inspect crowdsecurity/virtual-patching --diff --rev ``` ### Options diff --git a/crowdsec-docs/docs/cscli/cscli_appsec-configs_install.md b/crowdsec-docs/docs/cscli/cscli_appsec-configs_install.md index 42e78d0e6..e0182fb10 100644 --- a/crowdsec-docs/docs/cscli/cscli_appsec-configs_install.md +++ b/crowdsec-docs/docs/cscli/cscli_appsec-configs_install.md @@ -17,16 +17,35 @@ cscli appsec-configs install [item]... [flags] ### Examples ``` -cscli appsec-configs install crowdsecurity/vpatch +# Install some appsec-configs. +cscli appsec-configs install crowdsecurity/virtual-patching + +# Show the execution plan without changing anything - compact output sorted by type and name. +cscli appsec-configs install crowdsecurity/virtual-patching --dry-run + +# Show the execution plan without changing anything - verbose output sorted by execution order. +cscli appsec-configs install crowdsecurity/virtual-patching --dry-run -o raw + +# Download only, to be installed later. +cscli appsec-configs install crowdsecurity/virtual-patching --download-only + +# Install over tainted items. Can be used to restore or repair after local modifications or missing dependencies. +cscli appsec-configs install crowdsecurity/virtual-patching --force + +# Prompt for confirmation if running in an interactive terminal; otherwise, the option is ignored. +cscli appsec-configs install crowdsecurity/virtual-patching -i +cscli appsec-configs install crowdsecurity/virtual-patching --interactive ``` ### Options ``` -d, --download-only Only download packages, don't enable + --dry-run Don't install or remove anything; print the execution plan --force Force install: overwrite tainted and outdated files -h, --help help for install --ignore Ignore errors when installing multiple appsec-configs + -i, --interactive Ask for confirmation before proceeding ``` ### Options inherited from parent commands diff --git a/crowdsec-docs/docs/cscli/cscli_appsec-configs_list.md b/crowdsec-docs/docs/cscli/cscli_appsec-configs_list.md index c466ba09a..88a37d221 100644 --- a/crowdsec-docs/docs/cscli/cscli_appsec-configs_list.md +++ b/crowdsec-docs/docs/cscli/cscli_appsec-configs_list.md @@ -17,9 +17,14 @@ cscli appsec-configs list [item... | -a] [flags] ### Examples ``` +# List enabled (installed) appsec-configs. cscli appsec-configs list + +# List all available appsec-configs (installed or not). cscli appsec-configs list -a -cscli appsec-configs list crowdsecurity/vpatch + +# List specific appsec-configs (installed or not). +cscli appsec-configs list crowdsecurity/virtual-patching crowdsecurity/generic-rules ``` ### Options diff --git a/crowdsec-docs/docs/cscli/cscli_appsec-configs_remove.md b/crowdsec-docs/docs/cscli/cscli_appsec-configs_remove.md index 0c2f48be7..e9b8575fb 100644 --- a/crowdsec-docs/docs/cscli/cscli_appsec-configs_remove.md +++ b/crowdsec-docs/docs/cscli/cscli_appsec-configs_remove.md @@ -17,16 +17,35 @@ cscli appsec-configs remove [item]... [flags] ### Examples ``` -cscli appsec-configs remove crowdsecurity/vpatch +# Uninstall some appsec-configs. +cscli appsec-configs remove crowdsecurity/virtual-patching + +# Show the execution plan without changing anything - compact output sorted by type and name. +cscli appsec-configs remove crowdsecurity/virtual-patching --dry-run + +# Show the execution plan without changing anything - verbose output sorted by execution order. +cscli appsec-configs remove crowdsecurity/virtual-patching --dry-run -o raw + +# Uninstall and also remove the downloaded files. +cscli appsec-configs remove crowdsecurity/virtual-patching --purge + +# Remove tainted items. +cscli appsec-configs remove crowdsecurity/virtual-patching --force + +# Prompt for confirmation if running in an interactive terminal; otherwise, the option is ignored. +cscli appsec-configs remove crowdsecurity/virtual-patching -i +cscli appsec-configs remove crowdsecurity/virtual-patching --interactive ``` ### Options ``` - --all Remove all the appsec-configs - --force Force remove: remove tainted and outdated files - -h, --help help for remove - --purge Delete source file too + --all Remove all the appsec-configs + --dry-run Don't install or remove anything; print the execution plan + --force Force remove: remove tainted and outdated files + -h, --help help for remove + -i, --interactive Ask for confirmation before proceeding + --purge Delete source file too ``` ### Options inherited from parent commands diff --git a/crowdsec-docs/docs/cscli/cscli_appsec-configs_upgrade.md b/crowdsec-docs/docs/cscli/cscli_appsec-configs_upgrade.md index defdc9844..1667bacfd 100644 --- a/crowdsec-docs/docs/cscli/cscli_appsec-configs_upgrade.md +++ b/crowdsec-docs/docs/cscli/cscli_appsec-configs_upgrade.md @@ -17,15 +17,31 @@ cscli appsec-configs upgrade [item]... [flags] ### Examples ``` -cscli appsec-configs upgrade crowdsecurity/vpatch +# Upgrade some appsec-configs. If they are not currently installed, they are downloaded but not installed. +cscli appsec-configs upgrade crowdsecurity/virtual-patching + +# Show the execution plan without changing anything - compact output sorted by type and name. +cscli appsec-configs upgrade crowdsecurity/virtual-patching --dry-run + +# Show the execution plan without changing anything - verbose output sorted by execution order. +cscli appsec-configs upgrade crowdsecurity/virtual-patching --dry-run -o raw + +# Upgrade over tainted items. Can be used to restore or repair after local modifications or missing dependencies. +cscli appsec-configs upgrade crowdsecurity/virtual-patching --force + +# Prompt for confirmation if running in an interactive terminal; otherwise, the option is ignored. +cscli appsec-configs upgrade crowdsecurity/virtual-patching -i +cscli appsec-configs upgrade crowdsecurity/virtual-patching --interactive ``` ### Options ``` - -a, --all Upgrade all the appsec-configs - --force Force upgrade: overwrite tainted and outdated files - -h, --help help for upgrade + -a, --all Upgrade all the appsec-configs + --dry-run Don't install or remove anything; print the execution plan + --force Force upgrade: overwrite tainted and outdated files + -h, --help help for upgrade + -i, --interactive Ask for confirmation before proceeding ``` ### Options inherited from parent commands diff --git a/crowdsec-docs/docs/cscli/cscli_appsec-rules_inspect.md b/crowdsec-docs/docs/cscli/cscli_appsec-rules_inspect.md index d93378682..b972dcb85 100644 --- a/crowdsec-docs/docs/cscli/cscli_appsec-rules_inspect.md +++ b/crowdsec-docs/docs/cscli/cscli_appsec-rules_inspect.md @@ -17,7 +17,17 @@ cscli appsec-rules inspect [item]... [flags] ### Examples ``` +# Display metadata, state, metrics and ancestor collections of appsec-rules (installed or not). cscli appsec-rules inspect crowdsecurity/crs + +# Don't collect metrics (avoid error if crowdsec is not running). +cscli appsec-configs inspect crowdsecurity/crs --no-metrics + +# Display difference between a tainted item and the latest one. +cscli appsec-rules inspect crowdsecurity/crs --diff + +# Reverse the above diff +cscli appsec-rules inspect crowdsecurity/crs --diff --rev ``` ### Options diff --git a/crowdsec-docs/docs/cscli/cscli_appsec-rules_install.md b/crowdsec-docs/docs/cscli/cscli_appsec-rules_install.md index eb10e0fd7..de5ea9595 100644 --- a/crowdsec-docs/docs/cscli/cscli_appsec-rules_install.md +++ b/crowdsec-docs/docs/cscli/cscli_appsec-rules_install.md @@ -17,16 +17,35 @@ cscli appsec-rules install [item]... [flags] ### Examples ``` +# Install some appsec-rules. cscli appsec-rules install crowdsecurity/crs + +# Show the execution plan without changing anything - compact output sorted by type and name. +cscli appsec-rules install crowdsecurity/crs --dry-run + +# Show the execution plan without changing anything - verbose output sorted by execution order. +cscli appsec-rules install crowdsecurity/crs --dry-run -o raw + +# Download only, to be installed later. +cscli appsec-rules install crowdsecurity/crs --download-only + +# Install over tainted items. Can be used to restore or repair after local modifications or missing dependencies. +cscli appsec-rules install crowdsecurity/crs --force + +# Prompt for confirmation if running in an interactive terminal; otherwise, the option is ignored. +cscli appsec-rules install crowdsecurity/crs -i +cscli appsec-rules install crowdsecurity/crs --interactive ``` ### Options ``` -d, --download-only Only download packages, don't enable + --dry-run Don't install or remove anything; print the execution plan --force Force install: overwrite tainted and outdated files -h, --help help for install --ignore Ignore errors when installing multiple appsec-rules + -i, --interactive Ask for confirmation before proceeding ``` ### Options inherited from parent commands diff --git a/crowdsec-docs/docs/cscli/cscli_appsec-rules_list.md b/crowdsec-docs/docs/cscli/cscli_appsec-rules_list.md index e076946ab..d9445519e 100644 --- a/crowdsec-docs/docs/cscli/cscli_appsec-rules_list.md +++ b/crowdsec-docs/docs/cscli/cscli_appsec-rules_list.md @@ -17,9 +17,14 @@ cscli appsec-rules list [item... | -a] [flags] ### Examples ``` +# List enabled (installed) appsec-rules. cscli appsec-rules list + +# List all available appsec-rules (installed or not). cscli appsec-rules list -a -cscli appsec-rules list crowdsecurity/crs + +# List specific appsec-rules (installed or not). +cscli appsec-rules list crowdsecurity/crs crowdsecurity/vpatch-git-config ``` ### Options diff --git a/crowdsec-docs/docs/cscli/cscli_appsec-rules_remove.md b/crowdsec-docs/docs/cscli/cscli_appsec-rules_remove.md index 8820ee939..669d7017c 100644 --- a/crowdsec-docs/docs/cscli/cscli_appsec-rules_remove.md +++ b/crowdsec-docs/docs/cscli/cscli_appsec-rules_remove.md @@ -17,16 +17,35 @@ cscli appsec-rules remove [item]... [flags] ### Examples ``` +# Uninstall some appsec-rules. cscli appsec-rules remove crowdsecurity/crs + +# Show the execution plan without changing anything - compact output sorted by type and name. +cscli appsec-rules remove crowdsecurity/crs --dry-run + +# Show the execution plan without changing anything - verbose output sorted by execution order. +cscli appsec-rules remove crowdsecurity/crs --dry-run -o raw + +# Uninstall and also remove the downloaded files. +cscli appsec-rules remove crowdsecurity/crs --purge + +# Remove tainted items. +cscli appsec-rules remove crowdsecurity/crs --force + +# Prompt for confirmation if running in an interactive terminal; otherwise, the option is ignored. +cscli appsec-rules remove crowdsecurity/crs -i +cscli appsec-rules remove crowdsecurity/crs --interactive ``` ### Options ``` - --all Remove all the appsec-rules - --force Force remove: remove tainted and outdated files - -h, --help help for remove - --purge Delete source file too + --all Remove all the appsec-rules + --dry-run Don't install or remove anything; print the execution plan + --force Force remove: remove tainted and outdated files + -h, --help help for remove + -i, --interactive Ask for confirmation before proceeding + --purge Delete source file too ``` ### Options inherited from parent commands diff --git a/crowdsec-docs/docs/cscli/cscli_appsec-rules_upgrade.md b/crowdsec-docs/docs/cscli/cscli_appsec-rules_upgrade.md index a63775a85..35a6cda65 100644 --- a/crowdsec-docs/docs/cscli/cscli_appsec-rules_upgrade.md +++ b/crowdsec-docs/docs/cscli/cscli_appsec-rules_upgrade.md @@ -17,15 +17,31 @@ cscli appsec-rules upgrade [item]... [flags] ### Examples ``` +# Upgrade some appsec-rules. If they are not currently installed, they are downloaded but not installed. cscli appsec-rules upgrade crowdsecurity/crs + +# Show the execution plan without changing anything - compact output sorted by type and name. +cscli appsec-rules upgrade crowdsecurity/crs --dry-run + +# Show the execution plan without changing anything - verbose output sorted by execution order. +cscli appsec-rules upgrade crowdsecurity/crs --dry-run -o raw + +# Upgrade over tainted items. Can be used to restore or repair after local modifications or missing dependencies. +cscli appsec-rules upgrade crowdsecurity/crs --force + +# Prompt for confirmation if running in an interactive terminal; otherwise, the option is ignored. +cscli appsec-rules upgrade crowdsecurity/crs -i +cscli appsec-rules upgrade crowdsecurity/crs --interactive ``` ### Options ``` - -a, --all Upgrade all the appsec-rules - --force Force upgrade: overwrite tainted and outdated files - -h, --help help for upgrade + -a, --all Upgrade all the appsec-rules + --dry-run Don't install or remove anything; print the execution plan + --force Force upgrade: overwrite tainted and outdated files + -h, --help help for upgrade + -i, --interactive Ask for confirmation before proceeding ``` ### Options inherited from parent commands diff --git a/crowdsec-docs/docs/cscli/cscli_collections_inspect.md b/crowdsec-docs/docs/cscli/cscli_collections_inspect.md index 5f2cf4716..aba839a02 100644 --- a/crowdsec-docs/docs/cscli/cscli_collections_inspect.md +++ b/crowdsec-docs/docs/cscli/cscli_collections_inspect.md @@ -17,7 +17,17 @@ cscli collections inspect [item]... [flags] ### Examples ``` +# Display metadata, state, metrics and dependencies of collections (installed or not). cscli collections inspect crowdsecurity/http-cve crowdsecurity/iptables + +# Don't collect metrics (avoid error if crowdsec is not running). +cscli collections inspect crowdsecurity/http-cve crowdsecurity/iptables --no-metrics + +# Display difference between a tainted item and the latest one, or the reason for the taint if it's a dependency. +cscli collections inspect crowdsecurity/http-cve --diff + +# Reverse the above diff +cscli collections inspect crowdsecurity/http-cve --diff --rev ``` ### Options diff --git a/crowdsec-docs/docs/cscli/cscli_collections_install.md b/crowdsec-docs/docs/cscli/cscli_collections_install.md index 1ba790f63..92e06cb63 100644 --- a/crowdsec-docs/docs/cscli/cscli_collections_install.md +++ b/crowdsec-docs/docs/cscli/cscli_collections_install.md @@ -17,16 +17,35 @@ cscli collections install [item]... [flags] ### Examples ``` +# Install some collections. cscli collections install crowdsecurity/http-cve crowdsecurity/iptables + +# Show the execution plan without changing anything - compact output sorted by type and name. +cscli collections install crowdsecurity/http-cve crowdsecurity/iptables --dry-run + +# Show the execution plan without changing anything - verbose output sorted by execution order. +cscli collections install crowdsecurity/http-cve crowdsecurity/iptables --dry-run -o raw + +# Download only, to be installed later. +cscli collections install crowdsecurity/http-cve crowdsecurity/iptables --download-only + +# Install over tainted items. Can be used to restore or repair after local modifications or missing dependencies. +cscli collections install crowdsecurity/http-cve crowdsecurity/iptables --force + +# Prompt for confirmation if running in an interactive terminal; otherwise, the option is ignored. +cscli collections install crowdsecurity/http-cve crowdsecurity/iptables -i +cscli collections install crowdsecurity/http-cve crowdsecurity/iptables --interactive ``` ### Options ``` -d, --download-only Only download packages, don't enable + --dry-run Don't install or remove anything; print the execution plan --force Force install: overwrite tainted and outdated files -h, --help help for install --ignore Ignore errors when installing multiple collections + -i, --interactive Ask for confirmation before proceeding ``` ### Options inherited from parent commands diff --git a/crowdsec-docs/docs/cscli/cscli_collections_list.md b/crowdsec-docs/docs/cscli/cscli_collections_list.md index f9f87cbe9..ece29faac 100644 --- a/crowdsec-docs/docs/cscli/cscli_collections_list.md +++ b/crowdsec-docs/docs/cscli/cscli_collections_list.md @@ -17,11 +17,14 @@ cscli collections list [item... | -a] [flags] ### Examples ``` +# List enabled (installed) collections. cscli collections list + +# List all available collections (installed or not). cscli collections list -a -cscli collections list crowdsecurity/http-cve crowdsecurity/iptables -List only enabled collections unless "-a" or names are specified. +# List specific collections (installed or not). +cscli collections list crowdsecurity/http-cve crowdsecurity/iptables ``` ### Options diff --git a/crowdsec-docs/docs/cscli/cscli_collections_remove.md b/crowdsec-docs/docs/cscli/cscli_collections_remove.md index 5550b6877..83d15e8c2 100644 --- a/crowdsec-docs/docs/cscli/cscli_collections_remove.md +++ b/crowdsec-docs/docs/cscli/cscli_collections_remove.md @@ -17,16 +17,35 @@ cscli collections remove [item]... [flags] ### Examples ``` +# Uninstall some collections. cscli collections remove crowdsecurity/http-cve crowdsecurity/iptables + +# Show the execution plan without changing anything - compact output sorted by type and name. +cscli collections remove crowdsecurity/http-cve crowdsecurity/iptables --dry-run + +# Show the execution plan without changing anything - verbose output sorted by execution order. +cscli collections remove crowdsecurity/http-cve crowdsecurity/iptables --dry-run -o raw + +# Uninstall and also remove the downloaded files. +cscli collections remove crowdsecurity/http-cve crowdsecurity/iptables --purge + +# Remove tainted items. +cscli collections remove crowdsecurity/http-cve crowdsecurity/iptables --force + +# Prompt for confirmation if running in an interactive terminal; otherwise, the option is ignored. +cscli collections remove crowdsecurity/http-cve crowdsecurity/iptables -i +cscli collections remove crowdsecurity/http-cve crowdsecurity/iptables --interactive ``` ### Options ``` - --all Remove all the collections - --force Force remove: remove tainted and outdated files - -h, --help help for remove - --purge Delete source file too + --all Remove all the collections + --dry-run Don't install or remove anything; print the execution plan + --force Force remove: remove tainted and outdated files + -h, --help help for remove + -i, --interactive Ask for confirmation before proceeding + --purge Delete source file too ``` ### Options inherited from parent commands diff --git a/crowdsec-docs/docs/cscli/cscli_collections_upgrade.md b/crowdsec-docs/docs/cscli/cscli_collections_upgrade.md index db2bcceff..4895f5e92 100644 --- a/crowdsec-docs/docs/cscli/cscli_collections_upgrade.md +++ b/crowdsec-docs/docs/cscli/cscli_collections_upgrade.md @@ -17,15 +17,31 @@ cscli collections upgrade [item]... [flags] ### Examples ``` +# Upgrade some collections. If they are not currently installed, they are downloaded but not installed. cscli collections upgrade crowdsecurity/http-cve crowdsecurity/iptables + +# Show the execution plan without changing anything - compact output sorted by type and name. +cscli collections upgrade crowdsecurity/http-cve crowdsecurity/iptables --dry-run + +# Show the execution plan without changing anything - verbose output sorted by execution order. +cscli collections upgrade crowdsecurity/http-cve crowdsecurity/iptables --dry-run -o raw + +# Upgrade over tainted items. Can be used to restore or repair after local modifications or missing dependencies. +cscli collections upgrade crowdsecurity/http-cve crowdsecurity/iptables --force + +# Prompt for confirmation if running in an interactive terminal; otherwise, the option is ignored. +cscli collections upgrade crowdsecurity/http-cve crowdsecurity/iptables -i +cscli collections upgrade crowdsecurity/http-cve crowdsecurity/iptables --interactive ``` ### Options ``` - -a, --all Upgrade all the collections - --force Force upgrade: overwrite tainted and outdated files - -h, --help help for upgrade + -a, --all Upgrade all the collections + --dry-run Don't install or remove anything; print the execution plan + --force Force upgrade: overwrite tainted and outdated files + -h, --help help for upgrade + -i, --interactive Ask for confirmation before proceeding ``` ### Options inherited from parent commands diff --git a/crowdsec-docs/docs/cscli/cscli_config.md b/crowdsec-docs/docs/cscli/cscli_config.md index 5b396592a..0e4ce2c89 100644 --- a/crowdsec-docs/docs/cscli/cscli_config.md +++ b/crowdsec-docs/docs/cscli/cscli_config.md @@ -28,9 +28,7 @@ Allows to view current config ### SEE ALSO * [cscli](/cscli/cscli.md) - cscli allows you to manage crowdsec -* [cscli config backup](/cscli/cscli_config_backup.md) - Backup current config * [cscli config feature-flags](/cscli/cscli_config_feature-flags.md) - Displays feature flag status -* [cscli config restore](/cscli/cscli_config_restore.md) - Restore config in backup "directory" * [cscli config show](/cscli/cscli_config_show.md) - Displays current config * [cscli config show-yaml](/cscli/cscli_config_show-yaml.md) - Displays merged config.yaml + config.yaml.local diff --git a/crowdsec-docs/docs/cscli/cscli_config_backup.md b/crowdsec-docs/docs/cscli/cscli_config_backup.md deleted file mode 100644 index 950c65165..000000000 --- a/crowdsec-docs/docs/cscli/cscli_config_backup.md +++ /dev/null @@ -1,52 +0,0 @@ ---- -id: cscli_config_backup -title: cscli config backup ---- -## cscli config backup - -Backup current config - -### Synopsis - -Backup the current crowdsec configuration including : - -- Main config (config.yaml) -- Simulation config (simulation.yaml) -- Profiles config (profiles.yaml) -- List of scenarios, parsers, postoverflows and collections that are up-to-date -- Tainted/local/out-of-date scenarios, parsers, postoverflows and collections -- Backup of API credentials (local API and online API) - -``` -cscli config backup "directory" [flags] -``` - -### Examples - -``` -cscli config backup ./my-backup -``` - -### Options - -``` - -h, --help help for backup -``` - -### Options inherited from parent commands - -``` - --color string Output color: yes, no, auto (default "auto") - -c, --config string path to crowdsec config file (default "/etc/crowdsec/config.yaml") - --debug Set logging to debug - --error Set logging to error - --info Set logging to info - -o, --output string Output format: human, json, raw - --trace Set logging to trace - --warning Set logging to warning -``` - -### SEE ALSO - -* [cscli config](/cscli/cscli_config.md) - Allows to view current config - diff --git a/crowdsec-docs/docs/cscli/cscli_config_restore.md b/crowdsec-docs/docs/cscli/cscli_config_restore.md deleted file mode 100644 index b54792fe8..000000000 --- a/crowdsec-docs/docs/cscli/cscli_config_restore.md +++ /dev/null @@ -1,46 +0,0 @@ ---- -id: cscli_config_restore -title: cscli config restore ---- -## cscli config restore - -Restore config in backup "directory" - -### Synopsis - -Restore the crowdsec configuration from specified backup "directory" including: - -- Main config (config.yaml) -- Simulation config (simulation.yaml) -- Profiles config (profiles.yaml) -- List of scenarios, parsers, postoverflows and collections that are up-to-date -- Tainted/local/out-of-date scenarios, parsers, postoverflows and collections -- Backup of API credentials (local API and online API) - -``` -cscli config restore "directory" [flags] -``` - -### Options - -``` - -h, --help help for restore -``` - -### Options inherited from parent commands - -``` - --color string Output color: yes, no, auto (default "auto") - -c, --config string path to crowdsec config file (default "/etc/crowdsec/config.yaml") - --debug Set logging to debug - --error Set logging to error - --info Set logging to info - -o, --output string Output format: human, json, raw - --trace Set logging to trace - --warning Set logging to warning -``` - -### SEE ALSO - -* [cscli config](/cscli/cscli_config.md) - Allows to view current config - diff --git a/crowdsec-docs/docs/cscli/cscli_contexts.md b/crowdsec-docs/docs/cscli/cscli_contexts.md index ffbd1e428..19bc2bd41 100644 --- a/crowdsec-docs/docs/cscli/cscli_contexts.md +++ b/crowdsec-docs/docs/cscli/cscli_contexts.md @@ -10,10 +10,10 @@ Manage hub contexts ``` cscli contexts list -a -cscli contexts install crowdsecurity/yyy crowdsecurity/zzz -cscli contexts inspect crowdsecurity/yyy crowdsecurity/zzz -cscli contexts upgrade crowdsecurity/yyy crowdsecurity/zzz -cscli contexts remove crowdsecurity/yyy crowdsecurity/zzz +cscli contexts install crowdsecurity/bf_base crowdsecurity/fortinet +cscli contexts inspect crowdsecurity/bf_base crowdsecurity/fortinet +cscli contexts upgrade crowdsecurity/bf_base crowdsecurity/fortinet +cscli contexts remove crowdsecurity/bf_base crowdsecurity/fortinet ``` diff --git a/crowdsec-docs/docs/cscli/cscli_contexts_inspect.md b/crowdsec-docs/docs/cscli/cscli_contexts_inspect.md index bfc0dda3a..03c85b2ee 100644 --- a/crowdsec-docs/docs/cscli/cscli_contexts_inspect.md +++ b/crowdsec-docs/docs/cscli/cscli_contexts_inspect.md @@ -17,7 +17,14 @@ cscli contexts inspect [item]... [flags] ### Examples ``` -cscli contexts inspect crowdsecurity/yyy crowdsecurity/zzz +# Display metadata, state and ancestor collections of contexts (installed or not). +cscli contexts inspect crowdsecurity/bf_base crowdsecurity/fortinet + +# Display difference between a tainted item and the latest one. +cscli contexts inspect crowdsecurity/bf_base --diff + +# Reverse the above diff +cscli contexts inspect crowdsecurity/bf_base --diff --rev ``` ### Options diff --git a/crowdsec-docs/docs/cscli/cscli_contexts_install.md b/crowdsec-docs/docs/cscli/cscli_contexts_install.md index eadc599ee..0180dcd06 100644 --- a/crowdsec-docs/docs/cscli/cscli_contexts_install.md +++ b/crowdsec-docs/docs/cscli/cscli_contexts_install.md @@ -17,16 +17,35 @@ cscli contexts install [item]... [flags] ### Examples ``` -cscli contexts install crowdsecurity/yyy crowdsecurity/zzz +# Install some contexts. +cscli contexts install crowdsecurity/bf_base crowdsecurity/fortinet + +# Show the execution plan without changing anything - compact output sorted by type and name. +cscli contexts install crowdsecurity/bf_base crowdsecurity/fortinet --dry-run + +# Show the execution plan without changing anything - verbose output sorted by execution order. +cscli contexts install crowdsecurity/bf_base crowdsecurity/fortinet --dry-run -o raw + +# Download only, to be installed later. +cscli contexts install crowdsecurity/bf_base crowdsecurity/fortinet --download-only + +# Install over tainted items. Can be used to restore or repair after local modifications or missing dependencies. +cscli contexts install crowdsecurity/bf_base crowdsecurity/fortinet --force + +# Prompt for confirmation if running in an interactive terminal; otherwise, the option is ignored. +cscli contexts install crowdsecurity/bf_base crowdsecurity/fortinet -i +cscli contexts install crowdsecurity/bf_base crowdsecurity/fortinet --interactive ``` ### Options ``` -d, --download-only Only download packages, don't enable + --dry-run Don't install or remove anything; print the execution plan --force Force install: overwrite tainted and outdated files -h, --help help for install --ignore Ignore errors when installing multiple contexts + -i, --interactive Ask for confirmation before proceeding ``` ### Options inherited from parent commands diff --git a/crowdsec-docs/docs/cscli/cscli_contexts_list.md b/crowdsec-docs/docs/cscli/cscli_contexts_list.md index c52da5939..931732e5b 100644 --- a/crowdsec-docs/docs/cscli/cscli_contexts_list.md +++ b/crowdsec-docs/docs/cscli/cscli_contexts_list.md @@ -17,11 +17,14 @@ cscli contexts list [item... | -a] [flags] ### Examples ``` +# List enabled (installed) contexts. cscli contexts list + +# List all available contexts (installed or not). cscli contexts list -a -cscli contexts list crowdsecurity/yyy crowdsecurity/zzz -List only enabled contexts unless "-a" or names are specified. +# List specific contexts (installed or not). +cscli contexts list crowdsecurity/bf_base crowdsecurity/fortinet ``` ### Options diff --git a/crowdsec-docs/docs/cscli/cscli_contexts_remove.md b/crowdsec-docs/docs/cscli/cscli_contexts_remove.md index 9ca52a0b6..866e7f7af 100644 --- a/crowdsec-docs/docs/cscli/cscli_contexts_remove.md +++ b/crowdsec-docs/docs/cscli/cscli_contexts_remove.md @@ -17,16 +17,35 @@ cscli contexts remove [item]... [flags] ### Examples ``` -cscli contexts remove crowdsecurity/yyy crowdsecurity/zzz +# Uninstall some contexts. +cscli contexts remove crowdsecurity/bf_base crowdsecurity/fortinet + +# Show the execution plan without changing anything - compact output sorted by type and name. +cscli contexts remove crowdsecurity/bf_base crowdsecurity/fortinet --dry-run + +# Show the execution plan without changing anything - verbose output sorted by execution order. +cscli contexts remove crowdsecurity/bf_base crowdsecurity/fortinet --dry-run -o raw + +# Uninstall and also remove the downloaded files. +cscli contexts remove crowdsecurity/bf_base crowdsecurity/fortinet --purge + +# Remove tainted items. +cscli contexts remove crowdsecurity/bf_base crowdsecurity/fortinet --force + +# Prompt for confirmation if running in an interactive terminal; otherwise, the option is ignored. +cscli contexts remove crowdsecurity/bf_base crowdsecurity/fortinet -i +cscli contexts remove crowdsecurity/bf_base crowdsecurity/fortinet --interactive ``` ### Options ``` - --all Remove all the contexts - --force Force remove: remove tainted and outdated files - -h, --help help for remove - --purge Delete source file too + --all Remove all the contexts + --dry-run Don't install or remove anything; print the execution plan + --force Force remove: remove tainted and outdated files + -h, --help help for remove + -i, --interactive Ask for confirmation before proceeding + --purge Delete source file too ``` ### Options inherited from parent commands diff --git a/crowdsec-docs/docs/cscli/cscli_contexts_upgrade.md b/crowdsec-docs/docs/cscli/cscli_contexts_upgrade.md index 0124e6e56..560f15b87 100644 --- a/crowdsec-docs/docs/cscli/cscli_contexts_upgrade.md +++ b/crowdsec-docs/docs/cscli/cscli_contexts_upgrade.md @@ -17,15 +17,31 @@ cscli contexts upgrade [item]... [flags] ### Examples ``` -cscli contexts upgrade crowdsecurity/yyy crowdsecurity/zzz +# Upgrade some contexts. If they are not currently installed, they are downloaded but not installed. +cscli contexts upgrade crowdsecurity/bf_base crowdsecurity/fortinet + +# Show the execution plan without changing anything - compact output sorted by type and name. +cscli contexts upgrade crowdsecurity/bf_base crowdsecurity/fortinet --dry-run + +# Show the execution plan without changing anything - verbose output sorted by execution order. +cscli contexts upgrade crowdsecurity/bf_base crowdsecurity/fortinet --dry-run -o raw + +# Upgrade over tainted items. Can be used to restore or repair after local modifications or missing dependencies. +cscli contexts upgrade crowdsecurity/bf_base crowdsecurity/fortinet --force + +# Prompt for confirmation if running in an interactive terminal; otherwise, the option is ignored. +cscli contexts upgrade crowdsecurity/bf_base crowdsecurity/fortinet -i +cscli contexts upgrade crowdsecurity/bf_base crowdsecurity/fortinet --interactive ``` ### Options ``` - -a, --all Upgrade all the contexts - --force Force upgrade: overwrite tainted and outdated files - -h, --help help for upgrade + -a, --all Upgrade all the contexts + --dry-run Don't install or remove anything; print the execution plan + --force Force upgrade: overwrite tainted and outdated files + -h, --help help for upgrade + -i, --interactive Ask for confirmation before proceeding ``` ### Options inherited from parent commands diff --git a/crowdsec-docs/docs/cscli/cscli_dashboard_setup.md b/crowdsec-docs/docs/cscli/cscli_dashboard_setup.md index 544a7d3fd..777c25cc8 100644 --- a/crowdsec-docs/docs/cscli/cscli_dashboard_setup.md +++ b/crowdsec-docs/docs/cscli/cscli_dashboard_setup.md @@ -28,6 +28,7 @@ cscli dashboard setup -l 0.0.0.0 -p 443 --password ``` -d, --dir string Shared directory with metabase container + -e, --env strings Additional environment variables to pass to the metabase container -f, --force Force setup : override existing files -h, --help help for setup -l, --listen string Listen address of container (default "127.0.0.1") diff --git a/crowdsec-docs/docs/cscli/cscli_decisions_import.md b/crowdsec-docs/docs/cscli/cscli_decisions_import.md index 5b88b650e..d5589a46e 100644 --- a/crowdsec-docs/docs/cscli/cscli_decisions_import.md +++ b/crowdsec-docs/docs/cscli/cscli_decisions_import.md @@ -10,7 +10,7 @@ Import decisions from a file or pipe expected format: csv : any of duration,reason,scope,type,value, with a header line -json :`{"duration" : "24h", "reason" : "my_scenario", "scope" : "ip", "type" : "ban", "value" : "x.y.z.z"}` +json :`{"duration": "24h", "reason": "my_scenario", "scope": "ip", "type": "ban", "value": "x.y.z.z"}` ``` cscli decisions import [options] [flags] @@ -26,7 +26,7 @@ duration,scope,value $ cscli decisions import -i decisions.csv decisions.json: -[{"duration" : "4h", "scope" : "ip", "type" : "ban", "value" : "1.2.3.4"}] +[{"duration": "4h", "scope": "ip", "type": "ban", "value": "1.2.3.4"}] The file format is detected from the extension, but can be forced with the --format option which is required when reading from standard input. diff --git a/crowdsec-docs/docs/cscli/cscli_hub_list.md b/crowdsec-docs/docs/cscli/cscli_hub_list.md index e693b5f3e..9dba9a019 100644 --- a/crowdsec-docs/docs/cscli/cscli_hub_list.md +++ b/crowdsec-docs/docs/cscli/cscli_hub_list.md @@ -13,7 +13,7 @@ cscli hub list [-a] [flags] ### Options ``` - -a, --all List disabled items as well + -a, --all List all available items, including those not installed -h, --help help for list ``` diff --git a/crowdsec-docs/docs/cscli/cscli_hub_update.md b/crowdsec-docs/docs/cscli/cscli_hub_update.md index e988cd1c8..8fecf11e4 100644 --- a/crowdsec-docs/docs/cscli/cscli_hub_update.md +++ b/crowdsec-docs/docs/cscli/cscli_hub_update.md @@ -16,6 +16,16 @@ Fetches the .index.json file from the hub, containing the list of available conf cscli hub update [flags] ``` +### Examples + +``` +# Download the last version of the index file. +cscli hub update + +# Download a 4x bigger version with all item contents (effectively pre-caching item downloads, but not data files). +cscli hub update --with-content +``` + ### Options ``` diff --git a/crowdsec-docs/docs/cscli/cscli_hub_upgrade.md b/crowdsec-docs/docs/cscli/cscli_hub_upgrade.md index b7acee640..75f8a4732 100644 --- a/crowdsec-docs/docs/cscli/cscli_hub_upgrade.md +++ b/crowdsec-docs/docs/cscli/cscli_hub_upgrade.md @@ -16,11 +16,27 @@ Upgrade all configs installed from Crowdsec Hub. Run 'sudo cscli hub update' if cscli hub upgrade [flags] ``` +### Examples + +``` +# Upgrade all the collections, scenarios etc. to the latest version in the downloaded index. Update data files too. +cscli hub upgrade + +# Upgrade tainted items as well; force re-download of data files. +cscli hub upgrade --force + +# Prompt for confirmation if running in an interactive terminal; otherwise, the option is ignored. +cscli hub upgrade --interactive +cscli hub upgrade -i +``` + ### Options ``` - --force Force upgrade: overwrite tainted and outdated files - -h, --help help for upgrade + --dry-run Don't install or remove anything; print the execution plan + --force Force upgrade: overwrite tainted and outdated items; always update data files + -h, --help help for upgrade + -i, --interactive Ask for confirmation before proceeding ``` ### Options inherited from parent commands diff --git a/crowdsec-docs/docs/cscli/cscli_hubtest_explain.md b/crowdsec-docs/docs/cscli/cscli_hubtest_explain.md index b0ec017f3..d00865042 100644 --- a/crowdsec-docs/docs/cscli/cscli_hubtest_explain.md +++ b/crowdsec-docs/docs/cscli/cscli_hubtest_explain.md @@ -13,7 +13,9 @@ cscli hubtest explain [flags] ### Options ``` - -h, --help help for explain + --failures Only show failed lines + -h, --help help for explain + -v, --verbose Display individual changes ``` ### Options inherited from parent commands diff --git a/crowdsec-docs/docs/cscli/cscli_machines_add.md b/crowdsec-docs/docs/cscli/cscli_machines_add.md index a149be94d..46c9431ec 100644 --- a/crowdsec-docs/docs/cscli/cscli_machines_add.md +++ b/crowdsec-docs/docs/cscli/cscli_machines_add.md @@ -28,9 +28,9 @@ cscli machines add -f- --auto > /tmp/mycreds.yaml ``` -a, --auto automatically generate password (and username if not provided) -f, --file string output file destination (defaults to /etc/crowdsec/local_api_credentials.yaml) - --force will force add the machine if it already exist + --force will force add the machine if it already exists -h, --help help for add - -i, --interactive interfactive mode to enter the password + -i, --interactive interactive mode to enter the password -p, --password string machine password to login to the API -u, --url string URL of the local API ``` diff --git a/crowdsec-docs/docs/cscli/cscli_parsers_inspect.md b/crowdsec-docs/docs/cscli/cscli_parsers_inspect.md index fc3fdab69..d171c8b0a 100644 --- a/crowdsec-docs/docs/cscli/cscli_parsers_inspect.md +++ b/crowdsec-docs/docs/cscli/cscli_parsers_inspect.md @@ -17,7 +17,17 @@ cscli parsers inspect [item]... [flags] ### Examples ``` +# Display metadata, state, metrics and ancestor collections of parsers (installed or not). cscli parsers inspect crowdsecurity/httpd-logs crowdsecurity/sshd-logs + +# Don't collect metrics (avoid error if crowdsec is not running). +cscli parsers inspect crowdsecurity/httpd-logs --no-metrics + +# Display difference between a tainted item and the latest one. +cscli parsers inspect crowdsecurity/httpd-logs --diff + +# Reverse the above diff +cscli parsers inspect crowdsecurity/httpd-logs --diff --rev ``` ### Options diff --git a/crowdsec-docs/docs/cscli/cscli_parsers_install.md b/crowdsec-docs/docs/cscli/cscli_parsers_install.md index 5d8f6a4c9..93e10fae7 100644 --- a/crowdsec-docs/docs/cscli/cscli_parsers_install.md +++ b/crowdsec-docs/docs/cscli/cscli_parsers_install.md @@ -17,16 +17,35 @@ cscli parsers install [item]... [flags] ### Examples ``` +# Install some parsers. cscli parsers install crowdsecurity/caddy-logs crowdsecurity/sshd-logs + +# Show the execution plan without changing anything - compact output sorted by type and name. +cscli parsers install crowdsecurity/caddy-logs crowdsecurity/sshd-logs --dry-run + +# Show the execution plan without changing anything - verbose output sorted by execution order. +cscli parsers install crowdsecurity/caddy-logs crowdsecurity/sshd-logs --dry-run -o raw + +# Download only, to be installed later. +cscli parsers install crowdsecurity/caddy-logs crowdsecurity/sshd-logs --download-only + +# Install over tainted items. Can be used to restore or repair after local modifications or missing dependencies. +cscli parsers install crowdsecurity/caddy-logs crowdsecurity/sshd-logs --force + +# Prompt for confirmation if running in an interactive terminal; otherwise, the option is ignored. +cscli parsers install crowdsecurity/caddy-logs crowdsecurity/sshd-logs -i +cscli parsers install crowdsecurity/caddy-logs crowdsecurity/sshd-logs --interactive ``` ### Options ``` -d, --download-only Only download packages, don't enable + --dry-run Don't install or remove anything; print the execution plan --force Force install: overwrite tainted and outdated files -h, --help help for install --ignore Ignore errors when installing multiple parsers + -i, --interactive Ask for confirmation before proceeding ``` ### Options inherited from parent commands diff --git a/crowdsec-docs/docs/cscli/cscli_parsers_list.md b/crowdsec-docs/docs/cscli/cscli_parsers_list.md index 9cb7b3f96..2cbf7f903 100644 --- a/crowdsec-docs/docs/cscli/cscli_parsers_list.md +++ b/crowdsec-docs/docs/cscli/cscli_parsers_list.md @@ -17,11 +17,14 @@ cscli parsers list [item... | -a] [flags] ### Examples ``` +# List enabled (installed) parsers. cscli parsers list + +# List all available parsers (installed or not). cscli parsers list -a -cscli parsers list crowdsecurity/caddy-logs crowdsecurity/sshd-logs -List only enabled parsers unless "-a" or names are specified. +# List specific parsers (installed or not). +cscli parsers list crowdsecurity/caddy-logs crowdsecurity/sshd-logs ``` ### Options diff --git a/crowdsec-docs/docs/cscli/cscli_parsers_remove.md b/crowdsec-docs/docs/cscli/cscli_parsers_remove.md index c2bbdcb03..3c57e83ed 100644 --- a/crowdsec-docs/docs/cscli/cscli_parsers_remove.md +++ b/crowdsec-docs/docs/cscli/cscli_parsers_remove.md @@ -17,16 +17,35 @@ cscli parsers remove [item]... [flags] ### Examples ``` +# Uninstall some parsers. cscli parsers remove crowdsecurity/caddy-logs crowdsecurity/sshd-logs + +# Show the execution plan without changing anything - compact output sorted by type and name. +cscli parsers remove crowdsecurity/caddy-logs crowdsecurity/sshd-logs --dry-run + +# Show the execution plan without changing anything - verbose output sorted by execution order. +cscli parsers remove crowdsecurity/caddy-logs crowdsecurity/sshd-logs --dry-run -o raw + +# Uninstall and also remove the downloaded files. +cscli parsers remove crowdsecurity/caddy-logs crowdsecurity/sshd-logs --purge + +# Remove tainted items. +cscli parsers remove crowdsecurity/caddy-logs crowdsecurity/sshd-logs --force + +# Prompt for confirmation if running in an interactive terminal; otherwise, the option is ignored. +cscli parsers remove crowdsecurity/caddy-logs crowdsecurity/sshd-logs -i +cscli parsers remove crowdsecurity/caddy-logs crowdsecurity/sshd-logs --interactive ``` ### Options ``` - --all Remove all the parsers - --force Force remove: remove tainted and outdated files - -h, --help help for remove - --purge Delete source file too + --all Remove all the parsers + --dry-run Don't install or remove anything; print the execution plan + --force Force remove: remove tainted and outdated files + -h, --help help for remove + -i, --interactive Ask for confirmation before proceeding + --purge Delete source file too ``` ### Options inherited from parent commands diff --git a/crowdsec-docs/docs/cscli/cscli_parsers_upgrade.md b/crowdsec-docs/docs/cscli/cscli_parsers_upgrade.md index 986967f06..2ea61a8ab 100644 --- a/crowdsec-docs/docs/cscli/cscli_parsers_upgrade.md +++ b/crowdsec-docs/docs/cscli/cscli_parsers_upgrade.md @@ -17,15 +17,31 @@ cscli parsers upgrade [item]... [flags] ### Examples ``` +# Upgrade some parsers. If they are not currently installed, they are downloaded but not installed. cscli parsers upgrade crowdsecurity/caddy-logs crowdsecurity/sshd-logs + +# Show the execution plan without changing anything - compact output sorted by type and name. +cscli parsers upgrade crowdsecurity/caddy-logs crowdsecurity/sshd-logs --dry-run + +# Show the execution plan without changing anything - verbose output sorted by execution order. +cscli parsers upgrade crowdsecurity/caddy-logs crowdsecurity/sshd-logs --dry-run -o raw + +# Upgrade over tainted items. Can be used to restore or repair after local modifications or missing dependencies. +cscli parsers upgrade crowdsecurity/caddy-logs crowdsecurity/sshd-logs --force + +# Prompt for confirmation if running in an interactive terminal; otherwise, the option is ignored. +cscli parsers upgrade crowdsecurity/caddy-logs crowdsecurity/sshd-logs -i +cscli parsers upgrade crowdsecurity/caddy-logs crowdsecurity/sshd-logs --interactive ``` ### Options ``` - -a, --all Upgrade all the parsers - --force Force upgrade: overwrite tainted and outdated files - -h, --help help for upgrade + -a, --all Upgrade all the parsers + --dry-run Don't install or remove anything; print the execution plan + --force Force upgrade: overwrite tainted and outdated files + -h, --help help for upgrade + -i, --interactive Ask for confirmation before proceeding ``` ### Options inherited from parent commands diff --git a/crowdsec-docs/docs/cscli/cscli_postoverflows_inspect.md b/crowdsec-docs/docs/cscli/cscli_postoverflows_inspect.md index 561b25720..1967a8fcc 100644 --- a/crowdsec-docs/docs/cscli/cscli_postoverflows_inspect.md +++ b/crowdsec-docs/docs/cscli/cscli_postoverflows_inspect.md @@ -17,7 +17,14 @@ cscli postoverflows inspect [item]... [flags] ### Examples ``` -cscli postoverflows inspect crowdsecurity/cdn-whitelist crowdsecurity/rdns +# Display metadata, state and ancestor collections of postoverflows (installed or not). +cscli postoverflows inspect crowdsecurity/cdn-whitelist + +# Display difference between a tainted item and the latest one. +cscli postoverflows inspect crowdsecurity/cdn-whitelist --diff + +# Reverse the above diff +cscli postoverflows inspect crowdsecurity/cdn-whitelist --diff --rev ``` ### Options diff --git a/crowdsec-docs/docs/cscli/cscli_postoverflows_install.md b/crowdsec-docs/docs/cscli/cscli_postoverflows_install.md index fb1e27ea0..2058dd5af 100644 --- a/crowdsec-docs/docs/cscli/cscli_postoverflows_install.md +++ b/crowdsec-docs/docs/cscli/cscli_postoverflows_install.md @@ -17,16 +17,35 @@ cscli postoverflows install [item]... [flags] ### Examples ``` +# Install some postoverflows. cscli postoverflows install crowdsecurity/cdn-whitelist crowdsecurity/rdns + +# Show the execution plan without changing anything - compact output sorted by type and name. +cscli postoverflows install crowdsecurity/cdn-whitelist crowdsecurity/rdns --dry-run + +# Show the execution plan without changing anything - verbose output sorted by execution order. +cscli postoverflows install crowdsecurity/cdn-whitelist crowdsecurity/rdns --dry-run -o raw + +# Download only, to be installed later. +cscli postoverflows install crowdsecurity/cdn-whitelist crowdsecurity/rdns --download-only + +# Install over tainted items. Can be used to restore or repair after local modifications or missing dependencies. +cscli postoverflows install crowdsecurity/cdn-whitelist crowdsecurity/rdns --force + +# Prompt for confirmation if running in an interactive terminal; otherwise, the option is ignored. +cscli postoverflows install crowdsecurity/cdn-whitelist crowdsecurity/rdns -i +cscli postoverflows install crowdsecurity/cdn-whitelist crowdsecurity/rdns --interactive ``` ### Options ``` -d, --download-only Only download packages, don't enable + --dry-run Don't install or remove anything; print the execution plan --force Force install: overwrite tainted and outdated files -h, --help help for install --ignore Ignore errors when installing multiple postoverflows + -i, --interactive Ask for confirmation before proceeding ``` ### Options inherited from parent commands diff --git a/crowdsec-docs/docs/cscli/cscli_postoverflows_list.md b/crowdsec-docs/docs/cscli/cscli_postoverflows_list.md index 0fcc27372..ae6b10ba6 100644 --- a/crowdsec-docs/docs/cscli/cscli_postoverflows_list.md +++ b/crowdsec-docs/docs/cscli/cscli_postoverflows_list.md @@ -17,11 +17,14 @@ cscli postoverflows list [item... | -a] [flags] ### Examples ``` +# List enabled (installed) postoverflows. cscli postoverflows list + +# List all available postoverflows (installed or not). cscli postoverflows list -a -cscli postoverflows list crowdsecurity/cdn-whitelist crowdsecurity/rdns -List only enabled postoverflows unless "-a" or names are specified. +# List specific postoverflows (installed or not). +cscli postoverflows list crowdsecurity/cdn-whitelists crowdsecurity/rdns ``` ### Options diff --git a/crowdsec-docs/docs/cscli/cscli_postoverflows_remove.md b/crowdsec-docs/docs/cscli/cscli_postoverflows_remove.md index 4670d0b73..bf21a7db8 100644 --- a/crowdsec-docs/docs/cscli/cscli_postoverflows_remove.md +++ b/crowdsec-docs/docs/cscli/cscli_postoverflows_remove.md @@ -17,16 +17,35 @@ cscli postoverflows remove [item]... [flags] ### Examples ``` +# Uninstall some postoverflows. cscli postoverflows remove crowdsecurity/cdn-whitelist crowdsecurity/rdns + +# Show the execution plan without changing anything - compact output sorted by type and name. +cscli postoverflows remove crowdsecurity/cdn-whitelist crowdsecurity/rdns --dry-run + +# Show the execution plan without changing anything - verbose output sorted by execution order. +cscli postoverflows remove crowdsecurity/cdn-whitelist crowdsecurity/rdns --dry-run -o raw + +# Uninstall and also remove the downloaded files. +cscli postoverflows remove crowdsecurity/cdn-whitelist crowdsecurity/rdns --purge + +# Remove tainted items. +cscli postoverflows remove crowdsecurity/cdn-whitelist crowdsecurity/rdns --force + +# Prompt for confirmation if running in an interactive terminal; otherwise, the option is ignored. +cscli postoverflows remove crowdsecurity/cdn-whitelist crowdsecurity/rdns -i +cscli postoverflows remove crowdsecurity/cdn-whitelist crowdsecurity/rdns --interactive ``` ### Options ``` - --all Remove all the postoverflows - --force Force remove: remove tainted and outdated files - -h, --help help for remove - --purge Delete source file too + --all Remove all the postoverflows + --dry-run Don't install or remove anything; print the execution plan + --force Force remove: remove tainted and outdated files + -h, --help help for remove + -i, --interactive Ask for confirmation before proceeding + --purge Delete source file too ``` ### Options inherited from parent commands diff --git a/crowdsec-docs/docs/cscli/cscli_postoverflows_upgrade.md b/crowdsec-docs/docs/cscli/cscli_postoverflows_upgrade.md index 0cb1749d4..932b161a7 100644 --- a/crowdsec-docs/docs/cscli/cscli_postoverflows_upgrade.md +++ b/crowdsec-docs/docs/cscli/cscli_postoverflows_upgrade.md @@ -17,15 +17,31 @@ cscli postoverflows upgrade [item]... [flags] ### Examples ``` -cscli postoverflows upgrade crowdsecurity/cdn-whitelist crowdsecurity/rdns +# Upgrade some postoverflows. If they are not currently installed, they are downloaded but not installed. +cscli postoverflows upgrade crowdsecurity/cdn-whitelist crowdsecurity/rdnss + +# Show the execution plan without changing anything - compact output sorted by type and name. +cscli postoverflows upgrade crowdsecurity/cdn-whitelist crowdsecurity/rdnss --dry-run + +# Show the execution plan without changing anything - verbose output sorted by execution order. +cscli postoverflows upgrade crowdsecurity/cdn-whitelist crowdsecurity/rdnss --dry-run -o raw + +# Upgrade over tainted items. Can be used to restore or repair after local modifications or missing dependencies. +cscli postoverflows upgrade crowdsecurity/cdn-whitelist crowdsecurity/rdnss --force + +# Prompt for confirmation if running in an interactive terminal; otherwise, the option is ignored. +cscli postoverflows upgrade crowdsecurity/cdn-whitelist crowdsecurity/rdnss -i +cscli postoverflows upgrade crowdsecurity/cdn-whitelist crowdsecurity/rdnss --interactive ``` ### Options ``` - -a, --all Upgrade all the postoverflows - --force Force upgrade: overwrite tainted and outdated files - -h, --help help for upgrade + -a, --all Upgrade all the postoverflows + --dry-run Don't install or remove anything; print the execution plan + --force Force upgrade: overwrite tainted and outdated files + -h, --help help for upgrade + -i, --interactive Ask for confirmation before proceeding ``` ### Options inherited from parent commands diff --git a/crowdsec-docs/docs/cscli/cscli_scenarios_inspect.md b/crowdsec-docs/docs/cscli/cscli_scenarios_inspect.md index 40eeacd95..7c30a35a7 100644 --- a/crowdsec-docs/docs/cscli/cscli_scenarios_inspect.md +++ b/crowdsec-docs/docs/cscli/cscli_scenarios_inspect.md @@ -17,7 +17,17 @@ cscli scenarios inspect [item]... [flags] ### Examples ``` +# Display metadata, state, metrics and ancestor collections of scenarios (installed or not). cscli scenarios inspect crowdsecurity/ssh-bf crowdsecurity/http-probing + +# Don't collect metrics (avoid error if crowdsec is not running). +cscli scenarios inspect crowdsecurity/ssh-bf --no-metrics + +# Display difference between a tainted item and the latest one. +cscli scenarios inspect crowdsecurity/ssh-bf --diff + +# Reverse the above diff +cscli scenarios inspect crowdsecurity/ssh-bf --diff --rev ``` ### Options diff --git a/crowdsec-docs/docs/cscli/cscli_scenarios_install.md b/crowdsec-docs/docs/cscli/cscli_scenarios_install.md index 16029344e..20a6b0ef2 100644 --- a/crowdsec-docs/docs/cscli/cscli_scenarios_install.md +++ b/crowdsec-docs/docs/cscli/cscli_scenarios_install.md @@ -17,16 +17,35 @@ cscli scenarios install [item]... [flags] ### Examples ``` +# Install some scenarios. cscli scenarios install crowdsecurity/ssh-bf crowdsecurity/http-probing + +# Show the execution plan without changing anything - compact output sorted by type and name. +cscli scenarios install crowdsecurity/ssh-bf crowdsecurity/http-probing --dry-run + +# Show the execution plan without changing anything - verbose output sorted by execution order. +cscli scenarios install crowdsecurity/ssh-bf crowdsecurity/http-probing --dry-run -o raw + +# Download only, to be installed later. +cscli scenarios install crowdsecurity/ssh-bf crowdsecurity/http-probing --download-only + +# Install over tainted items. Can be used to restore or repair after local modifications or missing dependencies. +cscli scenarios install crowdsecurity/ssh-bf crowdsecurity/http-probing --force + +# Prompt for confirmation if running in an interactive terminal; otherwise, the option is ignored. +cscli scenarios install crowdsecurity/ssh-bf crowdsecurity/http-probing -i +cscli scenarios install crowdsecurity/ssh-bf crowdsecurity/http-probing --interactive ``` ### Options ``` -d, --download-only Only download packages, don't enable + --dry-run Don't install or remove anything; print the execution plan --force Force install: overwrite tainted and outdated files -h, --help help for install --ignore Ignore errors when installing multiple scenarios + -i, --interactive Ask for confirmation before proceeding ``` ### Options inherited from parent commands diff --git a/crowdsec-docs/docs/cscli/cscli_scenarios_list.md b/crowdsec-docs/docs/cscli/cscli_scenarios_list.md index 7d9ddadf1..2f3fb6793 100644 --- a/crowdsec-docs/docs/cscli/cscli_scenarios_list.md +++ b/crowdsec-docs/docs/cscli/cscli_scenarios_list.md @@ -17,11 +17,14 @@ cscli scenarios list [item... | -a] [flags] ### Examples ``` +# List enabled (installed) scenarios. cscli scenarios list + +# List all available scenarios (installed or not). cscli scenarios list -a -cscli scenarios list crowdsecurity/ssh-bf crowdsecurity/http-probing -List only enabled scenarios unless "-a" or names are specified. +# List specific scenarios (installed or not). +cscli scenarios list crowdsecurity/ssh-bf crowdsecurity/http-probing ``` ### Options diff --git a/crowdsec-docs/docs/cscli/cscli_scenarios_remove.md b/crowdsec-docs/docs/cscli/cscli_scenarios_remove.md index 49ad5a343..820186914 100644 --- a/crowdsec-docs/docs/cscli/cscli_scenarios_remove.md +++ b/crowdsec-docs/docs/cscli/cscli_scenarios_remove.md @@ -17,16 +17,35 @@ cscli scenarios remove [item]... [flags] ### Examples ``` +# Uninstall some scenarios. cscli scenarios remove crowdsecurity/ssh-bf crowdsecurity/http-probing + +# Show the execution plan without changing anything - compact output sorted by type and name. +cscli scenarios remove crowdsecurity/ssh-bf crowdsecurity/http-probing --dry-run + +# Show the execution plan without changing anything - verbose output sorted by execution order. +cscli scenarios remove crowdsecurity/ssh-bf crowdsecurity/http-probing --dry-run -o raw + +# Uninstall and also remove the downloaded files. +cscli scenarios remove crowdsecurity/ssh-bf crowdsecurity/http-probing --purge + +# Remove tainted items. +cscli scenarios remove crowdsecurity/ssh-bf crowdsecurity/http-probing --force + +# Prompt for confirmation if running in an interactive terminal; otherwise, the option is ignored. +cscli scenarios remove crowdsecurity/ssh-bf crowdsecurity/http-probing -i +cscli scenarios remove crowdsecurity/ssh-bf crowdsecurity/http-probing --interactive ``` ### Options ``` - --all Remove all the scenarios - --force Force remove: remove tainted and outdated files - -h, --help help for remove - --purge Delete source file too + --all Remove all the scenarios + --dry-run Don't install or remove anything; print the execution plan + --force Force remove: remove tainted and outdated files + -h, --help help for remove + -i, --interactive Ask for confirmation before proceeding + --purge Delete source file too ``` ### Options inherited from parent commands diff --git a/crowdsec-docs/docs/cscli/cscli_scenarios_upgrade.md b/crowdsec-docs/docs/cscli/cscli_scenarios_upgrade.md index d6c58d556..5a1b97623 100644 --- a/crowdsec-docs/docs/cscli/cscli_scenarios_upgrade.md +++ b/crowdsec-docs/docs/cscli/cscli_scenarios_upgrade.md @@ -17,15 +17,31 @@ cscli scenarios upgrade [item]... [flags] ### Examples ``` +# Upgrade some scenarios. If they are not currently installed, they are downloaded but not installed. cscli scenarios upgrade crowdsecurity/ssh-bf crowdsecurity/http-probing + +# Show the execution plan without changing anything - compact output sorted by type and name. +cscli scenarios upgrade crowdsecurity/ssh-bf crowdsecurity/http-probing --dry-run + +# Show the execution plan without changing anything - verbose output sorted by execution order. +cscli scenarios upgrade crowdsecurity/ssh-bf crowdsecurity/http-probing --dry-run -o raw + +# Upgrade over tainted items. Can be used to restore or repair after local modifications or missing dependencies. +cscli scenarios upgrade crowdsecurity/ssh-bf crowdsecurity/http-probing --force + +# Prompt for confirmation if running in an interactive terminal; otherwise, the option is ignored. +cscli scenarios upgrade crowdsecurity/ssh-bf crowdsecurity/http-probing -i +cscli scenarios upgrade crowdsecurity/ssh-bf crowdsecurity/http-probing --interactive ``` ### Options ``` - -a, --all Upgrade all the scenarios - --force Force upgrade: overwrite tainted and outdated files - -h, --help help for upgrade + -a, --all Upgrade all the scenarios + --dry-run Don't install or remove anything; print the execution plan + --force Force upgrade: overwrite tainted and outdated files + -h, --help help for upgrade + -i, --interactive Ask for confirmation before proceeding ``` ### Options inherited from parent commands diff --git a/crowdsec-docs/sidebars.js b/crowdsec-docs/sidebars.js index 095ee7d09..a5591cb84 100644 --- a/crowdsec-docs/sidebars.js +++ b/crowdsec-docs/sidebars.js @@ -455,9 +455,7 @@ module.exports = { id: "cscli/cscli_config", }, items: [ - "cscli/cscli_config_backup", "cscli/cscli_config_feature-flags", - "cscli/cscli_config_restore", "cscli/cscli_config_show", ], },