一键导入
polylith-brick-removal
// Safely remove a Polylith brick (component or base) from the workspace. Use when the user wants to delete, remove, or tear down a component or base.
// Safely remove a Polylith brick (component or base) from the workspace. Use when the user wants to delete, remove, or tear down a component or base.
| name | polylith-brick-removal |
| description | Safely remove a Polylith brick (component or base) from the workspace. Use when the user wants to delete, remove, or tear down a component or base. |
💡 Terminology: this skill uses Polylith terms like brick, component, base, and development project. If they're unfamiliar, load
polylith-conceptsfirst.
There is no poly remove CLI command. Removing a brick is a manual process.
components/<namespace>/<name> or bases/<namespace>/<name>.test/components/<namespace>/<name> or test/bases/<namespace>/<name>.projects/*/pyproject.toml files and remove the brick from the [tool.polylith.bricks] section.[tool.polylith.bricks] section in the root pyproject.toml (the development project).poly sync (load polylith-sync) and poly check (load polylith-check) to ensure the workspace is valid and no other bricks were importing the deleted brick.poly check fails after removal, it means another brick was depending on the removed brick. You must fix the importing brick.Create a Polylith base with `poly create base` — the entry point of a deployable application (HTTP API, CLI, message-queue consumer, AWS Lambda handler, GCP Cloud Function, scheduled job). Use when the user wants to add a service, API, endpoint, handler, or any new entry point to a Polylith workspace.
Validate a Polylith workspace with `poly check` — the canonical CI gate. Verifies brick imports against project `pyproject.toml`s, third-party library declarations vs. the lock file, and (under `--strict`) cross-project version consistency. Exits 1 on failure. Use when the user wants to lint, validate, verify, or CI-gate a Polylith workspace.
Create a Polylith component with `poly create component` — a reusable, isolated brick implementing business logic, a feature, a domain module, or a capability. Use when adding non-entry-point code that bases or other components will import.
Provides foundational knowledge about Polylith architecture, including the glossary (bases, components, projects, workspaces), theme layouts, and package manager mapping. Use this when you need to understand Polylith terminology or how the repository is structured conceptually before taking action.
Add or manage third-party dependencies in a Polylith workspace. Use when the user wants to install a new library (e.g., requests, fastapi) for a brick or project.
Visualize **brick × brick** dependencies with `poly deps` — find circular dependencies, inspect a brick's public interface, and detect interface-bypass violations. Use for "what depends on what", "circular deps", "interface violation". For brick × project usage, use `polylith-workspace-inspection`.