Architecture of nexu-io/openmotion
nexu-io/openmotion is 9,716 source files holding 37,892 symbols across 19 modules, written mainly in TypeScript, JavaScript, Python. The largest module is studio, with 2,308 files, and 13 files are entry points into the dependency graph.
How openmotion fits together
The local AI agent is the entry point: the plugin's .mcp.json launches the root mcp.ts file, which provides the MCP server the agent calls. The library directory holds the template catalog in library/templates/catalog/, and openmotion_list_templates returns a searchable local index of those templates. The studio directory is the largest module and contains the editable Studio where a video is arranged, revised and previewed. The gateway directory calls model providers, detects local agents and signs users in, with each workspace keeping its own keys and sessions. The scripts directory packages openmotion for npm and fetches and verifies its native video tools, while packages holds the shared visual kit that Studio screens draw from. The output is an MP4 export, which is verified before a final preview is shown.
Largest modules
- studio: 2,308 files and 371,489 lines of code
- library: 1,809 files and 49,655 lines of code
- tests: 192 files and 33,044 lines of code
- shared: 93 files and 8,558 lines of code
- scripts: 66 files and 7,153 lines of code
- gateway: 49 files and 9,653 lines of code
- packages: 42 files and 2,892 lines of code
- root: 22 files and 8,200 lines of code
Languages
By file count: TypeScript 2,667 files, JavaScript 1,938 files, Python 41 files, Shell 6 files, Dockerfile 1 file.
Documentation
Repowise documents openmotion in 3,472 pages generated from the source, 76 of them written explanations of the repository and its modules. Module guides include:
- studio/src/motion: Account and Agent Settings
More on openmotion: summary and FAQ, codebase overview, code health.
Related guide: Best dependency graph tools for monorepos