Print out marimo config information. Example usage: marimo config show
()
| 24 | |
| 25 | @click.command(cls=ColoredCommand, help="""Show the marimo config.""") |
| 26 | def show() -> None: |
| 27 | """ |
| 28 | Print out marimo config information. |
| 29 | Example usage: |
| 30 | |
| 31 | marimo config show |
| 32 | """ |
| 33 | import tomlkit |
| 34 | |
| 35 | current_path = os.getcwd() |
| 36 | |
| 37 | config_manager = get_default_config_manager(current_path=current_path) |
| 38 | # Save config if doesn't exist |
| 39 | UserConfigManager().save_config_if_missing() |
| 40 | |
| 41 | # Show project overrides if they exist |
| 42 | project_config_path = find_nearest_pyproject_toml(current_path) |
| 43 | overrides = config_manager.get_config_overrides() |
| 44 | if overrides: |
| 45 | echo( |
| 46 | f"\n📁 Project overrides from {green(str(project_config_path))}\n" |
| 47 | ) |
| 48 | echo(highlight_toml_headers(tomlkit.dumps(overrides))) |
| 49 | |
| 50 | # Show user config |
| 51 | user_config_path = config_manager.user_config_mgr.get_config_path() |
| 52 | echo(f"\n🏠 User config from {green(user_config_path)}\n") |
| 53 | user_config = config_manager.get_user_config() |
| 54 | echo(highlight_toml_headers(tomlkit.dumps(user_config))) |
| 55 | |
| 56 | |
| 57 | @click.command(cls=ColoredCommand, help="""Describe the marimo config.""") |
nothing calls this directly
no test coverage detected
searching dependent graphs…