Skip to main content

shim

shim Guard

Local, offline privacy protection for coding-agent prompts.
getshim.tech

PyPI version CI Python versions License GitHub stars

shim Guard scans prompts through native client hooks before they reach the model. Safe prompts continue silently; detected values are replaced with typed placeholders such as <EMAIL_1>.

[!WARNING] shim Guard is alpha software and a best-effort guard, not a data-loss prevention boundary. Read the privacy limitations before using it with sensitive data.

Supported clients

Client Behavior when a value is detected
Codex CLI Blocks submission and creates a private redacted file to resubmit
Claude Code Blocks submission and creates a private redacted file to resubmit
GitHub Copilot CLI Replaces the model-facing prompt with the redacted text

shim Guard detects email addresses, phone numbers, credit cards, IBANs, IP and MAC addresses, US SSNs, Turkish national and tax IDs, secrets, and database URIs. Detection runs locally without an account, API key, network request, daemon, telemetry, or prompt history.

Install

shim Guard supports CPython 3.13 on macOS and Linux. Choose one package manager:

uv tool install --compile-bytecode shim-guard
# or
pipx install shim-guard

Preview and install the hook for your client:

shim install codex --dry-run
shim install codex
shim doctor codex

Replace codex with claude or copilot as needed. Run shim help for all commands.

Marketplace plugins

Codex and Claude Code users can install the repository's marketplace plugin after installing the CLI:

codex plugin marketplace add GetSHIM/shim-guard
codex plugin add shim-guard@shim-guard
/plugin marketplace add GetSHIM/shim-guard
/plugin install shim-guard@shim-guard

The marketplace plugin and shim install are alternative installation methods. Do not use both for the same client.

Use

Once the hook is installed, use your client normally. To inspect text directly, pipe it through scan or redact:

printf '%s' 'Contact me at alice@example.com' | shim scan
printf '%s' 'Contact me at alice@example.com' | shim redact

Both commands read standard input. Do not pass real prompts as command-line arguments, where they may be recorded in shell history or process listings.

Configure detection

All supported entity types are enabled by default. View or change the local policy with:

shim config
shim config --only EMAIL --only SECRET
shim config --disable IP_ADDRESS --disable MAC_ADDRESS
shim config --reset

Changes are previewed before they are saved. The CLI, installed hook, scan, and redact all use the same policy.

Privacy limitations

  • The host client receives the raw prompt before its hook runs, and other hooks may receive it concurrently.
  • Detection is best-effort and may miss sensitive values.
  • A disabled, untrusted, crashed, or timed-out hook may fail open according to client behavior.
  • Clients, providers, and other tools may retain data independently of shim.
  • Redacted temporary files may still contain missed sensitive content. Review them before resubmission and delete them when finished.

See Privacy for the full trust boundary and Compatibility for tested versions and evidence.

Uninstall

Remove shim Guard's hook before uninstalling the package:

shim revert codex

Replace codex with the client you installed.

Project documentation

License

Apache-2.0. See LICENSE.

Download files

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

Source Distribution

shim_guard-0.1.3.tar.gz (31.3 kB view details)

Uploaded Source

Built Distribution

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

shim_guard-0.1.3-py3-none-any.whl (45.9 kB view details)

Uploaded Python 3

File details

Details for the file shim_guard-0.1.3.tar.gz.

File metadata

  • Download URL: shim_guard-0.1.3.tar.gz
  • Upload date:
  • Size: 31.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for shim_guard-0.1.3.tar.gz
Algorithm Hash digest
SHA256 e69cf2f3e6b282c75bb7388c4ccc361853276b7d4ca7e90357c03791aec6c80a
MD5 081d3e74757db3a5e0efb94bd7503917
BLAKE2b-256 944ba202d0f58e20a64d3e187dccb13d1f0b7108b0707406dbb4270c8e22a408

See more details on using hashes here.

Provenance

The following attestation bundles were made for shim_guard-0.1.3.tar.gz:

Publisher: release.yml on GetSHIM/shim-guard

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file shim_guard-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: shim_guard-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 45.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for shim_guard-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 4589955ac06c01b986c2b27aea95f1861858cc4d772e40064bdf275bc3d714b6
MD5 2b6ac738514f9ba18c81807f1a3ff3d6
BLAKE2b-256 2408f98e0f542e89d06bc46283e32b9fb8a86879075aa574f5b431e0c34fa4ff

See more details on using hashes here.

Provenance

The following attestation bundles were made for shim_guard-0.1.3-py3-none-any.whl:

Publisher: release.yml on GetSHIM/shim-guard

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.1.3 This release

2 files

0.1.2

2 files

0.1.1

2 files

Supported by

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