frappe-db-reset

frappe-db-reset is a command for Claude Code from Venkateshvenki404224/frappe-apps-manager. It costs 14 tokens per session (2,277 once invoked), scanned A, original, MIT.

A development command that removes and recreates a Frappe site’s database with fresh application data and fixtures. Fixtures are packaged sample or configuration records restored during setup.

In plain words
What is it for?
It is for resetting development or test data, backing up the existing database and files first, and choosing between a full reinstall or a data-only reset.
Why use it?
It provides a clean development environment while requiring backups and confirmation that the target is not a production site.

Command for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the frappe-apps-manager plugin — 16 skills, 16 commands, 3 hooks shipped together

Good fit It is for resetting development or test data, backing up the existing database and files first, and choosing between a full reinstall or a data-only reset.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/venkateshvenki404224/frappe-apps-manager/frappe-db-reset
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/Venkateshvenki404224/frappe-apps-manager

Made for: Claude Code.

Or install frappe-apps-manager, the plugin that ships this one along with the rest of its 16 skills, 16 commands, 3 hooks.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for frappe-db-reset

README.md
[![agentmods](https://agentmods.dev/badge/commands/venkateshvenki404224/frappe-apps-manager/frappe-db-reset/github.svg)](https://agentmods.dev/commands/venkateshvenki404224/frappe-apps-manager/frappe-db-reset)
Your own site
<a href="https://agentmods.dev/commands/venkateshvenki404224/frappe-apps-manager/frappe-db-reset"><img src="https://agentmods.dev/badge/commands/venkateshvenki404224/frappe-apps-manager/frappe-db-reset/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for frappe-db-reset

Your own site · 80×15
<a href="https://agentmods.dev/commands/venkateshvenki404224/frappe-apps-manager/frappe-db-reset"><img src="https://agentmods.dev/badge/commands/venkateshvenki404224/frappe-apps-manager/frappe-db-reset.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 14 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,277 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00014 $0.02277
Opus 5 $0.00007 $0.01138
Sonnet 5 $0.00003 $0.00455
Haiku 4.5 $0.00001 $0.00228

Measured 12d ago against content hash 656c2475308f, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

frappe-db-reset scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 12d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

frappe-apps-manager/commands/frappe-db-reset.md · 375 lines

How it starts

The opening of the file, as written. The whole thing — 375 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Frappe DB Reset Command

Reset and reinitialize Frappe database for development purposes with automatic backup and fresh data setup.

Steps to Execute

1. Verify Environment

  • Check if in valid Frappe bench
  • Verify site exists
  • WARNING: Confirm this is NOT a production site
  • Check for existing backups

2. Safety Checks

CRITICAL WARNINGS:

  • ⚠️ This operation DESTROYS ALL DATA
  • ⚠️ ONLY use on development/test sites
  • ⚠️ NEVER run on production sites
  • ⚠️ Always create backup first

Ask user to confirm:

  1. Is this a development/test site?
  2. Do they want to backup first?
  3. Do they understand all data will be lost?

Require explicit confirmation: "Type 'RESET' to confirm"

3. Pre-Reset Backup

Create Safety Backup:

bench --site [site-name] backup --with-files

Store backup location for user:

Backup created at:
- Database: sites/[site-name]/private/backups/[timestamp]-database.sql.gz
- Files: sites/[site-name]/private/backups/[timestamp]-files.tar

4. Reset Options

Offer reset approaches:

A. Full Reinstall (Recommended)

  • Drops and recreates database
  • Reinstalls all apps
  • Clean slate

B. Data Reset Only

  • Keeps app installations
  • Removes user data
  • Faster than full reinstall

C. Selective Reset

  • Reset specific DocTypes
  • Keep master data
  • Remove transactions only

5. Execute Full Reinstall

Full Site Reinstall:

# Reinstall site (drops DB and recreates)
bench --site [site-name] reinstall

# Or with options
bench --site [site-name] reinstall \
    --admin-password [password] \
    --mariadb-root-password [root-password] \
    --install-app erpnext \
    --verbose

This will:

  1. Drop existing database
  2. Create new database
  3. Install frappe app
  4. Install additional apps (if specified)
  5. Create Administrator user
  6. Set up default roles and permissions

6. Execute Data-Only Reset

Remove User Data:

# Via console
bench --site [site-name] console

# Get all DocTypes
exclude_core = ['User', 'Role', 'DocType', 'Module Def']

for doctype in frappe.get_all('DocType', pluck='name'):
    if doctype not in exclude_core:
        frappe.db.delete(doctype)

frappe.db.commit()

Read the full file on GitHub · 375 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 12d ago First seen · 375 lines · 14 tokens per session scan A 656c2475308f

Subscribe to this mod's changes

frappe-db-reset is a command published in the GitHub repository Venkateshvenki404224/frappe-apps-manager (27 stars, last pushed 3mo ago), licensed MIT. It adds 14 tokens to every session and 2,277 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.