Last updated: 2024-12-21 01:09:49.947582 File source: link on GitLab
The Nunet Command-Line Interface (CLI) serves as a powerful tool for interacting with the Nunet ecosystem, enabling you to manage network configurations, control capabilities, and handle cryptographic keys. It provides a comprehensive set of commands to streamline various tasks and operations within the Nunet network.
This command provides a suite of operations tailored for interacting with the Nunet Actor System. It enables you to communicate with actors within the network, facilitating actions like sending messages, invoking specific behaviors, and broadcasting information to multiple actors simultaneously.
Detailed documentation can be found here.
This command focuses on capability management within the Nunet ecosystem. It allows you to define, delegate, and control the permissions and authorizations granted to different entities, ensuring secure and controlled interactions within the network.
Detailed documentation can be found here.
The config command allows to interact with and manage your configuration file directly from the command line. This allows you to view existing settings, modify them as needed, and ensure Nunet DMS is tailored to your preferences.
edit
: Opens the configuration file in your default text editor for manual adjustments.
get
: Retrieve and display the current value associated with a specific configuration key.
set
: Modify the configuration file by assigning a new value to a specified key.
-h, --help
: Display help information for the config
command and its subcommands.
The Nunet Key Management CLI allows generating new keypairs and retrieve the Decentralized Identifier (DID) associated with a specific key.
nunet key
Description: The primary command to manage keys within the Nunet DMS
Usage: nunet key COMMAND
Available Commands:
did
: Retrieve the DID for a specified key
new
: Generate a new keypair
Flags:
-h, --help
: Display help information for the main key
command.
nunet key did
Description: Retrieves and displays the DID associated with a specified key. This DID uniquely identifies the key within the Nunet network.
Usage: nunet key did <key-name> [flags]
Arguments:
<key-name>
: The name of the key for which the DID is to be retrieved
Flags:
-h, --help
: Display help information for the did
command
nunet key new
Description: Generates a new keypair and securely stores the private key in the user's local keystore. The corresponding public key can be used for various cryptographic operations within the Nunet DMS
Usage: nunet key new <name> [flags]
Arguments:
<name>
: A name to identify the newly generated keypair
Flags:
-h, --help
: Display help information for the new
command.
Important Considerations:
Keep your private keys secure, as they provide access to your identity and associated capabilities within the Nunet DMS
Choose descriptive names for your keypairs to easily identify their purpose or associated devices.
Starts the Nunet Device Management Service (DMS) process, responsible for handling network operations and device management.
Usage:
Flags:
-c, --context string
: Specifies the key and capability context to use (default: "dms").
-h, --help
: Displays help information for the run
command.
Example:
This starts the Nunet DMS with the default "dms" context.
nunet tap
Purpose: Creates a TAP (network tap) interface to bridge the host network with a virtual machine (VM). It also configures network settings like IP forwarding and iptables rules.
Key Points:
Root Privileges Required: This command necessitates root or administrator privileges for execution due to its manipulation of network interfaces and system-level settings.
Usage:
Arguments:
main_interface
: (e.g., eth0) The name of the existing network interface on your host machine that you want to bridge with the TAP interface.
vm_interface
: (e.g., tap0) The name you want to assign to the newly created TAP interface.
CIDR
: (e.g., 172.16.0.1/24) The Classless Inter-Domain Routing (CIDR) notation specifying the IP address range and subnet mask for the TAP interface. This ensures that the VM or container connected to the TAP has its own IP address within the specified network.
Flags:
-h, --help
: Displays help information for the tap
command.
Example:
This command will create a TAP interface named 'tap0' bridged to your host's 'eth0' interface. The 'tap0' interface will be assigned an IP address of '172.16.0.1' with a subnet mask of '/24'. This configuration allows a VM connected to 'tap0' to access the network through your host's 'eth0' interface.
Important Notes:
Ensure you have the necessary permissions to execute this command.
Be cautious when configuring network settings, as incorrect configurations can disrupt your network connectivity.
nunet gpu
Purpose: The nunet gpu
command provides gpu related apis.
Usage:
Available Operations:
list
: List all the available GPUs on the system.
test
: Test the GPU deployment on the system using docker.
Flags:
-h, --help
: Display help information for the gpu
command and its subcommands.
Example:
This command will list all the available GPUs on the system.
This command will test the GPU deployment on the system using docker.
Last updated: 2024-12-21 01:09:50.205591 File source: link on GitLab
The Nunet Actor System CLI provides a set of commands for interacting with the Nunet actor system, enabling you to send messages to actors, invoke behaviors, and broadcast messages across the network.
nunet actor msg
: Constructs a message for an actor.
nunet actor send
: Sends a constructed message to an actor.
nunet actor invoke
: Invokes a behavior in an actor and returns the result.
nunet actor broadcast
: Broadcasts a message to a topic, potentially reaching multiple actors.
nunet actor cmd
: Invokes a predefined public behavior on an actor.
nunet actor msg
This command is used to create a message that can be sent to an actor. It encapsulates the behavior to be invoked and the associated payload data.
Usage
Arguments
<behavior>
: The specific behavior you want the actor to perform upon receiving the message
<payload>
: The data accompanying the message, providing context or input for the behavior
Flags
-b, --broadcast string
: Designates the topic for broadcasting the message.
-c, --context string
: Specifies the capability context name
-d, --dest string
: Identifies the destination handle for the message.
-e, --expiry time
: Sets an expiration time for the message.
-h, --help
: Displays help information for the msg
command.
-i, --invoke
: Marks the message as an invocation, requesting a response from the actor.
-t, --timeout duration
: Sets a timeout for awaiting a response after invoking a behavior.
nunet actor send
This command delivers a previously constructed message to an actor.
Usage
Arguments
<msg>
: The message, created using the nunet actor msg
command, to be sent.
Flags
-h, --help
: Displays help information for the send
command.
nunet actor invoke
This command directly invokes a specific behavior on an actor and expects a response.
Usage
Arguments
<msg>
: The message, crafted with nunet actor msg
, containing the behavior and payload
Flags
-h, --help
: Displays help information for the invoke
command
nunet actor broadcast
This command disseminates a message to a designated topic, potentially reaching multiple actors who have subscribed to that topic.
Usage
Arguments
<msg>
: The message to be broadcasted
Flags
-h, --help
: Displays help information for the broadcast
command.
Please let me know if you have any other questions.
nunet actor cmd
This command invokes a behavior on an actor.
Usage
Available Commands
/broadcast/hello
: Invoke /broadcast/hello behavior on an actor.
/dms/node/onboarding/offboard
: Invoke /dms/node/onboarding/offboard behavior on an actor.
/dms/node/onboarding/onboard
: Invoke /dms/node/onboarding/onboard behavior on an actor.
/dms/node/onboarding/resource
: Invoke /dms/node/onboarding/resource behavior on an actor.
/dms/node/onboarding/status
: Invoke /dms/node/onboarding/status behavior on an actor.
/dms/node/peers/connect
: Invoke /dms/node/peers/connect behavior on an actor.
/dms/node/peers/dht
: Invoke /dms/node/peers/dht behavior on an actor.
/dms/node/peers/list
: Invoke /dms/node/peers/list behavior on an actor.
/dms/node/peers/ping
: Invoke /dms/node/peers/ping behavior on an actor.
/dms/node/peers/score
: Invoke /dms/node/peers/score behavior on an actor.
/dms/node/peers/self
: Invoke /dms/node/peers/self behavior on an actor.
/dms/node/vm/list
: Invoke /dms/node/vm/list behavior on an actor.
/dms/node/vm/start/custom
: Invoke /dms/node/vm/start/custom behavior on an actor.
/dms/node/vm/stop
: Invoke /dms/node/vm/stop behavior on an actor.
/public/hello
: Invoke /public/hello behavior on an actor
/public/status
: Invoke /public/status behavior on an actor
Flags
-c, --context string
: Capability context name.
-d, --dest string
: Destination DMS DID, peer ID or handle.
-e, --expiry time
: Expiration time.
-h, --help
: Help for the cmd
command.
-t, --timeout duration
: Timeout duration.
/broadcast/hello
Description: Invokes the /broadcast/hello
behavior on an actor. This sends a "hello" message to a broadcast topic for polite introduction.
Usage: nunet actor cmd /broadcast/hello [<param> ...] [flags]
Flags:
-h, --help
: Display help information for the /broadcast/hello
command
/dms/node/onboarding/offboard
Description: Invokes the /dms/node/onboarding/offboard
behavior on an actor. This is used to offboard a node from the DMS (Device Management Service).
Usage: nunet actor cmd /dms/node/onboarding/offboard [<param> ...]
Flags:
-h, --help
: Display help information for the /dms/node/onboarding/offboard
command.
/dms/node/onboarding/onboard
Description: Invokes the /dms/node/onboarding/onboard
behavior on an actor. This is used to onboard a node to the DMS, making its resources available for use.
Usage: nunet actor cmd /dms/node/onboarding/onboard [<param> ...] [flags]
Flags:
-C, --cpu float32
: CPU cores to allocate
-R, --ram uint
: Memory to allocate
-D, --disk uint
: Disk space to allocate
-G, --gpus string
: Comma-separated list of GPU Index and VRAM in GB to allocate e.g. "0:4,1:8". The gpu index can be obtained from 'nunet gpu list' command
--no-gpu
: Do not allocate any GPU
/dms/node/onboarding/status
Description: Invokes the /dms/node/onboarding/status
behavior on an actor. This is used to check the onboarding status of a node.
Usage: nunet actor cmd /dms/node/onboarding/status [<param> ...] [flags]
Flags:
-h, --help
: Display help information for the /dms/node/onboarding/status
command
/dms/node/peers/connect
Description: Invokes the /dms/node/peers/connect
behavior on an actor. This initiates a connection to a specified peer.
Usage: nunet actor cmd /dms/node/peers/connect [<param> ...] [flags]
Flags:
-a, --address string
: The peer address to connect to
-h, --help
: Display help information for the /dms/node/peers/connect
command.
/dms/node/peers/dht
Description: Invokes the /dms/node/peers/dht
behavior on an actor. This interacts with the Distributed Hash Table (DHT) used for peer discovery and content routing
Usage: nunet actor cmd /dms/node/peers/dht [<param> ...] [flags]
Flags:
-h, --help
: Display help information for the /dms/node/peers/dht
command.
/dms/node/peers/list
Description: Invokes the /dms/node/peers/list
behavior on an actor. This retrieves a list of connected peers
Usage: nunet actor cmd /dms/node/peers/list [<param> ...] [flags]
Flags:
-h, --help
: Display help information for the /dms/node/peers/list
command.
/dms/node/peers/ping
Description: Invokes the /dms/node/peers/ping
behavior on an actor. This sends a ping message to a specified host to check its reachability
Usage: nunet actor cmd /dms/node/peers/ping [<param> ...] [flags]
Flags:
-h, --help
: Display help information for the /dms/node/peers/ping
command
-H, --host string
: The host address to ping
/dms/node/peers/score
Description: Invokes the /dms/node/peers/score
behavior on an actor. This retrieves a snapshot of the peer's gossipsub broadcast score.
Usage: nunet actor cmd /dms/node/peers/score [<param> ...] [flags]
Flags:
-h, --help
: Display help information for the /dms/node/peers/score
command
/dms/node/peers/self
Description: Invokes the /dms/node/peers/self
behavior on an actor. This retrieves information about the node itself, such as its ID or addresses
Usage: nunet actor cmd /dms/node/peers/self [<param> ...] [flags]
Flags:
-h, --help
: Display help information for the /dms/node/peers/self
command.
/dms/node/vm/list
Description: Invokes the /dms/node/vm/list
behavior on an actor. This retrieves a list of virtual machines (VMs) running on the node
Usage: nunet actor cmd /dms/node/vm/list [<param> ...] [flags]
Flags:
-h, --help
: Display help information for the /dms/node/vm/list
command.
/dms/node/vm/start/custom
Description: Invokes the /dms/node/vm/start/custom
behavior on an actor. This starts a new VM with custom configurations.
Usage: nunet actor cmd /dms/node/vm/start/custom [<param> ...] [flags]
Flags:
-a, --args string
: Arguments to pass to the kernel
-z, --cpu float32
: CPU cores to allocate (default 1)
-h, --help
: Display help information for the /dms/node/vm/start/custom
command.
-i, --initrd string
: Path to initial ram disk
-k, --kernel string
: Path to kernel image file.
-m, --memory uint
: Memory to allocate (default 1024)
-r, --rootfs string
: Path to root fs image file
/dms/node/vm/stop
Description: Invokes the /dms/node/vm/stop
behavior on an actor. This stops a running VM
Usage: nunet actor cmd /dms/node/vm/stop [<param> ...] [flags]
Flags:
-h, --help
: Display help information for the /dms/node/vm/stop
command
-i, --id string
: Execution id of the VM
/public/hello
Description: Invokes the /public/hello
behavior on an actor. This broadcasts a "hello" for a polite introduction.
Usage: nunet actor cmd /public/hello [<param> ...] [flags]
Flags:
-h, --help
: Display help information for the /public/hello
command
/public/status
Description: Invokes the /public/status
behavior on an actor. This retrieves the status or health information of the actor or system
Flags:
-h, --help
: Display help information for the /public/status
command
These flags can be used with any of the above commands:
-c, --context string
: Specifies the capability context name. This is used for authorization or access control.
-d, --dest string
: Specifies the destination for the command. This can be a DMS DID (Decentralized Identifier), a peer ID, or a handle.
-e, --expiry time
: Sets an expiration time for the message or command.
-t, --timeout duration
: Sets a timeout duration for the command. If the command does not complete within the specified duration, it will time out.
-h, --help
: Display help information for the commands
Last updated: 2024-12-21 01:09:50.457391 File source: link on GitLab
The Nunet Capability Management CLI provides commands to manage capabilities within the Nunet ecosystem. Capabilities define the permissions and authorizations granted to different entities within the system. These commands allow you to create, modify, delegate, and list capabilities.
nunet cap anchor
: Add or modify capability anchors in a capability context.
nunet cap delegate
: Delegate capabilities for a subject.
nunet cap grant
: Grant (delegate) capabilities as anchors and side chains from a capability context.
nunet cap list
: List all capability anchors in a capability context
nunet cap new
: Create a new persistent capability context for DMS or personal usage
nunet cap remove
: Remove capability anchors in a capability context.
nunet cap anchor
This command is used to add new or modify existing capability anchors within a specific capability context. Anchors serve as the foundation for defining capabilities, establishing the core permissions and restrictions
Usage
Flags
-c, --context string
: Specifies the operation context, defining the key and capability context to use (defaults to "user").
-h, --help
: Displays help information for the anchor
command
--provide string
: Adds tokens as a "provide" anchor in JSON format, defining capabilities the context can offer
--require string
: Adds tokens as a "require" anchor in JSON format, defining capabilities the context demands
--root string
: Adds a DID as a "root" anchor, establishing the root authority for the context
nunet cap delegate
This command delegates specific capabilities to a subject, granting them permissions within the system
Usage
Arguments
<subjectDID>
: The Decentralized Identifier (DID) of the entity receiving the delegated capabilities
Flags
-a, --audience string
: (Optional) Specifies the audience DID, restricting the delegation to a specific recipient
--cap strings
: Defines the capabilities to be granted or delegated (can be specified multiple times)
-c, --context string
: Specifies the operation context (defaults to "user")
-d, --depth uint
: (Optional) Sets the delegation depth, controlling how many times the capabilities can be further delegated (default 0)
--duration duration
: Sets the duration for which the delegation is valid
-e, --expiry time
: Sets an expiration time for the delegation
-h, --help
: Displays help information for the delegate
command
--self-sign string
: Specifies self-signing options: 'no' (default), 'also', or 'only'
-t, --topic strings
: Defines the topics for which capabilities are granted or delegated (can be specified multiple times)
nunet cap grant
This command grants (delegates) capabilities as anchors and side chains from a specified capability context
Usage
Arguments
<subjectDID>
: The Decentralized Identifier (DID) of the entity receiving the granted capabilities
Flags
-a, --audience string
: (Optional) Specifies the audience DID
--cap strings
: Defines the capabilities to be granted or delegated
-c, --context string
: Specifies the operation context (defaults to "user")
-d, --depth uint
: (Optional) Sets the delegation depth
--duration duration
: Sets the duration for which the grant is valid
-e, --expiry time
: Sets an expiration time for the grant
-h, --help
: Displays help information for the grant
command
-t, --topic strings
: Defines the topics for which capabilities are granted
nunet cap list
This command lists all capability anchors within a specified capability context
Usage
Flags
-c, --context string
: Specifies the operation context (defaults to "user")
-h, --help
: Displays help information for the list
command
nunet cap new
This command creates a new persistent capability context, which can be used for DMS or personal purposes
Usage
Arguments
<name>
: The name for the new capability context
Flags
-h, --help
: Displays help information for the new
command
nunet cap remove
This command removes capability anchors from a specified capability context
Usage
Flags
-c, --context string
: Specifies the operation context (defaults to "user")
-h, --help
: Displays help information for the remove
command
--provide string
: Removes tokens from the "provide" anchor in JSON format
--require string
: Removes tokens from the "require" anchor in JSON format
--root string
: Removes a DID from the "root" anchor