Skip to content

Comments

feat(blueprints): running modules by themselves#1342

Merged
leshy merged 3 commits intodevfrom
paul/feat/scratch
Feb 24, 2026
Merged

feat(blueprints): running modules by themselves#1342
leshy merged 3 commits intodevfrom
paul/feat/scratch

Conversation

@paul-nechifor
Copy link
Contributor

@paul-nechifor paul-nechifor commented Feb 21, 2026

Problem

Can't run modules by themselves.

Closes DIM-570

Solution

Make dimos run accept multiple arguments which can be either blueprints or modules.

Breaking Changes

  • Removed --extra-module.

How to Test

Start the echo:

uv run dimos topic echo /cmd_vel

Start the keyboard_teleop module:

uv run dimos run keyboard-teleop

Press WASD in the keyboard_teleop window and see how /cmd_vel updates.

Or run it as part of a different blueprint:

uv run dimos run unitree-go2 keyboard-teleop

Contributor License Agreement

  • I have read and approved the CLA.

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Feb 21, 2026

Greptile Summary

Added a scratch blueprint (empty blueprint with no modules) to enable running individual modules dynamically via CLI, and refactored the CLI to accept multiple blueprints/modules as arguments instead of requiring a single blueprint with --extra-module flags.

  • Created dimos/core/scratch.py with an empty blueprint using autoconnect()
  • Unified CLI interface: dimos run scratch keyboard-teleop instead of dimos run --extra-module keyboard_teleop scratch
  • Standardized all module names to kebab-case for consistency
  • Added get_by_name() helper that automatically detects whether a name is a blueprint or module
  • Improved error messages with difflib-based suggestions for typos
  • Added test assertion to prevent name collisions between blueprints and modules

Confidence Score: 5/5

  • Safe to merge - clean refactoring with improved UX
  • Well-structured changes that simplify the CLI interface while maintaining backward compatibility through the autoconnect pattern. The addition of name uniqueness validation and improved error handling strengthens the codebase.
  • No files require special attention

Important Files Changed

Filename Overview
dimos/core/scratch.py Added empty blueprint definition using autoconnect() with no modules
dimos/robot/cli/dimos.py Simplified run command to accept multiple blueprints/modules as variadic arguments, removing the enum and --extra-module option
dimos/robot/get_all_blueprints.py Added unified get_by_name() function, improved error handling with suggestions, and fixed kebab-to-snake case conversion for module lookups

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[User runs: dimos run arg1 arg2 ...] --> B[For each argument]
    B --> C{get_by_name}
    C -->|Found in all_blueprints| D[get_blueprint_by_name]
    C -->|Found in all_modules| E[get_module_by_name]
    C -->|Not found| F[_fail_unknown with suggestions]
    D --> G[Return Blueprint]
    E --> H[Return Blueprint from module]
    F --> I[Exit with error]
    G --> J[autoconnect all blueprints]
    H --> J
    J --> K[blueprint.build]
    K --> L[dimos.loop]
Loading

Last reviewed commit: 82770bd

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2 files reviewed, no comments

Edit Code Review Agent Settings | Greptile

leshy
leshy previously approved these changes Feb 22, 2026
@leshy
Copy link
Contributor

leshy commented Feb 22, 2026

should we name it empty or something? idk to make it clear what it is

idk in general if we should just have dimos run support module names as well, or a list of blueprints AND modules, always good to collapse the abstraction layers

@paul-nechifor
Copy link
Contributor Author

should we name it empty or something? idk to make it clear what it is

idk in general if we should just have dimos run support module names as well, or a list of blueprints AND modules, always good to collapse the abstraction layers

I named it scratch like FROM scratch, the root image in Docker.

But yeah, actually unifying the blueprints and modules sounds better. I'll do that.

@paul-nechifor paul-nechifor marked this pull request as draft February 22, 2026 01:38
@paul-nechifor paul-nechifor marked this pull request as ready for review February 24, 2026 01:52
Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

5 files reviewed, no comments

Edit Code Review Agent Settings | Greptile

@paul-nechifor paul-nechifor changed the title feat(blueprints): add scratch feat(blueprints): running modules by themselves Feb 24, 2026
leshy
leshy previously approved these changes Feb 24, 2026
leshy
leshy previously approved these changes Feb 24, 2026
@leshy leshy merged commit 6b73b42 into dev Feb 24, 2026
29 of 31 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants