๐ CodeRunner - Secure Multi-Language Code Execution
Execute, format, analyze, and generate code in multiple programming languages with built-in security sandboxing.
Language
1 30
Language
Language
Language
API Endpoints
This CodeRunner can be used as a HuggingChat tool with the following functions:
1. run_code(code: str, language: str, timeout: int = 10)
- Executes code safely in a sandboxed environment
- Supports: Python, JavaScript, TypeScript, Go, Rust, C, C++, Java, Bash
- Returns: execution result with output and timing
2. format_code(code: str, language: str)
- Formats and prettifies code
- Currently supports: Python (black), JavaScript (basic)
- Returns: formatted code string
3. analyze_code(code: str, language: str)
- Analyzes code for security issues and code quality
- Checks for dangerous patterns and common mistakes
- Returns: list of issues and recommendations
4. generate_code(prompt: str, language: str)
- Generates basic code templates from natural language
- Supports common patterns: functions, classes, API calls
- Returns: generated code template
Security Features
- Restricted Python execution environment
- Docker containerization for other languages
- Memory and CPU limits
- Network isolation
- Forbidden imports/commands detection