Skip to main content

AI Toolkit

A modular repository of specialized engineering and media tools, automation workflows, and AI agent skills designed for human–AI collaboration first, and autonomous automation where it shines.

3D CAD & Scene Viewer — Exploded Electronics Enclosure Assembly


Philosophy: Building Together With AI

The core idea behind AI Toolkit is that a person and an AI agent should be able to work side-by-side on the same live artifact — not treat AI as a black-box one-shot generator. Achieving full automation on a task is always a win, but real engineering and creative work is iterative: you want to inspect, sketch, tweak by hand, and hand control back and forth effortlessly.

That is why every tool in this repository pairs first-class manual & visual interfaces with machine-readable agent interfaces over the exact same state:

  • Shared Live Workspace: An artist or engineer can open the interactive 3D viewer, draw directly on a model with the 3D Scratchpad, expose custom per-scene UI controls (sliders, toggles, pose controls), or drag Auto-Rig Guide Pins and bones by hand — while an AI agent reads those exact strokes, parameters, and pins over CollabBridge (cad-bridge) and continues the work in real time.
  • Editable Pipelines, Not Black Boxes: Automated steps (such as auto-rigging, cavity solidification, or mesh slicing) produce transparent, editable intermediate states (e.g., draggable 3D Guide Pins, parametric scene scripts, and in-memory previews) so either the human or the agent can refine any detail before committing to disk.
  • In-Memory First, Save When Ready: Agents prototype, verify, and hot-reload changes in memory without touching your files until you review the result and ask to save.

Toolkits & Modules

Module PyPI Package Description Quick Links
AI-Toolkit Manager (ai_toolkit/) sanchousf-ai-toolkit Unified CLI (ai-toolkit) to install, update, inspect, uninstall subprojects, and install bundled AI agent skills. Installation • CLI Manager
3D CAD Toolkit (cad/) sanchousf-ai-toolkit-cad Hardware-accelerated 3D CAD viewer, procedural & parametric modeling, Manifold3D CSG booleans, SDF meshing, cavity solidification, skeletal rigging & FBX I/O, 3D printability analysis, and AI Agent CollabBridge. Documentation • Interactive Viewer • AI Bridge
Video Toolkit (video/) sanchousf-ai-toolkit-video Fast, lossless (zero-reencode) video container and audio/subtitle track manipulation CLI & Python API powered by MKVToolNix and FFmpeg. Documentation • Track Commands • Backend Setup

Installation & Quick Start

Install the lightweight ai-toolkit manager CLI (or include toolkits directly via extras):

# Install only the manager CLI
pip install sanchousf-ai-toolkit

# Or install along with specific toolkits
pip install "sanchousf-ai-toolkit[cad]"
pip install "sanchousf-ai-toolkit[cad-all]"   # includes optional remesh (pyvista) & blender (bpy)
pip install "sanchousf-ai-toolkit[video]"
pip install "sanchousf-ai-toolkit[all]"       # installs both CAD and Video toolkits

AI-Toolkit CLI Manager

Once installed, use the ai-toolkit command to manage subprojects and bundled AI agent skills:

# List available and installed subprojects (supports --installed and --json)
ai-toolkit list

# Install subprojects (supports extras such as cad[remesh], cad[all], or 'all')
ai-toolkit install cad video
ai-toolkit install all

# Update all installed subprojects (pass --self to also update sanchousf-ai-toolkit)
ai-toolkit update --self

# Install bundled AI agent skills for all installed subprojects
ai-toolkit install-skills                              # workspace scope, antigravity (default)
ai-toolkit install-skills --scope global --agent claude

# Preview any action without modifying packages or files
ai-toolkit install cad --dry-run

# Uninstall subprojects
ai-toolkit uninstall video -y

Install Agent Skills (skills.sh / npx skills)

All 7 bundled AI agent skills (cad-tool, cad-rigging, cad-macro-automator, cad-mesh-surgery, cad-slicer-sandbox, cad-visual-inspector, and video-tool) are exposed under .agents/skills/ for direct installation via skills.sh / npx skills (works with Antigravity, Claude Code, Cursor, Codex, and OpenCode):

# List all available skills in this repository
npx skills add sanchousf/ai-toolkit --list

# Install all skills, or pick specific ones
npx skills add sanchousf/ai-toolkit
npx skills add sanchousf/ai-toolkit --skill cad-tool --skill cad-rigging
npx skills add sanchousf/ai-toolkit --skill video-tool

Highlights

3D CAD Toolkit (cad/)

