Skip to main content

Safely regenerate Cursor globalStorage telemetry fields in storage.json

Project description

Cursor storage reset

License: MIT Python 3.8+ PyPI

Repository: github.com/shivanshu814/cursor-storage-reset · Author: @shivanshu814

Small, tested, cross-platform utility. It regenerates these fields in Cursor’s storage.json:

  • telemetry.macMachineId
  • telemetry.machineId
  • telemetry.devDeviceId

Writes use an atomic replace (temp file + fsync) so a crash mid-save is unlikely to leave truncated JSON. Keys outside the telemetry trio are preserved.

Install

From PyPI (recommended)

pip install cursor-storage-reset

PyPI project: pypi.org/project/cursor-storage-reset.

From source

Clone (same name as on GitHub):

git clone https://github.com/shivanshu814/cursor-storage-reset.git
cd cursor-storage-reset

From the repository root (editable install for development):

python3 -m venv .venv
source .venv/bin/activate   # Windows: .venv\Scripts\activate
pip install -e ".[dev]"

Or install without dev tools:

pip install .

After install, the console entry point cursor-storage-reset is available.

Usage

# Use the default path for the current OS
cursor-storage-reset

# Custom file
cursor-storage-reset /path/to/storage.json

# Show the resolved default for this machine
cursor-storage-reset --print-default

python -m cursor_storage_reset --version

Restart Cursor after a successful run.

Default paths

OS Default storage.json
macOS ~/Library/Application Support/Cursor/User/globalStorage/storage.json
Linux $XDG_CONFIG_HOME/Cursor/User/globalStorage/storage.json, or ~/.config/... if unset
Windows %APPDATA%\Cursor\User\globalStorage\storage.json

Development

pip install -e ".[dev]"
pytest

Maintainer: publish to PyPI

  1. Create an account on pypi.org and an API token (scope: entire account or this project).
  2. Build and upload (do not commit the token):
pip install build twine
python -m build
twine check dist/*
TWINE_USERNAME=__token__ TWINE_PASSWORD=pypi-YOUR_TOKEN_HERE twine upload dist/*

Use TestPyPI first if you want a dry run (twine upload --repository testpypi dist/* after configuring ~/.pypirc).

Without storing a token in GitHub: enable Trusted Publishing on PyPI for project cursor-storage-reset, repository shivanshu814/cursor-storage-reset, workflow publish-pypi.yml. Then open Actions → Publish Python package to PyPI → Run workflow, or push a tag v1.0.0 to trigger a release build.

API

from pathlib import Path
from cursor_storage_reset import default_storage_path, refresh_telemetry_ids

refresh_telemetry_ids(Path("/explicit/storage.json"))
print(default_storage_path())

Responsibility

This tool only edits local files you point it at. You must follow Cursor’s terms of service and applicable law. Use for legitimate purposes (e.g. privacy, troubleshooting your own setup).

Layout

Path Role
src/cursor_storage_reset/paths.py Pure path resolution (testable per OS)
src/cursor_storage_reset/storage.py JSON load/save + atomic write + ID generation
src/cursor_storage_reset/cli.py argparse CLI
src/cursor_storage_reset/exceptions.py Narrow error types
tests/ Pytest coverage for paths + storage

Legacy root-level mac.py / linux.py / windows.py scripts were removed in favor of one cross-platform CLI and python -m cursor_storage_reset.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cursor_storage_reset-1.0.0.tar.gz (9.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cursor_storage_reset-1.0.0-py3-none-any.whl (9.0 kB view details)

Uploaded Python 3

File details

Details for the file cursor_storage_reset-1.0.0.tar.gz.

File metadata

  • Download URL: cursor_storage_reset-1.0.0.tar.gz
  • Upload date:
  • Size: 9.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.1

File hashes

Hashes for cursor_storage_reset-1.0.0.tar.gz
Algorithm Hash digest
SHA256 305965fd68bb28ddecb6798fb43a4006a79a3ee0dd198433f3435b65b13d69f6
MD5 f373042fcd96e7ab83d0869a67dfb8b7
BLAKE2b-256 e03a0c7f4fdb255551db8506c72d94d54826a04ecbc75ae53f72ddb5958fba46

See more details on using hashes here.

File details

Details for the file cursor_storage_reset-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for cursor_storage_reset-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f00ccab7ee1f1d764b488c381f5df82be21ea19a1acf4cbf93611f4aa08d20c6
MD5 afc856d8918c176466986911b494e601
BLAKE2b-256 0eead0749ea3b011524f361bc895df2d8c6a0192ca8dd0a97151bf8b2fc6a380

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page