Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Graphite Dev

Graphite Dev runs a local assistant with a visual workflow trace.
Graphite Dev provides a local assistant runtime with visual workflow tracing. The tool must be executed from the project root directory to function properly.

## Installation

Expand Down
7 changes: 3 additions & 4 deletions grafi_dev/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,16 @@ def _load_assistant(path: Path):
original_sys_path = sys.path.copy()

try:
# Add both the directory containing the script AND the project root to sys.path
# current working directory is project root
project_root = str(Path.cwd())

script_dir = str(abs_path.parent)
project_root = str(Path(__file__).parent.parent) # grafi-dev root directory

if script_dir not in sys.path:
sys.path.insert(0, script_dir)
if project_root not in sys.path:
sys.path.insert(0, project_root)

logger.debug(f"Modified sys.path: {sys.path}")

# Now load the module
spec = importlib.util.spec_from_file_location("user_code", abs_path)
mod = importlib.util.module_from_spec(spec)
Expand Down
8 changes: 7 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,20 @@ requires-python = ">=3.12"
dependencies = [
"fastapi>=0.115.12",
"grafi>=0.0.11",
"tavily-python>=0.7.1",
"typer>=0.15.3",
"uvicorn>=0.34.2",
]




[project.scripts]
grafi-dev = "grafi_dev.cli:app"

[tool.setuptools.package-data]
grafi_dev = ["frontend/*"]

[dependency-groups]
dev = [
"tavily-python>=0.7.2",
]
16 changes: 11 additions & 5 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.