Reference
Command line
The malspark command: run the pipeline in one process, show the configuration, maintain the long-term memory and make the first admin account.
The malspark command runs the pipeline in a single process, with no API,
worker or backing service. It is useful for a quick local run, for scripting
and for development. For anything shared, use the stack and the
REST API.
uv run malspark --helpWhere it reads its settings
The command line builds the settings model directly. It reads the process
environment and a .env file at the project root, not the settings store the
console edits. Nested settings use a double underscore:
export LLM__PROVIDER=anthropic
export NEGOTIATION__MAX_ITERATIONS=3It is the one consumer that works this way. See Configuration.
malspark analyze
Runs the full pipeline on one sample and prints the verdict.
uv run malspark analyze <sha256> --sample ./sample.dll --report report.md --output bundle.json| Argument or option | Meaning |
|---|---|
FILE_HASH | The sample's identifier: the hash that names its file under data/samples/. |
--name, -n | A readable file name for the report. |
--sample, -s | The path of the sample file, for sandbox submission. |
--provider, -p | A registered LLM provider's name, in place of the configured one. |
--max-iterations, -i | The debate's round limit, in place of negotiation.max_iterations. |
--mock, -m | Run without real model calls. |
--output, -o | Write the STIX 2.1 bundle to this file. |
--report, -r | Write the Markdown report to this file. |
--ignore-earlier-runs | Start without an earlier run's memory of this sample. The run still stores its own case when it completes. |
The command prints the verdict, the number of debate rounds, whether consensus was reached, a short run summary and the STIX bundle. It exits with code 1 when the pipeline fails.
A run from the command line has no account, so it uses the unscoped memory.
There is no isolated_memory option.
A dry run with no model:
uv run malspark analyze sample_1 --mock --name test.exemalspark info
Prints the active configuration: the LLM provider, the expert and judge models, the round limit, the token limit, the active team, its analysts and the registered parsers.
malspark create-admin
Creates an admin account, or promotes an existing account to admin, in the
API's database. No endpoint grants admin, so this is how the first one is
made. Unlike the other commands it works on the stack's database, not on the
local settings: it reads DATABASE_URL as the API does and uses the API's own
user model and password hashing, so it needs the API package (uv sync --all-packages, or the backend image).
In the compose stack, run it in the API container, which has both:
make create-admin [email protected]
# the same, by hand:
docker compose -f docker/docker-compose.yml exec backend-api malspark create-admin [email protected]make create-admin reads EMAIL from its own command line only, never from
the environment, where git and other tools keep the user's own address.
| Argument or option | Meaning |
|---|---|
EMAIL | The account's e-mail address, exactly as it signs in with it. |
--full-name | The name of an account the command creates. Default Administrator. |
--password-stdin | Read a new account's password from standard input instead of asking for it (once, and without echo when standard input is a terminal). |
- No account with that address: one is created with the
adminrole. Its password is asked for twice on the terminal, hidden. It is never taken from an argument, and it follows the registration's rule of 8 to 128 characters. - An existing account: it is promoted and keeps its password; nothing is asked. Promoting an account that is already an admin changes nothing and says so. A deactivated account is promoted and stays deactivated, and the command says that it cannot sign in.
- An account whose address differs only in case (
Kate@againstkate@): sign-in compares the address exactly, so these are two accounts. The command refuses, says how many there are, and changes nothing; give the stored address exactly.
A creation or a promotion is recorded in the audit log as auth.role.grant, with no actor (the command line is not an account) and the account as its resource.
The command refuses, and changes nothing, when the database cannot be reached
or does not carry this release's migrations (run make migrate, or let the
stack's migrate service finish, first). It exits with code 1 on a refusal.
For a script, write the password to standard input. -T turns off the
terminal that docker compose exec allocates:
printf '%s\n' "$ADMIN_PASSWORD" | docker compose -f docker/docker-compose.yml \
exec -T backend-api malspark create-admin [email protected] --password-stdinmalspark memory
Inspects and maintains the long-term case memory.
uv run malspark memory stats
uv run malspark memory purge-low-quality --dry-run| Command | What it does |
|---|---|
memory stats | Shows the configured backend and how many cases it holds. |
memory purge-low-quality | Removes stored cases below the write-time quality gate, which would otherwise bias later runs. |
purge-low-quality takes:
| Option | Default | Meaning |
|---|---|---|
--max-techniques N | 1 | Purge cases with at most N techniques. -1 turns this test off. |
--require-uncorroborated / --allow-corroborated | require | Also require that no technique was corroborated. |
--include-errors / --skip-errors | include | Also purge cases recorded with an analyst error. |
--dry-run | off | Count what would be removed, and remove nothing. |
The same purge is available to an administrator through
POST /api/v1/system/ltm/purge.