The CAD Toolkit provides an end-to-end 3D modeling, validation, and visualization suite built for autonomous AI agents and interactive engineering workflows:

  • Interactive 3D Viewport: Cross-platform Dear PyGui UI with hardware-accelerated OpenGL offscreen rendering (plus CPU fallback), adaptive camera navigation with pickable 3D orbit pivot (P / Alt+Click / Middle-Click), configurable selection highlight modes (AABB Box, Silhouette, Corner Brackets, Origin Halo, None), layered Workspace/Global editor settings (cad config), mouse bone & Guide Pin dragging with Shift+Click surface-midpoint placement, global Undo/Redo (Ctrl+Z / Ctrl+Y), live cross-section slicing planes, 3D scratchpad annotations with stroke eraser, and measurement calipers.
  • In-Memory Authoring & AI Agent CollabBridge: Zero-disk-footprint --code workflows and an HTTP JSON API + modular cad-bridge CLI (port 8765) supporting --then command chaining, push-code, new-scene, push-project, live cross-section slicing, cavity solidification, slice-center, scan-sections, rig-guides, auto-rig, rig-check, X-ray screenshot, drawings --json, topology diagnostics, and export.
  • Procedural & Parametric Modeling: Rich 3D primitives, 2D Sketch2D extrusions/revolves/sweeps/lofts, exact Manifold3D CSG booleans, assemblies with exploded views, geometry memoization, and universal FileModel loading (3MF, STL, OBJ, PLY, GLB, GLTF, FBX with per-material face groups & split_by_material=True, BLEND, and Python scenes) plus mesh.split_islands().
  • Collaborative Auto-Rigging, Skinning & IK: Guide-Pin Auto-Rig Pipeline (cad.core.rigging: auto-detects or seeds body, 5-finger, jaw/mouth, and eye pins from existing skeletons, with interactive Aim Pin volume-midpoint placement and L↔R branch mirroring), Dual Quaternion (DQS) & Linear Blend Skinning (LBS) with Geodesic Voxel Binding (voxel), Bone Heat Diffusion (heat), geodesic, and distance weights, 2-bone analytical & FABRIK IK, Rig Edit Mode, verify_rig diagnostics, X-ray multi-view contact sheets, and pure-Python Binary/ASCII FBX round-trip I/O.
  • Signed Distance Fields (SDF) & Cavity Solidification: Exact TriangleMeshSDF evaluation, smooth polynomial CSG blending, Marching Cubes & Dual Contouring meshing, hollow cavity detection (manifold, linear_slice, step_slice), and declarative SolidifyOp / CavitiesOp / PlugOp operators.
  • 3D Printability Analysis: Watertight/manifold checks, overhang & support volume estimation, 30+ printer build-volume presets (Creality K/Ender/CR, Bambu Lab, Prusa, Voron, Elegoo, Anycubic, Qidi, Sovol, Flashforge, RatRig), and --auto-orient optimization.
  • Bundled AI Agent Skills: Ships 6 installable agent skills (cad-tool, cad-rigging, cad-macro-automator, cad-mesh-surgery, cad-slicer-sandbox, cad-visual-inspector) and PEP 561 type stubs (.pyi).
Skeletal Rigging, Bone Gizmos & Weight Heatmap Live Cross-Section Slicing & Capped Cuts
Skeletal Rigging & Skinning Live Cross-Section Slicing

See cad/README.md for full documentation, CLI flags, and setup guides.

Video Toolkit (video/)

The Video Toolkit provides fast, lossless (zero-reencode) container and track editing for individual files or batch media libraries:

  • Zero Re-Encoding: Copies video, audio, and subtitle bitstreams directly at disk I/O speed via MKVToolNix (mkvmerge, mkvextract, mkvpropedit) for Matroska containers and FFmpeg (-c copy, ffprobe, with static-ffmpeg bundled fallback) for universal containers (.mp4, .mov, .ts, etc.).
  • Complete Track Workflow: video tracks supports info (--json), add, extract, remove, instant in-place MKV header edits via set-flags (including multi-track --spec), and short audio clipping via sample.
  • Smart Batch & Sidecar Automation: Parallel worker execution (-j/--jobs), terminal progress bar, --dry-run previews, atomic --in-place replacement, and --auto-sidecars with --sidecar-dir, --sidecar-recursive, --sidecar-rule glob/extension templates, and automatic script-based subtitle language detection.
  • Bundled Agent Skill & Setup Helper: Includes video setup to verify or install MKVToolNix and video --install-skills for the bundled video-tool skill.

See video/README.md for full CLI and Python API usage.


Repository Structure

ai-toolkit/
├── .github/
│   └── workflows/
│       ├── ai-toolkit.yml    # CI for root manager CLI & meta-package
│       ├── cad.yml           # CI for 3D CAD Toolkit
│       ├── video.yml         # CI for Video Toolkit
│       └── release.yml       # Build & PyPI Trusted Publishing for all packages
├── ai_toolkit/               # Root `ai-toolkit` manager CLI & subproject registry
│   ├── cli.py                # CLI entry point (`list`, `install`, `update`, `uninstall`, `install-skills`)
│   └── registry.py           # Subproject metadata & package resolution
├── cad/                      # 3D Computer-Aided Design & Procedural Modeling Toolkit
│   ├── README.md             # In-depth CAD documentation & CLI reference
│   ├── pyproject.toml        # `sanchousf-ai-toolkit-cad` package definition
│   ├── view.py               # Interactive 3D CAD viewer (`cad`, `cad-view`)
│   ├── save.py               # Headless scene exporter & snapshot generator (`cad-save`)
│   ├── check.py              # Headless scene validator & printability analyzer (`cad-check`)
│   ├── remesh.py             # Standalone mesh decimation & remeshing tool
│   ├── core/                 # Modeling, rendering, SDF, rigging, I/O, analysis & CollabBridge
│   ├── scene/                # BaseScene, geometry caching, in-memory loader & mock UI
│   ├── scenes/               # Demo scenes (assembly, parametric, polyline, skinning, SDF)
│   ├── skills/               # Bundled CAD AI agent skills & installer
│   ├── scripts/              # Cross-platform environment & OpenGL probe helpers
│   ├── ci/                   # CAD CI composite action
│   └── tests/                # Unit & integration test suite (>=90% coverage enforced)
├── video/                    # Lossless Video Container & Track Manipulation Toolkit
│   ├── README.md             # Video toolkit documentation & CLI reference
│   ├── pyproject.toml        # `sanchousf-ai-toolkit-video` package definition
│   ├── cli.py                # Unified `video` CLI entrypoint (`tracks`, `setup`, `install-skills`)
│   ├── tracks.py             # `video-tracks` CLI entrypoint
│   ├── core/                 # MKVToolNix/FFmpeg backends, discovery, models & operations
│   ├── skills/               # Bundled `video-tool` AI agent skill & installer
│   ├── ci/                   # Video CI composite action
│   └── tests/                # Unit & CLI tests with coverage
├── tests/                    # Unit tests for root `ai-toolkit` manager CLI
├── setup.py                  # Root `sanchousf-ai-toolkit` package configuration
├── pyproject.toml            # Build backend specification
└── LICENSE                   # MIT License

Contributing & Development

  1. Clone the repository:
    git clone https://github.com/sanchousf/ai-toolkit.git
    cd ai-toolkit
    
  2. Install and test any package locally:
    • Root CLI (ai-toolkit):
      pip install -e ".[dev]"
      pytest tests/ -v
      
    • 3D CAD Toolkit (cad/):
      • Linux / macOS / Termux: cd cad && ./setup_dev.sh && ./run_tests.sh
      • Windows: cd cad && setup_dev.bat && run_tests.bat
    • Video Toolkit (video/):
      cd video
      pip install -e ".[dev]"
      pytest -v --cov=core
      

Continuous Integration & Releases

  • Path-scoped GitHub Actions workflows validate ai_toolkit/, cad/, and video/ independently on pushes and pull requests to main, dev/**, and release/**.
  • Pull requests targeting main run on both Ubuntu and Windows; manual workflow_dispatch supports a run_full toggle to test across Linux, Windows, and macOS.
  • Publishing a GitHub Release triggers .github/workflows/release.yml, which builds, verifies (twine check), attaches artifacts, and publishes sanchousf-ai-toolkit-cad, sanchousf-ai-toolkit-video, and sanchousf-ai-toolkit to PyPI.

Metadata

Release files for sanchousf-ai-toolkit 0.8.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for sanchousf-ai-toolkit 0.8.1
File Size Uploaded Provenance Actions
sanchousf_ai_toolkit-0.8.1.tar.gz 21.8 kB With provenance Details for sanchousf_ai_toolkit-0.8.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for sanchousf-ai-toolkit 0.8.1
File Interpreter ABI Platform Actions
sanchousf_ai_toolkit-0.8.1-py3-none-any.whl Python 3 none any Details for sanchousf_ai_toolkit-0.8.1-py3-none-any.whl

Total release size: 35.1 kB

Release files / sanchousf_ai_toolkit-0.8.1.tar.gz

Download URL sanchousf_ai_toolkit-0.8.1.tar.gz
Size 21.8 kB
Tags Source
SHA-256 checksum
How to use checksums
49785aece61a94959a27f6e3d90af9af694539ad20d1a47b764ea3f0895e259d
BLAKE2b-256 checksum
How to use checksums
633a8f374ebb3099bb30f3b537efbdfa75ebba7c514c69ea7f9489d9d2d2f956
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 30, 2026.

Transparency log

Release files / sanchousf_ai_toolkit-0.8.1-py3-none-any.whl

Download URL sanchousf_ai_toolkit-0.8.1-py3-none-any.whl
Size 13.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
653f6718814451a534e5d60808d0dde6effd50b26243c20e5ae35b48fcd5a743
BLAKE2b-256 checksum
How to use checksums
608f1f488c163ed94cc2174bc09ab361e3e3b1ffb19ed9fa974e7d62f34c27f8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 30, 2026.

Transparency log

Security for sanchousf-ai-toolkit 0.8.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for sanchousf_ai_toolkit-0.8.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 30, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page