Skip to content

Mecha Agent on the device for provisioning, messaging and more

Notifications You must be signed in to change notification settings

mecha-org/mecha-agent

Repository files navigation

mecha-agent

Mecha Agent is the service running on device to manage the connection with Mecha Services includes features for provisioning, messaging and telemetry. Check the docs for more information.

Dependencies

Rust: 1.70 or above

Running the mecha-agent on local

  1. Clone this repository
$ git clone https://github.com/mecha-org/mecha-agent
  1. Create your settings.yml using the settings.yml.example provided, update the defaults as necessary
$ cd mecha-agent
$ cp settings.yml.example settings.yml
  1. Run the mecha-agent using cargo run
$ cargo run -- -s ./settings.yml
  1. To generate the release build
$ cargo build --release
$ ./target/release/mecha_agent_server -s ./settings.yml

Running via Docker

  1. Ensure you have settings.yml in the repository root directory generated with the required settings for your docker.

  2. Build the docker image using the Dockerfile provided in the root directory

$ docker build -t mecha-org/mecha-agent .
  1. Run the docker image, with the port exposed in your settings.yml for the grpc server
$ docker run -p 3001:3001 mecha-org/mecha-agent

Commands

Start

Starts the agent, but only if it is provisioned.

$ mecha-agent start -s ./settings.yml

Options

-s ./settings.yml: Specifies the path to the settings file.
--server: Enables GRPC server mode.

Notes

GRPC: By default, GRPC does not start unless --server is used.
Server Mode: If the --server flag is added, GRPC will be enabled.

Setup

Runs a provisioning flow via CLI.

$ mecha-agent setup

Whoami

$ mecha-agent whoami

Reset

$ mecha-agent reset

About

Mecha Agent on the device for provisioning, messaging and more

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published