Developer Tools
Prism provides a comprehensive set of tools for developing, testing, and deploying uncertainty-aware applications.
🛠️ Available Tools
Command Line Interface (CLI)
The primary way to run Prism programs and interact with the language.
npm install -g @prism-lang/cli
prism run my-script.prism
Features:
- Execute
.prism
files - Evaluate expressions directly
- Launch interactive REPL
- Configure LLM providers
Interactive REPL
Experiment with Prism code in real-time with immediate feedback.
prism repl
# or just
prism
Features:
- Interactive evaluation
- Variable persistence
- Command history
- Session statistics
- Multi-line input
VS Code Extension
Full language support in Visual Studio Code with syntax highlighting and themes.
# Install from GitHub release
curl -L https://github.com/HaruHunab1320/Prism-TS/releases/download/v0.1.0/prism-lang-0.1.0.vsix -o prism-lang.vsix
code --install-extension prism-lang.vsix
Features:
- Syntax highlighting for all Prism features
- Semantic colors for confidence operators
- Light and dark themes
- Auto-indentation and bracket matching
🚀 Quick Start
-
Install the CLI
npm install -g @prism-lang/cli
-
Install VS Code Extension
curl -L https://github.com/HaruHunab1320/Prism-TS/releases/download/v0.1.0/prism-lang-0.1.0.vsix -o prism-lang.vsix
code --install-extension prism-lang.vsix
rm prism-lang.vsix -
Create your first program
// hello.prism
greeting = llm("Say hello!") ~> 0.9
console.log(greeting) -
Run it
prism run hello.prism
🔧 Configuration
Environment Variables
Configure LLM providers for AI capabilities:
# .env file
CLAUDE_API_KEY=your-claude-key
GEMINI_API_KEY=your-gemini-key
PRISM_DEFAULT_LLM=claude
VS Code Settings
{
"files.associations": {
"*.prism": "prism"
},
"[prism]": {
"editor.formatOnSave": true
}
}
📚 Tool Integration
The tools work seamlessly together:
- Write code in VS Code with syntax highlighting
- Test expressions in the REPL
- Run programs with the CLI
- Debug using console output and confidence tracking
🎯 Use Cases
Development Workflow
# 1. Start REPL for experimentation
prism
# 2