aalsanie/shamash
About
A tool to stop JVM architecture drift before it reaches main. Configurable through yaml; no architecture test code.
Developer ToolsMeasured star growth
- in 24h
- 0
- in 7 days
- +1
- in 15 days
- -5
- in 1 month
- Collecting history
Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.
README.md
OriginalEnglish • Español • 简体中文 • Português (Brasil) • Русский
Shamash
Architecture checks for Java and Kotlin, without architecture tests.
Understand Java/Kotlin source dependencies and investigate package cycles in IntelliJ. Use standalone compiled-code checks in the CLI or CI to enforce configurable architecture policies.
First scan
Requires Java 17+ and compiled classes. Download the CLI archive and checksums, verify the archive, and add its bin directory to your PATH (shamash on Unix, shamash.bat on Windows).
./gradlew classes # or ./mvnw package
shamash scan
Without a config, the scan reports findings but does not write project files or fail because of architecture violations.
Enforce rules
shamash init
shamash validate
shamash scan --fail-on ERROR
init creates shamash/configs/asm.yml with a dependency-cycle rule. Use shamash init --preset spring for Spring defaults or --preset reference for the full example.
For an existing codebase, run shamash baseline create to accept current findings. Commit the updated config and .shamash/baseline/asm-baseline.json; subsequent scans report new violations.
GitHub Actions
name: Architecture
on: [pull_request, push]
jobs:
architecture:
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/[email protected]
with:
config: shamash/configs/asm.yml
fail-on: ERROR
Replace the build step with ./mvnw package for Maven. The Action verifies the CLI download checksum before scanning.
Exit codes: 0 completed below threshold; 2 configuration or input error; 3 failed or incomplete scan; 4 findings at or above the threshold.
IntelliJ
Install from JetBrains Marketplace and open Tools → Shamash. Select Findings or Explore, then choose Analyze project to investigate Java/Kotlin production-source dependencies. The plugin does not evaluate your project YAML policies or perform custom fixes; use the CLI for enforcement, reports, and baselines. See the upgrade notes for retired actions and shortcuts.
Library
Published on Maven Central for Java 17+.
Gradle
dependencies {
implementation("io.github.aalsanie:shamash-asm-core:0.92.0")
}
Maven
<dependency>
<groupId>io.github.aalsanie</groupId>
<artifactId>shamash-asm-core</artifactId>
<version>0.92.0</version>
</dependency>
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
isSuccess confirms scan completion, not the absence of violations.
Beyond the basics
Configure API and annotation restrictions, JAR-origin rules, dependency metrics, and graph checks. Export JSON, SARIF, HTML, or XML reports; inspect facts, hotspots, and architecture scores. Add custom rule registries where built-in rules aren't enough.
CLI options and checksums · Configuration examples · Custom registries · Benchmarks
Changelog · Security · Contributing · License
License
Shamash CLI and the core libraries are licensed under AGPL-3.0-only. The IntelliJ plugin module remains Apache-2.0; its distribution includes AGPL-licensed core libraries. See third-party notices. Releases before 1.0.0 retain their original Apache-2.0 terms.
Explore related projects
Loading…