-
Notifications
You must be signed in to change notification settings - Fork 6
docs: expand website documentation with guides and architecture #228
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
david-waltermire
merged 6 commits into
metaschema-framework:develop
from
david-waltermire:site-expansion
Jan 11, 2026
Merged
Changes from 3 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
9c23f67
docs: expand website with installation, building, and guide pages
david-waltermire 64fcd40
docs: left-justify prerequisite tables
david-waltermire 0bc9f80
fix: address PR review feedback
david-waltermire 5a8bb5c
fix: correct shell-completion command name in documentation
david-waltermire be691da
fix: restore Mapping Collection support and add claude-plugins link
david-waltermire ae75909
fix: address CodeRabbit nitpick comments
david-waltermire File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| { | ||
| "java.configuration.updateBuildConfiguration": "interactive" | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,195 @@ | ||
| # Building from Source | ||
|
|
||
| This guide explains how to build the OSCAL CLI from source code. | ||
|
|
||
| ## Prerequisites | ||
|
|
||
| | Requirement | Minimum Version | Notes | | ||
| |:------------|:----------------|:------| | ||
| | Java JDK | 17 | Required for building (output JARs are JDK 11 compatible) | | ||
| | Maven | 3.9.0 | Required for building | | ||
| | Git | 2.0 | Required for cloning | | ||
|
|
||
| Ensure `JAVA_HOME` is set correctly: | ||
|
|
||
| ```bash | ||
| # macOS | ||
| export JAVA_HOME=$(/usr/libexec/java_home -v 17) | ||
|
|
||
| # Linux (adjust path to your installation) | ||
| export JAVA_HOME=/usr/lib/jvm/java-17-openjdk | ||
|
|
||
| # Windows | ||
| set JAVA_HOME=C:\Program Files\Java\jdk-17 | ||
| ``` | ||
|
|
||
| ## Clone the Repository | ||
|
|
||
| Clone the repository with submodules: | ||
|
|
||
| ```bash | ||
| git clone --recurse-submodules https://github.com/metaschema-framework/oscal-cli.git | ||
| cd oscal-cli | ||
| ``` | ||
|
|
||
| If you already cloned without submodules, initialize them: | ||
|
|
||
| ```bash | ||
| git submodule update --init --recursive | ||
| ``` | ||
|
|
||
| ## Build Commands | ||
|
|
||
| ### Basic Build | ||
|
|
||
| Build and install to your local Maven repository: | ||
|
|
||
| ```bash | ||
| mvn install | ||
| ``` | ||
|
|
||
| This produces the CLI distribution in `target/oscal-cli-enhanced-*-oscal-cli.zip`. | ||
|
|
||
| ### Run Tests Only | ||
|
|
||
| ```bash | ||
| mvn test | ||
| ``` | ||
|
|
||
| ### Run a Single Test | ||
|
|
||
| ```bash | ||
| # Run a single test class | ||
| mvn test -Dtest=CLITest | ||
|
|
||
| # Run a single test method | ||
| mvn test -Dtest=CLITest#testValidate | ||
| ``` | ||
|
|
||
| ### Skip Tests | ||
|
|
||
| ```bash | ||
| mvn install -DskipTests | ||
| ``` | ||
|
|
||
| ### CI/CD Build | ||
|
|
||
| Replicate the full CI/CD build (recommended before pushing): | ||
|
|
||
| ```bash | ||
| mvn install -PCI -Prelease | ||
| ``` | ||
|
|
||
| This enables additional checks including: | ||
|
|
||
| - License header verification | ||
| - Checkstyle code style checks | ||
| - SpotBugs static analysis | ||
| - Full test suite | ||
|
|
||
| ## Code Quality Commands | ||
|
|
||
| ### Check License Headers | ||
|
|
||
| ```bash | ||
| mvn license:check | ||
| ``` | ||
|
|
||
| ### Auto-format Source Code | ||
|
|
||
| ```bash | ||
| mvn formatter:format | ||
| ``` | ||
|
|
||
| ### Check for Checkstyle Issues | ||
|
|
||
| ```bash | ||
| mvn checkstyle:check | ||
| ``` | ||
|
|
||
| ## Running the Built CLI | ||
|
|
||
| After building, you can run the CLI directly: | ||
|
|
||
| ```bash | ||
| # Extract the distribution | ||
| unzip target/oscal-cli-enhanced-*-oscal-cli.zip -d target/cli | ||
|
|
||
| # Run the CLI | ||
| target/cli/bin/oscal-cli --help | ||
| ``` | ||
|
|
||
| ## Building Container Images | ||
|
|
||
| To build a local container image: | ||
|
|
||
| ```bash | ||
| # Build with Docker | ||
| docker build -t oscal-cli:local . | ||
|
|
||
| # Test the image | ||
| docker run --rm oscal-cli:local --help | ||
| ``` | ||
|
|
||
| ## Building the Site | ||
|
|
||
| To build the project documentation site: | ||
|
|
||
| ```bash | ||
| mvn site | ||
| ``` | ||
|
|
||
| The generated site appears in `target/site/`. | ||
|
|
||
| ## Common Build Issues | ||
|
|
||
| ### Submodule Not Initialized | ||
|
|
||
| **Symptom:** Build fails with missing OSCAL or Metaschema files. | ||
|
|
||
| **Solution:** Initialize submodules: | ||
|
|
||
| ```bash | ||
| git submodule update --init --recursive | ||
| ``` | ||
|
|
||
| ### Java Version Mismatch | ||
|
|
||
| **Symptom:** Compilation errors or "unsupported class file version" errors. | ||
|
|
||
| **Solution:** Ensure you're using Java 17 or later for building: | ||
|
|
||
| ```bash | ||
| java -version | ||
| mvn -version | ||
| ``` | ||
|
|
||
| ### Maven Version Too Old | ||
|
|
||
| **Symptom:** Build fails with plugin compatibility errors or enforcer rule failures. | ||
|
|
||
| **Solution:** Upgrade Maven to 3.9.0 or later: | ||
|
|
||
| ```bash | ||
| mvn -version | ||
| ``` | ||
|
|
||
| ### Out of Memory | ||
|
|
||
| **Symptom:** Build fails with `OutOfMemoryError`. | ||
|
|
||
| **Solution:** Increase Maven's heap size: | ||
|
|
||
| ```bash | ||
| export MAVEN_OPTS="-Xmx2g" | ||
| mvn install | ||
| ``` | ||
|
|
||
| ## Contributing | ||
|
|
||
| For contribution guidelines, including code style requirements and the pull request process, see [CONTRIBUTING.md](${project.scm.url}/blob/develop/CONTRIBUTING.md). | ||
|
|
||
| ## Next Steps | ||
|
|
||
| - [Installation](installation.html) - Install the pre-built CLI | ||
| - [CLI Reference](guides/cli-reference.html) - Complete command reference | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,114 @@ | ||
| # Using with Claude Code | ||
|
|
||
| [Claude Code](https://claude.ai/code) is an AI-powered coding assistant that can help you work with OSCAL CLI more effectively. | ||
|
|
||
| ## Overview | ||
|
|
||
| Claude Code plugins provide specialized skills for: | ||
|
|
||
| - **OSCAL document validation** - Validating catalogs, profiles, SSPs, and other OSCAL artifacts | ||
| - **Format conversion** - Converting between XML, JSON, and YAML formats | ||
| - **Profile resolution** - Resolving profiles to produce baseline catalogs | ||
| - **Metapath queries** - Writing expressions to query OSCAL content | ||
| - **CLI assistance** - Running commands and interpreting output | ||
|
|
||
| ## Prerequisites | ||
|
|
||
| 1. [Install Claude Code](https://docs.anthropic.com/en/docs/claude-code) | ||
|
|
||
| ## Available Plugins | ||
|
|
||
| ### OSCAL Plugin | ||
|
|
||
| Skills for working with OSCAL documents: | ||
|
|
||
| | Skill | Description | | ||
| |:------|:------------| | ||
| | `oscal:oscal-basics` | OSCAL document types and structure | | ||
|
|
||
| ### OSCAL Tools Plugin | ||
|
|
||
| Skills for using the CLI: | ||
|
|
||
| | Skill | Description | | ||
| |:------|:------------| | ||
| | `oscal-tools:using-oscal-cli` | Running oscal-cli commands | | ||
|
|
||
| ### Metaschema Plugin | ||
|
|
||
| Skills for understanding OSCAL's underlying structure: | ||
|
|
||
| | Skill | Description | | ||
| |:------|:------------| | ||
| | `metaschema:metaschema-basics` | Introduction to Metaschema concepts | | ||
| | `metaschema:metapath-expressions` | Writing Metapath queries | | ||
|
|
||
| ## Example Workflows | ||
|
|
||
| ### Validate an OSCAL Document | ||
|
|
||
| Ask Claude: | ||
| > "Validate my SSP at `ssp.json` and explain any errors" | ||
|
|
||
| Claude will run the validation and help you understand and fix issues. | ||
|
|
||
| ### Convert Between Formats | ||
|
|
||
| Ask Claude: | ||
| > "Convert my catalog from XML to JSON" | ||
|
|
||
| Claude will guide you through the conversion process. | ||
|
|
||
| ### Resolve a Profile | ||
|
|
||
| Ask Claude: | ||
| > "Help me resolve my NIST 800-53 profile to a baseline catalog" | ||
|
|
||
| Claude will explain profile resolution and run the appropriate command. | ||
|
|
||
| ### Query OSCAL Content | ||
|
|
||
| Ask Claude: | ||
| > "Write a Metapath expression to find all controls with a specific label" | ||
|
|
||
| Claude will construct the expression and show how to use it with the CLI. | ||
|
|
||
| ### Debug Validation Errors | ||
|
|
||
| Ask Claude: | ||
| > "I'm getting validation errors on my component definition. Can you help?" | ||
|
|
||
| Claude will analyze the errors and suggest fixes. | ||
|
|
||
| ## Tips for Effective Use | ||
|
|
||
| 1. **Be specific** - Mention file paths and exact error messages | ||
| 2. **Provide context** - Share the OSCAL document type you're working with | ||
| 3. **Ask for explanations** - Claude can explain OSCAL concepts and requirements | ||
| 4. **Request examples** - Ask for sample OSCAL snippets or CLI commands | ||
|
|
||
| ## Common Commands | ||
|
|
||
| Here are CLI commands that Claude can help you with: | ||
|
|
||
| ```bash | ||
| # Validate OSCAL content | ||
| oscal-cli validate document.json | ||
|
|
||
| # Convert formats | ||
| oscal-cli convert --to=json catalog.xml catalog.json | ||
|
|
||
| # Resolve a profile | ||
| oscal-cli resolve-profile profile.xml resolved-catalog.xml | ||
|
|
||
| # Evaluate Metapath expressions | ||
| oscal-cli metapath eval -e "//control" catalog.json | ||
| ``` | ||
|
|
||
| ## Learn More | ||
|
|
||
| For more information about Claude Code, OSCAL, and the CLI, see these resources: | ||
|
|
||
| - [Claude Code Documentation](https://docs.anthropic.com/en/docs/claude-code) | ||
| - [OSCAL Documentation](https://pages.nist.gov/OSCAL/) | ||
| - [CLI Reference](guides/cli-reference.html) |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Non-blocking: Just a note I think
java_homeis specific to certain Java distributions or installation methods, because I do not have that with WSL2 and using the official Temurin release throughasdf, so I am not sure it is universal.