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
- Python 3.11+
- Claude Code
Metadata
Release files for pinescript-claude-hook 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| pinescript_claude_hook-0.1.0.tar.gz | 4.0 kB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pinescript_claude_hook-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 9.0 kB
Release files / pinescript_claude_hook-0.1.0.tar.gz
| Download URL | pinescript_claude_hook-0.1.0.tar.gz |
|---|---|
| Size | 4.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1c98749c5253214c42c454ffbee617b2ec9b8ec5ed19de5678e48819d9f40986
|
|
BLAKE2b-256 checksum How to use checksums |
4265939f84aaed7332659c3637672a2fcdd403d9e3879c0ddeb9b0c0fdcd7270
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Mar 25, 2026.
Transparency logRelease files / pinescript_claude_hook-0.1.0-py3-none-any.whl
| Download URL | pinescript_claude_hook-0.1.0-py3-none-any.whl |
|---|---|
| Size | 5.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b15076fa5b209c5c69a52655931bd1dc670fc57c78a42d11bbe5db236ea03938
|
|
BLAKE2b-256 checksum How to use checksums |
99ddc73efb227730abaf9d6834f4c28a316b1f3efe308aaad064f14fb52ebcfc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Mar 25, 2026.
Transparency logSecurity for pinescript-claude-hook 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for pinescript_claude_hook-0.1.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Mar 25, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.