A tool to stop JVM architecture drift before it reaches main. No test dependency. No architecture-test code.
11
stars
265
commits
Kotlin
primary language
Sep 11, 2026
updated
Shamash scans compiled Java and Kotlin applications for dependency cycles and architecture violations without requiring architecture-test code.
Requires Java 17 or newer.
Download shamash-cli-<version>.zip and SHA256SUMS.txt from GitHub Releases, verify the checksum and extract the archive.
bin/shamash # Linux/macOS
bin/shamash.bat # Windows
The following examples assume the launcher is on your PATH.
./gradlew classes
# or: ./mvnw package
If compiled classes are missing, Shamash detects common Gradle/Maven projects and suggests a build command.
shamash scan
Without a configuration, Shamash runs in discovery mode. It reports findings without creating configuration, reports or baselines.
Example output:
Shamash - discovery scan
Report-only mode. No project files were changed.
Shamash found 3 architecture issues
ERROR graph.noCycles
Dependency cycle detected ...
WARN metrics.maxFanOut
...
642 classes scanned
1 errors, 2 warnings, 0 info
Ready to enforce architecture? Run: shamash init
Create the default configuration:
shamash init
This writes shamash/configs/asm.yml with a dependency-cycle rule.
For Spring-specific rules:
shamash init --preset spring
For the full reference configuration:
shamash init --preset reference
Validate and scan:
shamash validate
shamash scan
Use --all-findings for the complete findings list and --verbose for diagnostics.
After shamash init, run:
shamash baseline create
After a complete, successful scan, this writes the configured baseline and sets baseline.mode to VERIFY. Replacing an existing baseline requires --force.
Commit the configuration and baseline:
shamash/configs/asm.yml
.shamash/baseline/asm-baseline.json
Later scans suppress accepted violations and report new ones.
Build the application before running Shamash:
name: Architecture
on:
pull_request:
push:
branches: [main]
jobs:
shamash:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: actions/setup-java@v5
with:
distribution: temurin
java-version: "17"
- run: ./gradlew classes
- uses: aalsanie/shamash@v0.92.0
For configured enforcement:
- uses: aalsanie/shamash@v0.92.0
with:
config: shamash/configs/asm.yml
fail-on: ERROR
The action verifies the release checksum before execution.
Embed the bytecode engine in Java or Kotlin applications. Requires Java 17 or newer.
repositories {
mavenCentral()
}
dependencies {
implementation("io.github.aalsanie:shamash-asm-core:0.92.0")
}
<dependency>
<groupId>io.github.aalsanie</groupId>
<artifactId>shamash-asm-core</artifactId>
<version>0.92.0</version>
</dependency>
Shared contracts and report exporters are included as transitive dependencies.
Scan a compiled project:
import io.shamash.asm.core.scan.ScanOptions
import io.shamash.asm.core.scan.ShamashAsmScanRunner
import java.nio.file.Path
val result = ShamashAsmScanRunner().run(
ScanOptions(projectBasePath = Path.of("."))
)
check(result.isSuccess) { result.toString() }
val findings = requireNotNull(result.engine).findings
A successful scan can still contain architecture violations. isSuccess indicates that validation and analysis completed without execution errors or truncation.
Install from JetBrains Marketplace, then open:
Tools → Shamash
The tool window contains:
Configured scans use these exit codes:
0 successful scan and findings below threshold2 configuration/input problem, including missing compiled bytecode3 runtime failure or incomplete scan4 findings reached the selected --fail-on thresholdDiscovery scans return 0 after successful analysis, regardless of findings.
shamash factsshamash analysisSee docs/asm/, REGISTRY_GUIDE.md and benchmarks/.
Report vulnerabilities through SECURITY.md.
Apache License 2.0. See LICENSE.
236 commits
29 commits
Kotlin
95.6%
Python
3.1%
Java
1.1%
A tool to stop JVM architecture drift before it reaches main. No test dependency. No architecture-test code.
11
stars
265
commits
Kotlin
primary language
Sep 11, 2026
updated
Shamash scans compiled Java and Kotlin applications for dependency cycles and architecture violations without requiring architecture-test code.
Requires Java 17 or newer.
Download shamash-cli-<version>.zip and SHA256SUMS.txt from GitHub Releases, verify the checksum and extract the archive.
bin/shamash # Linux/macOS
bin/shamash.bat # Windows
The following examples assume the launcher is on your PATH.
./gradlew classes
# or: ./mvnw package
If compiled classes are missing, Shamash detects common Gradle/Maven projects and suggests a build command.
shamash scan
Without a configuration, Shamash runs in discovery mode. It reports findings without creating configuration, reports or baselines.
Example output:
Shamash - discovery scan
Report-only mode. No project files were changed.
Shamash found 3 architecture issues
ERROR graph.noCycles
Dependency cycle detected ...
WARN metrics.maxFanOut
...
642 classes scanned
1 errors, 2 warnings, 0 info
Ready to enforce architecture? Run: shamash init
Create the default configuration:
shamash init
This writes shamash/configs/asm.yml with a dependency-cycle rule.
For Spring-specific rules:
shamash init --preset spring
For the full reference configuration:
shamash init --preset reference
Validate and scan:
shamash validate
shamash scan
Use --all-findings for the complete findings list and --verbose for diagnostics.
After shamash init, run:
shamash baseline create
After a complete, successful scan, this writes the configured baseline and sets baseline.mode to VERIFY. Replacing an existing baseline requires --force.
Commit the configuration and baseline:
shamash/configs/asm.yml
.shamash/baseline/asm-baseline.json
Later scans suppress accepted violations and report new ones.
Build the application before running Shamash:
name: Architecture
on:
pull_request:
push:
branches: [main]
jobs:
shamash:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: actions/setup-java@v5
with:
distribution: temurin
java-version: "17"
- run: ./gradlew classes
- uses: aalsanie/shamash@v0.92.0
For configured enforcement:
- uses: aalsanie/shamash@v0.92.0
with:
config: shamash/configs/asm.yml
fail-on: ERROR
The action verifies the release checksum before execution.
Embed the bytecode engine in Java or Kotlin applications. Requires Java 17 or newer.
repositories {
mavenCentral()
}
dependencies {
implementation("io.github.aalsanie:shamash-asm-core:0.92.0")
}
<dependency>
<groupId>io.github.aalsanie</groupId>
<artifactId>shamash-asm-core</artifactId>
<version>0.92.0</version>
</dependency>
Shared contracts and report exporters are included as transitive dependencies.
Scan a compiled project:
import io.shamash.asm.core.scan.ScanOptions
import io.shamash.asm.core.scan.ShamashAsmScanRunner
import java.nio.file.Path
val result = ShamashAsmScanRunner().run(
ScanOptions(projectBasePath = Path.of("."))
)
check(result.isSuccess) { result.toString() }
val findings = requireNotNull(result.engine).findings
A successful scan can still contain architecture violations. isSuccess indicates that validation and analysis completed without execution errors or truncation.
Install from JetBrains Marketplace, then open:
Tools → Shamash
The tool window contains:
Configured scans use these exit codes:
0 successful scan and findings below threshold2 configuration/input problem, including missing compiled bytecode3 runtime failure or incomplete scan4 findings reached the selected --fail-on thresholdDiscovery scans return 0 after successful analysis, regardless of findings.
shamash factsshamash analysisSee docs/asm/, REGISTRY_GUIDE.md and benchmarks/.
Report vulnerabilities through SECURITY.md.
Apache License 2.0. See LICENSE.
236 commits
29 commits
Kotlin
95.6%
Python
3.1%
Java
1.1%