Compares Nikasa's sample app and prints the report
nksetup[--check][--rebuild]
Builds the TLS key tools and pulls the capture images. It keeps those this version already made, so a second run makes nothing. --check lists what is there, and --rebuild makes every one again.
nkinit[repo-dir]
Drafts nk/app.yaml from your repository
nkinit[repo-dir]--ci
Writes nk/ci/github.yml, a CI job for GitHub Actions
nktry<image>
Starts the draft once and says what the start shows
nkrun<image><out-dir>
One run, kept as a folder; exits 1 when a request file failed
nkcompare<old><new>[out-dir]
The whole compare: old runs, new runs, report
nkrecord<old><pack-dir><out-dir>
Records what a command sends the old build as a pack
nkimportpcap|har|gor<input><packs-dir>
Turns a capture into packs
nkimportreviewed<pack-dir>...
Marks packs whose review.md you have read, so a compare may use them
nkclear--slot<n>
Removes what stopped runs left on a sandbox network that no run holds
nk diff <new.json>[,...] <old.json>...
Compares saved observations without running anything
nkobserve<run-dir>...
Reads saved runs again, for example after upgrading Nikasa or adding a mask rule
nkaccept<out-dir>
Adds the changes a report listed to nk/accepted.yaml
nkmask
Records a place, field, pattern or value in nk/masks.yaml
nkreportlist|show|check<out-dir>
Reads a report and writes nothing
nk--version
Prints the version
Some flags and commands below take a pack. A pack is a folder that holds a recorded session, made by nkrecord or nkimport. The answers of any outside services are recorded in it. Nikasa sends the pack again to both builds, in place of request files.
Nikasa starts each build several times. What differs between runs of the same build, such as ids and timestamps, is noise and is not counted.
A compare starts 3 old runs and 2 new runs.
A compare that finds nothing stops after the first 5 runs.
When every new run shows a difference, it makes more runs to confirm it, up to 8 old runs and 4 new runs. The difference counts as a change only if all 8 old runs agree on that point and all 4 new runs show it.
A difference that only some new runs show is listed as unstable and is not counted.
Set the number of old runs with --old-runs<n>, or with a number after the output folder. --fail-on-change fails the job when a counted change showed in every new run.
A recorded pack instead of --specs: a folder, a link or an s3:// path; default nk/packs/main
--with<file>
A project's own compose files, loaded first
--old-with<file>, --new-with<file>
A compose file laid over one side only
--image<service>=<old>,<new>
That service runs its own images, old then new
--host<url>
The address requests go to; default the app file's x-nk:host, else http://app:8000
--env-file<path>
The env file Compose fills the app file's variables from, in place of the files x-nk:env_file records. Give it again for more, later ones winning. nktry, nkrun, nkrecord and nkinit take it too. Env file paths says where each path starts.
List each change seen while the app starts, or in the background (work that no request caused), instead of one line for each service and place. They count either way
--fail-on-change
Exit 1 when the report lists a change in every new run. The Exit status section below lists the three exits
--ignore<place>
Leave out changes there; * is any run of characters, ? one
--accepted<file>, --no-accepted
Read this accepted file instead of nk/accepted.yaml, or none
--masks<file>
Read these mask rules instead of nk/masks.yaml
--tracker<url>, --tracker-kind<kind>
Where the link beside each change opens a new issue
Nothing outside the sandbox can be reached or resolved; nktry takes it too
--live-outside
Every run reaches outside hosts live and nothing is recorded
--https-issuer
For an app that refuses an http login provider, as ASP.NET does by default. The stand-in provider that signs the tokens a pack sends again is given an https address. See Logins through an outside provider.
--no-ebpf
No eBPF probes, which read TLS keys of Go and .NET 8 programs
Draft from this compose file; give it again to merge several, in order
--service<name>
This service is the app. --serviceapp builds the root Dockerfile beside the file's services, when none is called app and the repository's own name names no image in the file
--port<n>
The port the app listens on
--image<ref>
Draft the app alone from this image
--app-dockerfile<path>
Draft the app from this Dockerfile, beside the services of --from
--docker-socket
Keep mounts of the Docker socket
--yes
Take the first choice of each question. It fills no setting and still lists what is missing
--verbose
Print everything, not just the first lines
--ci
Write the CI job and draft no app file; goes with none of the flags above
--env-file<path>
Record this env file as x-nk:env_file, in place of the .env beside the compose file. It is written as a path from nk/, such as ../docker/.env. Give it again for more, later ones winning. The Env file paths section below says where the path you give starts
nk record <old-image> <pack-dir> <out-dir> --app <file> [-- <command> [args]...]
Flag
What it does
--driver playwright|cypress|bruno|newman
Run this folder's suite or collection as it is; the app file's x-nk:tests can name it, and words after -- replace its args
--driver-version<version>
Pick another version than the one your lockfile names
--driver-image<image>
Run your command in a container of this image, with this folder at /work
--on-host
Run your command on this machine, or wait for Enter with no command
--relay, --no-relay
Turn the forwarder from localhost:<theapp'sport> to the app on or off
--seed-dump, --seed
Start from a seed, kept in the pack's state.json
--env-file<path>
The env file the app file's variables are filled from, in place of those x-nk:env_file records; its path is from the folder nk runs in, as the Env file paths section below says