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.
- Edit
Args - What
nib edittakes. - Keeps
- How many bytes of files an everyday device keeps, as
--keepsgives it:Nonefor 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 recoverymakes this computer a new device. - Place
Args - Where a rule goes among the others.
- Port
- The UDP port that a command takes connections on.
- Recipe
Args - 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 initopens no library, and makes and protects its keys as part of its work. - Until
Unread - A writer that writes until nothing reads what it writes, as when
headhas 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
--waitsgives it:Nonefor 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.
- Backup
Command - What
nib backupcan do. - CliError
- Why a command failed.
- Command
- What
nibcan do. - Device
Command - What
nib devicecan do. - File
Command - What
nib filecan do, in the personal space. - Firewall
- What
nibdid about the firewall, so that the person’s other devices reachnibkeep-sync. - McpAction
- What
nib mcpdoes. - 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.
- NewSpaces
Arg - Whether a device takes the spaces made later, or asks first.
- Policy
Command - What
nib policycan 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 innib policy list, its ID or a prefix of it. - Purges
Command - What
nib purgescan do. - Recovery
Command - What
nib recoverycan do. - RoleArg
- A role in a shared space.
- Rule
Command - What
nib policy rulecan do. - Secret
Command - What
nib secretcan do, in the personal space. The entity is found by its ID, a prefix of its ID, or its name. - Space
Command - What
nib spacecan do. - Switch
- On or off.
- Tree
Command - 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.
- Type
Command - What
nib typecan do. Names without a dot are your own, in the namespacelocal.
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
nibsets 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 runsnibsets them. - command
nib’s commands as clap knows them, withnib --helplisting 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
rundoes, and tells how long its parts took.