@squaredmade/cli
v1.0.0
Published
Squared CLI is a command-line interface tool for managing RPC services in the Squared ecosystem.
Downloads
7
Readme
Squared CLI
Squared CLI is a command-line interface tool for managing RPC services in the Squared ecosystem.
Features
- Install and update RPC services
- List installed services
- Generate TypeScript client code for RPC services
Prerequisites
Before you begin, ensure you have the following installed:
- Go (version 1.16 or later)
- Node.js (version 14 or later)
- pnpm (version 6 or later)
Installation
Build the project:
pnpm buildRun the installation script:
./install.shThis script will build the Go binary and install it in a directory that's in your PATH.
Verify the installation:
squared --versionUsage
Installing an RPC Service
To install or update an RPC service:
squared rpc install <service-url>Example:
squared rpc install http://localhost:5173/rpc/sprintThis command will fetch the service information, save it locally, and generate a TypeScript client file in the gen/rpc directory.
Listing Installed Services
To list all installed services:
squared rpc listDevelopment
Project Structure
main.go: Entry point of the CLI applicationrpc_handlers.go: Contains the logic for RPC service managementinstall.sh: Installation script
Building
To build the project:
pnpm buildThis command will compile the Go code and generate the squared binary.
Testing
To run tests:
go test ./...