I am not able to reproduce this issue of cq-cli not being able to see other modules in the same directory. I created two files, box1.py and box2.py
box1.py:
> import cadquery as cq
> from box2 import make_box
>
> box1 = cq.Workplane().box(10, 10, 10)
> box2 = make_box()
>
> boxes = box1.union(box2)
>
> show_object(boxes)
box2.py
> import cadquery as cq
>
> def make_box():
> result = cq.Workplane().box(10, 10, 10).translate((5, 5, 5))
> return result
I then ran the following cq-cli command line and got proper looking STL output:
> ./cq-cli --codec stl --infile /path/to/box_example/box1.py