CLI overview
One binary, four phases. Each phase is a top-level command that can be run on its own, locally or in CI.
secureai [command] [flags]
Available Commands:
proxy Expose a configured text model as OpenAI Chat Completions
run Run BUILD, TEST, VALIDATE, and RUNTIME from one manifest
scan Phase 1 BUILD: statically scan prompts and tool configs for risk
test Phase 2 TEST: offensive prompt-injection / jailbreak testing
validate Phase 3 VALIDATE: RAG security analysis and guardrail checking
runtime Phase 4 RUNTIME: context access control, behaviour fingerprinting,
capability enforcement
conformance Replay the CoreLayer CSV suites through each phase and score accuracy
login Authenticate the CLI via your browser (OAuth loopback + PKCE)
logout Clear stored CLI credentials
whoami Show the currently authenticated CLI userGlobal flags
These apply to every command.
| Flag | Default | Description |
|---|---|---|
--server | $SECUREAI_SERVER | Control-plane URL used for result upload and payload fetch. |
--no-upload | off | Run entirely locally. Results are printed but not sent to your organisation. |
-v, --version | - | Print the CLI version. |
-h, --help | - | Help for any command or subcommand. |
Results upload by default
Every phase reports to your organisation's dashboard so security work is visible without anyone forwarding terminal output. Use --no-upload when you are experimenting and do not want the run recorded.
Output formats
Every phase accepts --format. Use terminal when a human is reading and json when a machine is.
| Format | Available on | Use it for |
|---|---|---|
terminal | all phases | Human-readable, coloured, grouped by severity. The default. |
json | all phases | One object per run. Parse with jq, store as a build artefact. |
jsonl | scan | One finding per line. Streams into log pipelines cleanly. |
Failing a build
Each phase has a gate flag that decides the exit code. This is what turns CoreLayer into a check rather than a report.
| Phase | Gate flag | Meaning |
|---|---|---|
scan | --fail-on | Exit 1 if any finding is at or above this severity. |
test | --fail-asr | Exit 1 if attack success rate exceeds this percentage. |
validate | --fail-below | Exit 1 if the deployment score falls below this number. |
Exit 0 means the gate passed, 1 means it failed, and 2 means the CLI itself errored: bad flags, an unreachable server, or an unreadable file. A gate failure and a broken pipeline are different problems, so they get different codes. See Scores & exit codes.
Commands that need authentication
All of them. Every phase requires a session, as do run, proxy, and conformance. Without one the CLI exits 2 before doing any work. Only --version, --help, and login / logout / whoami run logged out, so you can install the binary and check it before you have an account.
The session check is a local one, which is why scan and validate still make no network calls and remain usable in a pre-commit hook or an air-gapped build. test is the exception in the other direction: its attack payloads are not in the binary at all but fetched from the control plane per run, so that phase is authenticated by the server rather than by the CLI.
Use --no-upload to keep results off the dashboard. It suppresses the upload, not the session requirement. Provider credentials are separate and belong in environment variables referenced by the model proxy config. See Authentication.