Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

scriptmonkey

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

scriptmonkey - pypi Package Compare versions

Comparing version
1.3.3
to
1.4.0
+40
-2
PKG-INFO
Metadata-Version: 2.1
Name: scriptmonkey
Version: 1.3.3
Version: 1.4.0
Summary: A Python package that generates complex software projects and fixes errors in your code using OpenAI's GPT API.

@@ -20,2 +20,3 @@ Home-page: https://github.com/lukerbs/ScriptMonkey

Requires-Dist: rich
Requires-Dist: pyperclip

@@ -112,3 +113,3 @@

- **Ask a question with files**:
- **Ask a question about specific local files**:

@@ -133,2 +134,39 @@ ```bash

### Copy Key Files and Project Details with `--copy`
ScriptMonkey's new `--copy` feature is designed to streamline the process of copying critical code files and project structure details into your clipboard, making it easier to ask questions to LLMs like ChatGPT or Claude. This feature formats the copied content in a neat way that includes file contents and the directory tree, making it simple to paste into a conversation for contextual help.
#### How to Use
- **Copy file contents directly**:
You can use the --copy flag to quickly copy the contents of specified files into your clipboard, neatly formatted for easy sharing with an LLM. When combined with the --files flag, ScriptMonkey will copy the contents of the selected files along with a complete directory tree of your project. This provides additional context, helping LLMs better understand your project’s structure:
```bash
scriptmonkey --copy --files path/to/file1.py path/to/file2.js
```
Your files and project directory tree are automatically copied to your clipboard in the format:
```
- - - - - - - - - -
Here are some details about the project.
# path/to/file1.py
<content from file1.py>
- - - - - - - - - -
# path/to/file2.js
<content from file2.js>
- - - - - - - - - -
# PROJECT TREE
<directory structure>
```
### Error Handling with `scriptmonkey.run()`

@@ -135,0 +173,0 @@

@@ -91,3 +91,3 @@

- **Ask a question with files**:
- **Ask a question about specific local files**:

@@ -112,2 +112,39 @@ ```bash

### Copy Key Files and Project Details with `--copy`
ScriptMonkey's new `--copy` feature is designed to streamline the process of copying critical code files and project structure details into your clipboard, making it easier to ask questions to LLMs like ChatGPT or Claude. This feature formats the copied content in a neat way that includes file contents and the directory tree, making it simple to paste into a conversation for contextual help.
#### How to Use
- **Copy file contents directly**:
You can use the --copy flag to quickly copy the contents of specified files into your clipboard, neatly formatted for easy sharing with an LLM. When combined with the --files flag, ScriptMonkey will copy the contents of the selected files along with a complete directory tree of your project. This provides additional context, helping LLMs better understand your project’s structure:
```bash
scriptmonkey --copy --files path/to/file1.py path/to/file2.js
```
Your files and project directory tree are automatically copied to your clipboard in the format:
```
- - - - - - - - - -
Here are some details about the project.
# path/to/file1.py
<content from file1.py>
- - - - - - - - - -
# path/to/file2.js
<content from file2.js>
- - - - - - - - - -
# PROJECT TREE
<directory structure>
```
### Error Handling with `scriptmonkey.run()`

@@ -114,0 +151,0 @@

Metadata-Version: 2.1
Name: scriptmonkey
Version: 1.3.3
Version: 1.4.0
Summary: A Python package that generates complex software projects and fixes errors in your code using OpenAI's GPT API.

@@ -20,2 +20,3 @@ Home-page: https://github.com/lukerbs/ScriptMonkey

Requires-Dist: rich
Requires-Dist: pyperclip

@@ -112,3 +113,3 @@

- **Ask a question with files**:
- **Ask a question about specific local files**:

@@ -133,2 +134,39 @@ ```bash

### Copy Key Files and Project Details with `--copy`
ScriptMonkey's new `--copy` feature is designed to streamline the process of copying critical code files and project structure details into your clipboard, making it easier to ask questions to LLMs like ChatGPT or Claude. This feature formats the copied content in a neat way that includes file contents and the directory tree, making it simple to paste into a conversation for contextual help.
#### How to Use
- **Copy file contents directly**:
You can use the --copy flag to quickly copy the contents of specified files into your clipboard, neatly formatted for easy sharing with an LLM. When combined with the --files flag, ScriptMonkey will copy the contents of the selected files along with a complete directory tree of your project. This provides additional context, helping LLMs better understand your project’s structure:
```bash
scriptmonkey --copy --files path/to/file1.py path/to/file2.js
```
Your files and project directory tree are automatically copied to your clipboard in the format:
```
- - - - - - - - - -
Here are some details about the project.
# path/to/file1.py
<content from file1.py>
- - - - - - - - - -
# path/to/file2.js
<content from file2.js>
- - - - - - - - - -
# PROJECT TREE
<directory structure>
```
### Error Handling with `scriptmonkey.run()`

@@ -135,0 +173,0 @@

@@ -6,1 +6,2 @@ openai

rich
pyperclip

@@ -24,2 +24,3 @@ import sys

import platform
import pyperclip

@@ -529,2 +530,30 @@ import re

def copy_files_to_clipboard(file_paths, include_tree=True):
"""
Reads the content from the specified files and copies it to the clipboard in the specified format.
Optionally includes a project directory tree.
"""
formatted_output = "- - - - - - - - - -\nHere are some details about the project.\n\n"
for path in file_paths:
try:
content = read_file(path)
formatted_output += f"# {path}\n{content}\n\n- - - - - - - - - -\n"
except FileNotFoundError:
console.print(f"[bold yellow]Warning: {path} not found. Skipping this file.[/bold yellow]")
except Exception as e:
console.print(f"[bold red]Error reading {path}: {e}[/bold red]")
# Include the directory tree if requested
if include_tree:
start_directory = os.getcwd()
tree = generate_directory_tree(start_directory)
formatted_output += "- - - - - - - - - -\n\n# PROJECT TREE\n"
formatted_output += f"{tree}\n\n"
# Copy the formatted output to the clipboard
pyperclip.copy(formatted_output)
console.print("[green]🐒 Content has been copied to the clipboard.[/green]")
def handle_no_prompt():

@@ -541,2 +570,5 @@ print(f"\nNo Prompt Provided (Tip: Did you save before closing the editor?).\n🐒 Quitting ScriptMonkey...\n")

parser.add_argument("--set-api-key", help="Set the OpenAI API key", action="store_true")
parser.add_argument(
"--copy", help="Copy the content of the specified files to the clipboard", action="store_true"
) # New --copy flag
args = parser.parse_args()

@@ -551,2 +583,12 @@

if args.copy:
# Handle the --copy functionality
file_paths = args.files if args.files else []
if not file_paths:
console.print("[bold red]❌ No files specified to copy. Use --files to specify file paths.[/bold red]")
return
include_tree = args.tree
copy_files_to_clipboard(file_paths)
return
if args.ask is not None:

@@ -553,0 +595,0 @@ # Handle the --ask functionality

+2
-2

@@ -5,3 +5,3 @@ from setuptools import setup, find_packages

name="scriptmonkey",
version="1.3.3",
version="1.4.0",
description="A Python package that generates complex software projects and fixes errors in your code using OpenAI's GPT API.",

@@ -15,3 +15,3 @@ long_description=open("README.md", "r").read(),

packages=find_packages(),
install_requires=["openai", "pydantic", "tqdm", "python-dotenv", "rich"],
install_requires=["openai", "pydantic", "tqdm", "python-dotenv", "rich", "pyperclip"],
python_requires=">=3.6",

@@ -18,0 +18,0 @@ entry_points={