Run it with ./lens, so it acts on the installation you chose.
Run every administration command with ./lens, from the installation directory. The installation must be running.
A command typed straight into your own shell knows nothing about the installation. It cannot reach the installation’s database or meshMeshA set of connected Mycelium services that exchange updates and keep the NovusLens log., which stay on Docker’s private network.
What ./lens does for each command
- It finds the installation: the
--directoryoption, then theNOVUSLENS_INSTALL_DIRvariable, then the directory that holdslens. - It reads
.novuslens.envand checks it as setup does. Your shell’sCONWAY_,NOVUSLENS_,MYCELIUM_,COMPOSE_,POSTGRES_andDATABASE_variables never reach the command. - It copies each host file the command reads into the service, as Give files from the host describes.
- It runs the command in the running
reasoningservice, with the installation’s configuration, on its private network. - It copies each output file back to the host, then deletes the copies it made in the service.
The commands
Two commands carry the administration. ./lens graph runs python -m conway_graph, the read modelRead modelThe database tables used by the map, Ask and Find. NovusLens rebuilds these tables from its history of recorded changes. and accounts. ./lens connectors runs python -m conway_connectors, the evidence imports. Each command takes a verb, then that verb’s flags. --org is an ordinary flag after the verb.
| Command | What it does |
|---|---|
./lens graph create-viewer --viewer <account> --role <role> --org <org> | Creates an account. Refuses a name that already exists and names ./lens graph update-viewer to change it. Takes --scope-cell and --passphrase. ./lens viewer, ./lens create-viewer and ./lens graph viewer run this command with the same flags. |
./lens graph update-viewer --viewer <account> [--role <role>] [--org <org>] | Changes an existing account. Refuses a name that does not exist, and refuses a call with no change flag. Changes only the flags given. An omitted --passphrase leaves the credential unchanged. ./lens update-viewer runs this command with the same flags. |
./lens graph keyperson --org <org> | Runs the key-person check against the installation’s configured mesh address. |
./lens graph <verb> | The other read-model commands: migrate, reset, materialise, engine, requeue, retry, show, guide, forget-org, finding-scope. |
./lens connectors document --org <org> --viewer <account> --title <title> --file <file> | IngestsIngestRead supplied records or documents and add their information to NovusLens, after the required checks. a document. |
./lens connectors acquire --org <org> --kind <kind> --mapping <file> | Acquires measured records from an operational system. |
./lens connectors correct --org <org> | Runs the correctorCorrectorThe NovusLens component that compares measurements with recorded statements and adds observations and differences to the log.. |
./lens connectors agents --org <org> --fixture <file> | Imports AgentFactsAgentFactsA signed statement from an agent about its allowed work, its permissions and the person answerable for it.. |
./lens connectors agent-source <verb> --org <org> | Manages an agent source: enrol, check, activate, criterion and mycelium-audit. |
./lens connectors notify <verb> --org <org> | Manages notifications: subscribe, list, remove, poll, watch and deliveries. |
./lens connectors <verb> | The other imports: stream, once, boundary, assurance <sub>, agent-demo, finance, regulation, ingest, people, drift, ops-report, agent-facts, domain-taxonomy, orgchart, link. Each verb’s --help lists its required flags. |
./lens exec -- <command> | Any command in a running service. Add --service <name> before -- to choose one other than reasoning. |
./lens compose -- <arguments> | A Docker ComposeDocker ComposeThe Docker tool that starts and connects the services listed in one configuration file. command for this installation. |
./lens reads only --directory and --version as its own options. Put them after graph or connectors and before the verb, as in ./lens graph --directory /srv/lens create-viewer --help. Everything after the verb belongs to the command. ./lens graph --help and ./lens connectors --help list the verbs. Every verb takes --help and lists its own flags, as in ./lens connectors document --help. A missing required flag, or a bad --role, is refused on this host before Docker runs.
Every ./lens graph verb takes --rich (the default), --plain or --json to choose its output. --wizard asks for each flag in turn, as in ./lens create-viewer --wizard; on the host it lets the required flags be left out. It needs a terminal for both input and output, so lens refuses it when you pipe or redirect the command.
./lens keyperson, ./lens document, ./lens acquire, ./lens correct, ./lens agents, ./lens agent-source and ./lens notify are not commands, and graph and connectors take no --. Each of these forms exits with an error that names the command to use instead. ./lens exec -- … and ./lens compose -- … keep their --.
./lens backup, ./lens restore and ./lens forget-org are installer commands. They have their own pages: Backup and restore and Accounts and stewardship.
Give files from the host
./lens copies a host file given with --file, --mapping, --fixture or --enrolment into the service before the command runs. It copies a host path given with --out back to the host after the command succeeds. For example, this pair writes an enrolmentEnrolmentThe operator's recorded permission for a source to send specified record types about named agents, using an identified signing key. record on the host and then reads it back:
./lens connectors agent-source enrol --org <org> ... --out product-source.json
./lens connectors agent-source activate --org <org> --viewer <operator-login> --enrolment product-source.jsonKeep these files outside /tmp. Inside the service, a /tmp path names the service’s own file.
Any other file option names a path inside the service. Send that file on standard input first:
./lens exec -- sh -c 'cat > /tmp/input.json' < input.jsonThen give /tmp/input.json to that option.
Reach the services
./lens graph materialise and ./lens graph requeue contact the mesh and need --host mesh-0. The interview command ./lens exec -- python -m conway_mesh.build needs it too. ./lens graph keyperson reads the installation’s configured mesh address, mesh-0, so it needs no --host. The reasoning service has no host port. Commands reach it inside the installation’s network.
When something goes wrong
| Message | Cause | Action |
|---|---|---|
lens connectors notify list: error: the following arguments are required: --org | The verb needs the flag it names and none was given. | Add the flag. ./lens connectors notify list --help lists them. |
<path> is not a file on this host. | A staged file option names a file that does not exist. | Correct the path. For a file already in the service, give its path under /tmp/. |
Refused --file /tmp/...: it exists on this host | The /tmp path could mean the host’s file or the service’s file. | Move the host file outside /tmp and give that path. |
Could not upload <file> to <path> in the reasoning service | The service is not running. | Run ./lens status. If a service is stopped, run ./lens resume. |
service "reasoning" is not running | The installation is stopped. | Run ./lens resume, then run the command again. |