Skip to main content

Claude Code hook that auto-compiles PineScript files via TradingView API

Project description

PineScript Auto-Compiler

PineScript Auto-Compiler for Claude Code

A Claude Code hook that automatically compiles .pine files against the TradingView API every time Claude edits or creates one.

Install

pip install pinescript-claude-hook

Then copy the hook config into your project:

git clone https://github.com/DeepEntropy/pinescript-claude-hook.git /tmp/pch
cp -r /tmp/pch/.claude your-project/.claude
rm -rf /tmp/pch

Or manually add to your .claude/settings.json:

{
  "hooks": {
    "PostToolUse": [
      {
        "matcher": "Edit|Write",
        "hooks": [
          {
            "type": "command",
            "command": "python .claude/hooks/compile-pine.py",
            "timeout": 30
          }
        ]
      }
    ]
  }
}

Open Claude Code in your project directory and the hook is active.

How it works

When Claude Code writes or edits a .pine file, the hook runs .claude/hooks/compile-pine.py, which calls the TradingView public compile API. Claude sees the result (errors, warnings, or success) and can fix issues immediately.

CLI usage

You can also compile files directly:

pinescript-compile path/to/file.pine

Requirements

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

pinescript_claude_hook-0.1.0.tar.gz (4.0 kB view details)

Uploaded Source

Built Distribution

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

pinescript_claude_hook-0.1.0-py3-none-any.whl (5.0 kB view details)

Uploaded Python 3

File details

Details for the file pinescript_claude_hook-0.1.0.tar.gz.

File metadata

  • Download URL: pinescript_claude_hook-0.1.0.tar.gz
  • Upload date:
  • Size: 4.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for pinescript_claude_hook-0.1.0.tar.gz
Algorithm Hash digest
SHA256 1c98749c5253214c42c454ffbee617b2ec9b8ec5ed19de5678e48819d9f40986
MD5 a40202f6a2ec43fa6c75f112395236a6
BLAKE2b-256 4265939f84aaed7332659c3637672a2fcdd403d9e3879c0ddeb9b0c0fdcd7270

See more details on using hashes here.

Provenance

The following attestation bundles were made for pinescript_claude_hook-0.1.0.tar.gz:

Publisher: publish-to-pypi.yml on deepentropy/pinescript-claude-hook

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

File details

Details for the file pinescript_claude_hook-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for pinescript_claude_hook-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b15076fa5b209c5c69a52655931bd1dc670fc57c78a42d11bbe5db236ea03938
MD5 13e61d421bc2ad2d2ef5096fc659d49b
BLAKE2b-256 99ddc73efb227730abaf9d6834f4c28a316b1f3efe308aaad064f14fb52ebcfc

See more details on using hashes here.

Provenance

The following attestation bundles were made for pinescript_claude_hook-0.1.0-py3-none-any.whl:

Publisher: publish-to-pypi.yml on deepentropy/pinescript-claude-hook

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

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