Claude Code hook that auto-compiles PineScript files via TradingView API
Project description
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1c98749c5253214c42c454ffbee617b2ec9b8ec5ed19de5678e48819d9f40986
|
|
| MD5 |
a40202f6a2ec43fa6c75f112395236a6
|
|
| BLAKE2b-256 |
4265939f84aaed7332659c3637672a2fcdd403d9e3879c0ddeb9b0c0fdcd7270
|
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
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pinescript_claude_hook-0.1.0.tar.gz -
Subject digest:
1c98749c5253214c42c454ffbee617b2ec9b8ec5ed19de5678e48819d9f40986 - Sigstore transparency entry: 1180090175
- Sigstore integration time:
-
Permalink:
deepentropy/pinescript-claude-hook@dccc6af49ac95624ce94a604e23300db4bfc41c7 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/deepentropy
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-to-pypi.yml@dccc6af49ac95624ce94a604e23300db4bfc41c7 -
Trigger Event:
release
-
Statement type:
File details
Details for the file pinescript_claude_hook-0.1.0-py3-none-any.whl.
File metadata
- Download URL: pinescript_claude_hook-0.1.0-py3-none-any.whl
- Upload date:
- Size: 5.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b15076fa5b209c5c69a52655931bd1dc670fc57c78a42d11bbe5db236ea03938
|
|
| MD5 |
13e61d421bc2ad2d2ef5096fc659d49b
|
|
| BLAKE2b-256 |
99ddc73efb227730abaf9d6834f4c28a316b1f3efe308aaad064f14fb52ebcfc
|
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
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pinescript_claude_hook-0.1.0-py3-none-any.whl -
Subject digest:
b15076fa5b209c5c69a52655931bd1dc670fc57c78a42d11bbe5db236ea03938 - Sigstore transparency entry: 1180090183
- Sigstore integration time:
-
Permalink:
deepentropy/pinescript-claude-hook@dccc6af49ac95624ce94a604e23300db4bfc41c7 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/deepentropy
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-to-pypi.yml@dccc6af49ac95624ce94a604e23300db4bfc41c7 -
Trigger Event:
release
-
Statement type: