Clear local configs
Removes two things to put the user back at first-run state:
${XDG_CONFIG_HOME:-~/.config}/agentic-analytics/bucket.json– runtime config init writes.- The
agentic-analyticsprofile in~/.aws/credentialsand~/.aws/config– the AWS creds the user set up viaaws configure.
Leaves the data lake at ${AGENTIC_ANALYTICS_DATA_DIR:-~/.local/share/agentic-analytics}/ (DPL parquet + catalog.duckdb, and the plugin's venv/) alone. Re-pulling DPL is slow; the lake is data, not config. To rebuild it, run /agentic-analytics:refresh-cache instead.
After running this, the init flow walks the user through setup again from scratch (asks for the bucket, walks them through aws configure).
Output discipline
This is a one-shot housekeeping flow. Output the verbatim line below at the start, run the script, then stop. Don't narrate the script output.
Steps
Resolve the plugin root. The snippet below assumes
$plugin_rootis set in that shell invocation:plugin_root="${CLAUDE_PLUGIN_ROOT:-${CURSOR_PLUGIN_ROOT:-<plugin-root>}}" plugin_python="${AGENTIC_ANALYTICS_VENV:-${AGENTIC_ANALYTICS_DATA_DIR:-$HOME/.local/share/agentic-analytics}/venv}/bin/python" [ -x "$plugin_python" ] || plugin_python="python3"<plugin-root>is the plugin's install directory – the directory two levels above this SKILL.md file. In a dev checkout of the source repo that'splugin/.$plugin_pythonis the plugin's isolated venv (created by the init flow at$AGENTIC_ANALYTICS_DATA_DIR/venv, default~/.local/share/agentic-analytics/venv); it falls back topython3if the venv doesn't exist yet.Announce. Output verbatim:
Clearing local agentic-analytics configs. Events cache stays put.
Run the script. It prints what was cleared (or
(nothing to clear)if everything was already gone):"$plugin_python" "$plugin_root/scripts/clear_configs.py"