CLI Reference
Pinecone provides a command-line interface for bundling your PineScript projects.
Commands
pinecone build
Bundle your PineScript files into a single output.
Options
| Option | Short | Description |
|---|---|---|
--config PATH |
-c |
Path to pine.config.json (default: ./pine.config.json) |
--watch |
-w |
Watch for file changes and rebuild automatically |
--copy |
Copy output to clipboard after build | |
--help |
Show help message |
Examples
Basic build:
Build with custom config:
Watch mode:
This will watch for changes in your source files and automatically rebuild when changes are detected. PressCtrl+C to stop.
Build and copy to clipboard:
After building, the output is automatically copied to your clipboard, ready to paste into TradingView.Combine options:
Watch for changes and copy to clipboard on each rebuild.pinecone --version
Show the current version of Pinecone.
pinecone --help
Show help information.
Exit Codes
| Code | Description |
|---|---|
| 0 | Success |
| 1 | Error (config not found, parse error, circular dependency, etc.) |
Error Messages
Config file not found
Solution: Create a pine.config.json file or use --config to specify the path.
Entry file not found
Solution: Check that the entry path in your config is correct.
Module not found
Solution: Check that the import path is correct and the file exists.
Export not found
Solution: Add // @export foo to the target file.
Circular dependency
Solution: Refactor your code to break the circular dependency.