Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 713cdc4

Browse files
Merge pull request #1 from BandarLabs/opensource-prep
refactor: prepare project for open source release
2 parents bc12171 + 54f77ce commit 713cdc4

File tree

12 files changed

+118
-26
lines changed

12 files changed

+118
-26
lines changed

‎.gitignore‎

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@ coverage.xml
2929

3030
# Environment variables
3131
.env
32+
.env.local
33+
.env.development.local
34+
.env.test.local
35+
.env.production.local
3236

3337
# Editor directories and files
3438
.idea/
@@ -40,4 +44,22 @@ coverage.xml
4044
.DS_Store
4145

4246
# Windows
43-
Thumbs.db.env
47+
Thumbs.db
48+
49+
# Personal config files (use example files instead)
50+
claude_mcp_proxy/claude_desktop_config.json
51+
52+
# Runtime files
53+
*.pid
54+
*.sock
55+
*.log
56+
57+
# Uploads directory
58+
uploads/
59+
jupyter_runtime/
60+
61+
# Jupyter Notebook
62+
.ipynb_checkpoints
63+
64+
# Node modules (if any)
65+
node_modules/

‎CONTRIBUTING.md‎

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# Contributing to CodeRunner
2+
3+
Thank you for your interest in contributing to CodeRunner! We welcome contributions from the community.
4+
5+
## Getting Started
6+
7+
1. Fork the repository
8+
2. Clone your fork: `git clone https://github.com/YOUR_USERNAME/coderunner.git`
9+
3. Create a new branch: `git checkout -b feature/your-feature-name`
10+
4. Make your changes
11+
5. Test your changes thoroughly
12+
6. Commit your changes: `git commit -m "Add your feature"`
13+
7. Push to your fork: `git push origin feature/your-feature-name`
14+
8. Create a Pull Request
15+
16+
## Development Setup
17+
18+
1. Install dependencies: `pip install -r requirements.txt`
19+
2. Copy the example config: `cp claude_mcp_proxy/claude_desktop_config.example.json claude_mcp_proxy/claude_desktop_config.json`
20+
3. Update the config file with your local paths
21+
4. Follow the setup instructions in the README
22+
23+
## Code Style
24+
25+
- Follow PEP 8 for Python code
26+
- Use meaningful variable and function names
27+
- Add comments for complex logic
28+
- Write tests for new features
29+
30+
## Testing
31+
32+
- Ensure all existing tests pass
33+
- Add tests for new functionality
34+
- Test with different Python versions if possible
35+
36+
## Submitting Changes
37+
38+
- Keep commits focused and atomic
39+
- Write clear commit messages
40+
- Update documentation as needed
41+
- Ensure no sensitive information is included
42+
43+
## Questions?
44+
45+
Feel free to open an issue for questions or discussions about contributing.

‎Dockerfile.coderunner‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ RUN python -m bash_kernel.install
4242
# Copy the application code (main.py)
4343
COPY ./main.py /app/main.py
4444

45-
# Copy the application code (main.py)
46-
COPY ./mcp_main.py /app/mcp_main.py
45+
# Copy the application code (server.py)
46+
COPY ./server.py /app/server.py
4747

4848
# Create application/jupyter directories
4949
RUN mkdir -p /app/uploads /app/jupyter_runtime

‎LICENSE‎

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2024 CodeRunner
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

‎README.md‎

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,12 @@ container run \
4545
Finally, run the script from your terminal:
4646

4747
```bash
48-
git clone https://github.com/instavm/coderunner.git
48+
git clone https://github.com/BandarLabs/coderunner.git
4949
cd coderunner
50+
51+
# Configure Claude Desktop MCP integration (optional)
52+
cp claude_mcp_proxy/claude_desktop_config.example.json claude_mcp_proxy/claude_desktop_config.json
53+
# Edit the config file with your local paths
5054
```
5155

5256
Now you can give it prompts like `write python code to generate 100 primes` and watch it execute the code safely in the sandbox!
@@ -56,14 +60,14 @@ Now you can give it prompts like `write python code to generate 100 primes` and
5660
Download `mcphost` from [releases](https://github.com/mark3labs/mcphost/releases/tag/v0.14.0)
5761

5862
```bash
59-
cp cookbooks/.mcp.json ~/.mcp.json
63+
cp examples/.mcp.json ~/.mcp.json
6064
~/Downloads/mcphost_Darwin_arm64/mcphost -m ollama:llama3.1:8b
6165
```
6266

6367
### Can also run via python openai agents
6468

6569
```bash
66-
python cookbooks/openai_testmcp.py
70+
python examples/openai_client.py
6771
```
6872

6973
### Use via Curl
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"mcpServers": {
3+
"coderunner": {
4+
"command": "/path/to/your/python",
5+
"args": [
6+
"/path/to/coderunner/claude_mcp_proxy/mcp.py"
7+
]
8+
},
9+
"filesystem": {
10+
"command": "/path/to/your/node",
11+
"args": [
12+
"/path/to/mcp/filesystem/server",
13+
"/path/to/workspace1",
14+
"/path/to/workspace2"
15+
]
16+
}
17+
}
18+
}

‎claude_mcp_proxy/claude_desktop_config.json‎

Lines changed: 0 additions & 18 deletions
This file was deleted.

‎entrypoint.sh‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,4 +46,4 @@ echo $kernel_id > /app/uploads/python_kernel_id.txt
4646
# exec python mcp_main.py
4747

4848
# Start FastAPI application
49-
exec uvicorn mcp_main:app --host 0.0.0.0 --port 8222 --workers 1 --no-access-log
49+
exec uvicorn server:app --host 0.0.0.0 --port 8222 --workers 1 --no-access-log
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /