Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,6 @@ pom.xml.releaseBackup
pom.xml.versionsBackup
release.properties
velocity.log*

# Worktrees
.worktrees/
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,16 @@ oscal-cli --help
/opt/oscal-cli/bin/oscal-cli --help
```

### Disabling Color Output

The CLI uses ANSI escape codes for colored output, which is supported by most modern terminals including Windows 10+, Linux, and macOS. If you are using a legacy console that does not support ANSI escape codes (e.g., older Windows cmd.exe, certain CI/CD environments, or when redirecting output to a file), you may see raw escape sequences in the output.

To disable colored output, use the `--no-color` flag:

```sh
oscal-cli --no-color <command>
```

## Building

This project can be built with [Apache Maven](https://maven.apache.org/) version 3.8.4 or greater.
Expand Down
147 changes: 52 additions & 95 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
</parent>
<groupId>dev.metaschema.oscal</groupId>
<artifactId>oscal-cli-enhanced</artifactId>
<version>2.7.0-SNAPSHOT</version>
<version>3.0.0-SNAPSHOT</version>

<packaging>jar</packaging>

Expand All @@ -23,16 +23,16 @@
<url>${scm.url}/tree/develop</url>
<connection>scm:git:git@github.com/metaschema-framework/oscal-cli.git</connection>
<developerConnection>scm:git:git@github.com:metaschema-framework/oscal-cli.git</developerConnection>
<tag>v0.2.0</tag>
<tag>HEAD</tag>
</scm>
<distributionManagement>
<repository>
<id>central</id>
<name>Maven Central Repository</name>
<name>Maven Central Repository</name>
<url>https://central.sonatype.com</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
<snapshotRepository>
<id>repo-snapshot</id>
Expand Down Expand Up @@ -74,7 +74,7 @@
<properties>
<!-- metaschema dependencies -->
<dependency.metaschema-framework.version>3.0.0-SNAPSHOT</dependency.metaschema-framework.version>
<dependency.liboscal-java.version>6.1.0-SNAPSHOT</dependency.liboscal-java.version>
<dependency.liboscal-java.version>7.0.0-SNAPSHOT</dependency.liboscal-java.version>
Comment thread
coderabbitai[bot] marked this conversation as resolved.

<!-- site configuration -->
<site.url>https://oscal-cli.metaschema.dev</site.url>
Expand Down Expand Up @@ -105,58 +105,56 @@
<dependency.log4j2.version>2.25.3</dependency.log4j2.version>
<dependency.pmd.version>7.10.0</dependency.pmd.version>
<dependency.spotbugs-annotations.version>4.9.1</dependency.spotbugs-annotations.version>
<dependency.xmlbeans.version>5.3.0</dependency.xmlbeans.version>
<dependency.xmlresolver.version>6.0.19</dependency.xmlresolver.version>


<plugin.central-publishing.version>0.9.0</plugin.central-publishing.version>
</properties>

<repositories>
<repository>
<id>central</id>
<name>Maven Central Repository</name>
<url>https://repo.maven.apache.org/maven2</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
<repository>
<id>repo-snapshot</id>
<name>Local Snapshots</name>
<url>https://raw.githubusercontent.com/metaschema-framework/maven2/refs/heads/main</url>
<releases>
<enabled>false</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
<updatePolicy>always</updatePolicy>
</snapshots>
</repository>
</repositories>
<pluginRepositories>
<id>central</id>
<name>Maven Central Repository</name>
<url>https://repo.maven.apache.org/maven2</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
<repository>
<id>repo-snapshot</id>
<name>Local Snapshots</name>
<url>https://raw.githubusercontent.com/metaschema-framework/maven2/refs/heads/main</url>
<releases>
<enabled>false</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
<updatePolicy>always</updatePolicy>
</snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>central</id>
<name>Maven Central Repository</name>
<url>https://repo.maven.apache.org/maven2</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</pluginRepository>
<pluginRepository>
<id>central</id>
<name>Maven Central Repository</name>
<url>https://repo.maven.apache.org/maven2</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</pluginRepository>
<pluginRepository>
<id>repo-snapshot</id>
<name>Local Snapshots</name>
<url>https://raw.githubusercontent.com/metaschema-framework/maven2/refs/heads/main</url>
<releases>
<enabled>false</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
<updatePolicy>always</updatePolicy>
</snapshots>
</pluginRepository>
</pluginRepositories>
<id>repo-snapshot</id>
<name>Local Snapshots</name>
<url>https://raw.githubusercontent.com/metaschema-framework/maven2/refs/heads/main</url>
<releases>
<enabled>false</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
<updatePolicy>always</updatePolicy>
</snapshots>
</pluginRepository>
</pluginRepositories>

<dependencyManagement>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
Expand All @@ -173,29 +171,13 @@
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>org.apache.xmlbeans</groupId>
<artifactId>xmlbeans</artifactId>
<version>${dependency.xmlbeans.version}</version>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>dev.metaschema.oscal</groupId>
<artifactId>liboscal-java</artifactId>
<version>${dependency.liboscal-java.version}</version>
<exclusions>
<!-- Exclude metaschema-java transitive dependencies to use 3.0.0-SNAPSHOT versions -->
<exclusion>
<groupId>dev.metaschema.java</groupId>
<artifactId>metaschema-core</artifactId>
</exclusion>
<exclusion>
<groupId>dev.metaschema.java</groupId>
<artifactId>metaschema-databind</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>dev.metaschema.java</groupId>
Expand All @@ -212,16 +194,6 @@
<artifactId>metaschema-schema-generator</artifactId>
<version>${dependency.metaschema-framework.version}</version>
</dependency>
<dependency>
<groupId>dev.metaschema.java</groupId>
<artifactId>metaschema-core</artifactId>
<version>${dependency.metaschema-framework.version}</version>
</dependency>
<dependency>
<groupId>dev.metaschema.java</groupId>
<artifactId>metaschema-databind</artifactId>
<version>${dependency.metaschema-framework.version}</version>
</dependency>

<dependency>
<groupId>org.apache.logging.log4j</groupId>
Expand All @@ -243,21 +215,6 @@
<artifactId>commons-io</artifactId>
<version>${dependency.commons-io.version}</version>
</dependency>
<dependency>
<groupId>org.xmlresolver</groupId>
<artifactId>xmlresolver</artifactId>
<version>${dependency.xmlresolver.version}</version>
</dependency>
<dependency>
<groupId>org.xmlresolver</groupId>
<artifactId>xmlresolver</artifactId>
<version>${dependency.xmlresolver.version}</version>
<classifier>data</classifier>
</dependency>
<dependency>
<groupId>org.apache.xmlbeans</groupId>
<artifactId>xmlbeans</artifactId>
</dependency>
<dependency>
<groupId>com.github.erosb</groupId>
<artifactId>everit-json-schema</artifactId>
Expand Down Expand Up @@ -447,7 +404,7 @@
<configuration>
<archive>
<manifest>
<mainClass>gov.nist.secauto.oscal.tools.cli.core.CLI</mainClass>
<mainClass>dev.metaschema.oscal.tools.cli.core.CLI</mainClass>
<addClasspath>true</addClasspath>
<!-- <classpathPrefix>lib/</classpathPrefix> -->
<classpathLayoutType>custom</classpathLayoutType>
Expand All @@ -463,7 +420,7 @@
<configuration>
<programs>
<program>
<mainClass>gov.nist.secauto.oscal.tools.cli.core.CLI</mainClass>
<mainClass>dev.metaschema.oscal.tools.cli.core.CLI</mainClass>
<id>oscal-cli</id>
</program>
</programs>
Expand Down
13 changes: 13 additions & 0 deletions src/main/distro/README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,19 @@ The tool can be run as follows:

oscal-cli --help

Disabling Color Output:
-----------------------

The CLI uses ANSI escape codes for colored output, which is supported by most
modern terminals including Windows 10+, Linux, and macOS. If you are using a
legacy console that does not support ANSI escape codes (e.g., older Windows
cmd.exe, certain CI/CD environments, or when redirecting output to a file),
you may see raw escape sequences in the output.

To disable colored output, use the --no-color flag:

oscal-cli --no-color <command>

Feedback:
---------

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@
* OF THE RESULTS OF, OR USE OF, THE SOFTWARE OR SERVICES PROVIDED HEREUNDER.
*/

package gov.nist.secauto.oscal.tools.cli.core;
package dev.metaschema.oscal.tools.cli.core;

import gov.nist.secauto.metaschema.core.util.IVersionInfo;
import dev.metaschema.core.util.IVersionInfo;

/**
* Provides version information for this application.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,28 +3,28 @@
* SPDX-License-Identifier: CC0-1.0
*/

package gov.nist.secauto.oscal.tools.cli.core;
package dev.metaschema.oscal.tools.cli.core;

import gov.nist.secauto.metaschema.cli.processor.CLIProcessor;
import gov.nist.secauto.metaschema.cli.processor.ExitStatus;
import gov.nist.secauto.metaschema.core.MetaschemaJavaVersion;
import gov.nist.secauto.metaschema.core.model.MetaschemaVersion;
import gov.nist.secauto.metaschema.core.util.CollectionUtil;
import gov.nist.secauto.metaschema.core.util.IVersionInfo;
import gov.nist.secauto.oscal.lib.LibOscalVersion;
import gov.nist.secauto.oscal.lib.OscalVersion;
import gov.nist.secauto.oscal.tools.cli.core.commands.ConvertCommand;
import gov.nist.secauto.oscal.tools.cli.core.commands.ListAllowedValuesCommand;
import gov.nist.secauto.oscal.tools.cli.core.commands.ResolveCommand;
import gov.nist.secauto.oscal.tools.cli.core.commands.ValidateCommand;
import gov.nist.secauto.oscal.tools.cli.core.commands.assessmentplan.AssessmentPlanCommand;
import gov.nist.secauto.oscal.tools.cli.core.commands.assessmentresults.AssessmentResultsCommand;
import gov.nist.secauto.oscal.tools.cli.core.commands.catalog.CatalogCommand;
import gov.nist.secauto.oscal.tools.cli.core.commands.componentdefinition.ComponentDefinitionCommand;
import gov.nist.secauto.oscal.tools.cli.core.commands.metaschema.MetaschemaCommand;
import gov.nist.secauto.oscal.tools.cli.core.commands.poam.PlanOfActionsAndMilestonesCommand;
import gov.nist.secauto.oscal.tools.cli.core.commands.profile.ProfileCommand;
import gov.nist.secauto.oscal.tools.cli.core.commands.ssp.SystemSecurityPlanCommand;
import dev.metaschema.cli.processor.CLIProcessor;
import dev.metaschema.cli.processor.ExitStatus;
import dev.metaschema.core.MetaschemaJavaVersion;
import dev.metaschema.core.model.MetaschemaVersion;
import dev.metaschema.core.util.CollectionUtil;
import dev.metaschema.core.util.IVersionInfo;
import dev.metaschema.oscal.lib.LibOscalVersion;
import dev.metaschema.oscal.lib.OscalVersion;
import dev.metaschema.oscal.tools.cli.core.commands.ConvertCommand;
import dev.metaschema.oscal.tools.cli.core.commands.ListAllowedValuesCommand;
import dev.metaschema.oscal.tools.cli.core.commands.ResolveCommand;
import dev.metaschema.oscal.tools.cli.core.commands.ValidateCommand;
import dev.metaschema.oscal.tools.cli.core.commands.assessmentplan.AssessmentPlanCommand;
import dev.metaschema.oscal.tools.cli.core.commands.assessmentresults.AssessmentResultsCommand;
import dev.metaschema.oscal.tools.cli.core.commands.catalog.CatalogCommand;
import dev.metaschema.oscal.tools.cli.core.commands.componentdefinition.ComponentDefinitionCommand;
import dev.metaschema.oscal.tools.cli.core.commands.metaschema.MetaschemaCommand;
import dev.metaschema.oscal.tools.cli.core.commands.poam.PlanOfActionsAndMilestonesCommand;
import dev.metaschema.oscal.tools.cli.core.commands.profile.ProfileCommand;
import dev.metaschema.oscal.tools.cli.core.commands.ssp.SystemSecurityPlanCommand;

import java.util.LinkedHashMap;
import java.util.Map;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
* SPDX-License-Identifier: CC0-1.0
*/

package gov.nist.secauto.oscal.tools.cli.core.commands;
package dev.metaschema.oscal.tools.cli.core.commands;

import gov.nist.secauto.metaschema.cli.processor.CallingContext;
import gov.nist.secauto.metaschema.cli.processor.command.CommandExecutionException;
import gov.nist.secauto.metaschema.cli.processor.command.ICommandExecutor;
import dev.metaschema.cli.processor.CallingContext;
import dev.metaschema.cli.processor.command.CommandExecutionException;
import dev.metaschema.cli.processor.command.ICommandExecutor;

import org.apache.commons.cli.CommandLine;
import org.apache.logging.log4j.LogManager;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@
* SPDX-License-Identifier: CC0-1.0
*/

package gov.nist.secauto.oscal.tools.cli.core.commands;
package dev.metaschema.oscal.tools.cli.core.commands;

import gov.nist.secauto.metaschema.cli.commands.AbstractConvertSubcommand;
import gov.nist.secauto.metaschema.cli.processor.CallingContext;
import gov.nist.secauto.metaschema.cli.processor.command.CommandExecutionException;
import gov.nist.secauto.metaschema.cli.processor.command.ICommandExecutor;
import gov.nist.secauto.metaschema.core.model.IBoundObject;
import gov.nist.secauto.metaschema.databind.IBindingContext;
import gov.nist.secauto.metaschema.databind.io.Format;
import gov.nist.secauto.metaschema.databind.io.IBoundLoader;
import gov.nist.secauto.oscal.lib.OscalBindingContext;
import dev.metaschema.cli.commands.AbstractConvertSubcommand;
import dev.metaschema.cli.processor.CallingContext;
import dev.metaschema.cli.processor.command.CommandExecutionException;
import dev.metaschema.cli.processor.command.ICommandExecutor;
import dev.metaschema.core.model.IBoundObject;
import dev.metaschema.databind.IBindingContext;
import dev.metaschema.databind.io.Format;
import dev.metaschema.databind.io.IBoundLoader;
import dev.metaschema.oscal.lib.OscalBindingContext;

import org.apache.commons.cli.CommandLine;
import org.apache.logging.log4j.LogManager;
Expand Down
Loading
Loading