📄️ Using the CLI
The cosmo CLI is your one-stop-shop for all things Cosmonic. It puts at your fingertips the
📄️ Cosmo App
Cosmo app is used to manage all your applications deployed using wadm. It provides with all the necessary tools to retrieve, add, remove and inspect all the details of your deployed as well as undeployed applications. Following are the subcommands available under cosmo app.
📄️ Cosmo Build
To build custom wasmCloud entities like actors, providers or interfaces, cosmo build comes in as a handy tool. One can bring in their own project containing some business logic and build these entities by simply providing the path to the project or its associated wasmcloud.toml file. The built artifact is signed using keys or a user may use their own keys to sign the build.
📄️ Cosmo Completions
Shell completions for cosmo commands can be enabled with the use of cosmo completions. This feature will help you to easily navigate the CLI interface as it will recommend auto-completions for cosmo subcommands. Currently, shell completions can be generated for the following supported shell types:
🗃️ Cosmo Connect
2 items
📄️ Cosmo Disconnect
This command will remove Kubernetes resources started by cosmo connect k8s.
📄️ Cosmo Down
This command will stop all the resources started by cosmo up. Primarily it will stop the wasmCloud host and NATS leaf that were started on your local machine. If there is a single host running on your machine, cosmo down will stop that singular host. In case of multiple hosts, the user gets a choice to stop a specific host or all the running hosts on the system. To stop a specific host in a multiple host scenario, pass the --host-id flag to the command. To stop currently running hosts, pass the --all flag.
📄️ Cosmo Get
Cosmo get helps you in retrieving information about your lattice. It can help you retrieve all the links in the lattice, hosts, their inventories and claims. Following are the subcommands available under cosmo get:
📄️ Cosmo Inspect
Cosmo Inspect allows you to inspect the properties of an actor or provider, also called their "claims." It accepts a URL or file path. Here are a couple examples of claims:
📄️ Cosmo Launch
This command will help you to quickstart an actor on a local wasmCloud host. This will check if you have a wasmCloud host running locally and if not, it will start one on your local system. Then, it will launch an actor from the current project directory. You may specify a different project directory to pull the actor artifact from by passing the -p flag. Once you have launched your actor, you may view it in the Cosmonic UI. By default, the launched actor is published to the Cosmonic registry. If you want to publish your actor to a different registry, you can specify a registry URL with the -r option
📄️ Cosmo Link
Cosmo link enables you to interact with the link definitions in the lattice. You may query all the link, add new ones or delete existing ones in the lattice. Following are the subcommands available under cosmo link:
📄️ Cosmo Login
Every user that uses the Cosmonic CLI to access their constellation needs to be authenticated. In order to connect a new device to your constellation, you must authenticate by running cosmo login. This securely downloads credentials to your local machine, which are used for all subsequent commands.
📄️ Cosmo New
If you want to create your own actor implementations, the new command will help you to create a new actor from a template. This may be a completely new business logic or your own implementation of the offered actors. Here are the templates currently offered:
📄️ Cosmo Par
To add new provider archives to your constellation, you can use cosmo par. You may build new archives from your project into .par files and then add these files to the constellation using the Cosmonic UI or the cosmo par command. Following are the available subcommands:
📄️ Cosmo Reg
Cosmo reg allows users to interact with OCI compliant registries and their artifacts. A user may pull artifacts from the registry to use in their constellation. They may also push their own projects to registries to use in various constellations.Following are the subcommands available under cosmo reg.
📄️ Cosmo Scale
Cosmo scale supports scaling the actors in your constellation to handle concurrent requests. It accepts the host ID on which the actor is running and the reference of the actor to scale as required arguments. It also accepts a --max-concurrent value that specifies the maximum number of instances this actor can run concurrently. By default, the value is an unbounded level of concurrency. A value of zero is equivalent to stopping the actor.
📄️ Cosmo Up
The cosmo up command is used to connect your locally running host to a Cosmonic super constellation.
📄️ Cosmo Update
Update helps you to update an existing actor in your constellation with a new actor. Generally, this is useful when you want to deploy a new or updated version of your actor in the lattice. It accepts the host ID on which the actor is running, the actor ID and the reference of the new actor which is going to replace the existing one.
📄️ Cosmo Who Am I
Cosmo whoami checks connectivity Cosmonic queries device identity information. It gives you all constellation IDs associated with your account and returns your NATS public key.