importscope config
Use this to inspect or edit .importscope.yml programmatically.
importscope config show
importscope config show --effective
importscope config package set mypackage
importscope config exclude add 'tests/**'
importscope config forbid add mypackage.domain mypackage.persistence
What it is for
Use config when you want to make common config changes without manually
editing YAML:
- set or unset the package filter
- add or remove discovery include/exclude globs
- enable or disable policy mode
- set or unset
module_group_depth - add or remove forbidden-import rules
- add or remove allowed private target prefixes
- print the current config
Common commands
Show the file contents:
Show the merged effective config:
Set the package:
Exclude noisy paths:
Narrow the run to a specific slice:
Enable policy and add one direction rule:
importscope config policy enable
importscope config forbid add mypackage.api mypackage.persistence._
Allow intentionally shared private targets:
Tune module-level clustering:
Notes
configedits the file on disk immediately.- When
--configis omitted,importscopeuses the auto-discovered config path or falls back to.importscope.ymlin the repo root. - For more advanced fields such as custom
display_groupsor custom output profiles, manual YAML is still the right tool.