Skip to main content

Crate nibkeep_cli

Crate nibkeep_cli 

Source
Expand description

nib, the generic command-line tool for NibKeep.

The commands run on an Environment, which gives them randomness, the time, prompts for passphrases and the platform’s keystore, so that tests can run every command in the test process. The reasons for the tool’s shape are in docs/Technical-design.md, section 16.

Structs§

Account
The person’s account on this computer, which names the user of a new library.
Cli
nib: structured data and files, on your own devices.
EditArgs
What nib edit takes.
Keeps
How many bytes of files an everyday device keeps, as --keeps gives it: None for the default.
McpServer
A server for an AI agent: on the person’s replica, as the AI client, or on the agent’s own replica of a library.
NewDevice
How nib recovery makes this computer a new device.
PlaceArgs
Where a rule goes among the others.
Port
The UDP port that a command takes connections on.
RecipeArgs
What a generated password is made of: twenty characters of every kind, unless these say otherwise.
Rest
Whatever a command that nib does not have is given.
System
The real world: the operating system’s randomness, clock and keystore, and the terminal.
Timings
How long the parts of a command took. A part that the command had no need of is None: nib init opens no library, and makes and protects its keys as part of its work.
UntilUnread
A writer that writes until nothing reads what it writes, as when head has read enough, and then takes what is written without writing it: a command finishes its work whether or not its output is read, and says nothing of output that nobody reads.
Waits
How many days an archive node waits before purging, as --waits gives it: None for the default, Some(0) for none.

Enums§

Absent
The commands of other version control systems that nib does not have, each of which says what to do instead, with whatever it is given.
BackupCommand
What nib backup can do.
CliError
Why a command failed.
Command
What nib can do.
DeviceCommand
What nib device can do.
FileCommand
What nib file can do, in the personal space.
Firewall
What nib did about the firewall, so that the person’s other devices reach nibkeep-sync.
McpAction
What nib mcp does.
Moment
A moment from the command line: a day, which means its end, or a date and time, in local time unless it gives its offset from UTC.
NewSpacesArg
Whether a device takes the spaces made later, or asks first.
PolicyCommand
What nib policy can do, in the personal space. A policy is found by its name, its ID or a prefix of its ID; a rule by its number in nib policy list, its ID or a prefix of it.
PurgesCommand
What nib purges can do.
RecoveryCommand
What nib recovery can do.
RoleArg
A role in a shared space.
RuleCommand
What nib policy rule can do.
SecretCommand
What nib secret can do, in the personal space. The entity is found by its ID, a prefix of its ID, or its name.
SpaceCommand
What nib space can do.
Switch
On or off.
TreeCommand
The commands of trees, named as Git, Mercurial, Subversion, Fossil and Jujutsu name theirs, so that whoever knows one of them knows these: each works in the tree whose folder holds the current folder, unless it names one.
TypeCommand
What nib type can do. Names without a dot are your own, in the namespace local.

Traits§

Environment
What commands need from the world.

Functions§

clear_git_variables
Clears from a command of Git the variables that would make it work on another repository than the folder it is given, as a hook or an alias of Git that runs nib sets them. Clears from a command of Git the variables that would make it work on another repository than the folder it is given, as a hook or an alias of Git that runs nib sets them.
command
nib’s commands as clap knows them, with nib --help listing them by what they work on, and the other names that some answer to.
platform_keystore
Makes the platform’s keystore the one that libraries use. Returns whether there is one.
printable
A line for the terminal, with the characters that it would hide or act on, but line breaks, written as escapes: a carriage return as \r, an escape as \u{1b}, and the invisible ones that hide or reorder text, as a zero-width space or a right-to-left override. So an argument that a script read on Windows, ending in a carriage return, shows it, and a name or path that another device wrote cannot change what the terminal shows in an error, a note or a question. What commands print on standard output is left as it is, for other programs to read.
run
Runs a command, and writes what it has to say to output.
run_timed
Runs a command as run does, and tells how long its parts took.