Discussion

Show HN: PineCone – A bundler for splitting PineScript into multiple files

I built a module bundler for PineScript (TradingView's scripting language).

The problem: TradingView doesn't support multi-file projects. As indicators grow complex, you end up with 1000+ line files that are painful to maintain.

Pinecone lets you split code across multiple .pine files using import/export directives, then bundles everything into a single TradingView-compatible script.

It handles automatic namespacing to prevent variable collisions between modules, deduplicates external library imports, and includes watch mode for development.

Built with Python. Uses the pynescript library for AST parsing and manipulation. I had to work around some upstream parser bugs with generic type syntax, which was an interesting challenge.

GitHub: https://github.com/claudianadalin/pinecone

Blog post with more technical details: https://www.claudianadalin.com/blog/building-pinecone

This is a niche tool, but if you've ever built complex TradingView indicators, you know the pain. Would love feedback on the approach.

2 points claudianadalin 10 months ago 0 comments

No comments yet

Be the first to share your thoughts.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton