Phicode is a symbolic, mathematical syntax for Python that lets you write code in a more concise and expressive way using .φ files — while staying 100% compatible with standard Python.
With the Phicode VS Code extension you can:
- Write Python using symbols and mathematical notation.
- Run
.φfiles directly, or mix them seamlessly with.pyfiles in existing projects. - Convert back and forth between Phicode ⇆ Python at any time.
Simply install the runtime with:
pip install phicode…and you’re ready to use Phicode inside VS Code.
- Syntax highlighting for Phicode symbols and Python keywords
- Language configuration with auto-indentation and bracket matching
- File icon theme support for
.φfiles
- Code Formatting: Document and range formatting with configurable rules
- IntelliSense: Hover information, definition navigation, and reference finding
- Symbol Support: Document outline and workspace-wide symbol search
- Refactoring: Rename symbols across files with cross-language support
- Code Execution: Run & debug Phicode files
- Access the benchmark suite: Run benchmark suite
- Bidirectional Conversion: Convert between Python and Phicode syntax
- Smart Tokenization: Preserves strings and comments during conversion
- Interactive Tutorial: Comprehensive symbol reference with search functionality
- Code Snippets: 50+ templates for common Phicode patterns
- Configuration Support: Customizable symbol mappings and formatting options
- Python 3.8+
- Phicode runtime package
- Install the Phicode runtime:
pip install phicode- Install the extension from Visual Studio Code Marketplace:
- Open VS Code Extensions view (Ctrl+Shift+X)
- Search for "Phicode"
- Install the extension
Create a file with .φ extension:
# Phicode
ƒ calculate_sum(n):
total = 0
∀ i ∈ ⟪(n):
total += i
⟲ total
π(calculate_sum(10))# Python
def calculate_sum(n):
total = 0
for i in range(n):
total += i
return totalPhicode: Run File- Execute current Phicode filePhicode: Debug File- Debug current Phicode filePhicode: Convert to Phicode- Convert Python to Phicode syntaxPhicode: Convert to Python- Convert Phicode to Python syntaxPhicode: Show Tutorial- Display interactive symbol reference
- Right click in editor or on file
Convert to Python/Phicodefor quick conversion
Ctrl+Alt+P- Convert Python to PhicodeCtrl+Alt+Shift+P- Convert Phicode to Python
The extension supports configuration through VS Code settings:
{
"phicode.autoConvert": true,
"phicode.symbolHints": true,
"phicode.formatting.spaceAroundOperators": true,
"phicode.formatting.spaceAfterCommas": true
}- Visual Studio Code 1.74.0 or higher
- Python 3.8 or higher
- Phicode runtime package
- Custom Syntax Configuration
- Linting
- Symbol insert panel
- Local API connection to engine
- Documentation: Interactive tutorial included in extension
- Issues: GitHub Issues
- Source Code: GitHub Repository
