Snowflake CLI provides you a set of commands to interact with the Solana on-chain cron jobs.
Read this article to know more about the CLI: https://medium.com/@snowflake_so/snowflake-cli-is-here-be75840bfbf3
Install with NPM
npm install -g @snowflake-so/snowflake-cli
Or with Yarn
yarn add -G @snowflake-so/snowflake-cli
Usage: snowflake [options] [command]
Snowflake CLI to interact with Snowflake SDK
Options:
-V, --version output the version number
-h, --help display help for command
Commands:
config Configure Snowflake CLI
job Manage job
jobs Manage jobs
account Manage wallet account
help [command] display help for command
To create a new command, go to src/command and create a new command following the structure of current commands config.ts or job.ts.
Add a new command to the command instruction in the index.ts
--help (-h): Provides help information
--version (-v): Prints the version number
Usage: snowflake config get [options]
Get Snowflake CLI configuration
Options:
-h, --help display help for command
config get: Prints the configuration file
Usage: snowflake config set [options]
Set Snowflake CLI configuration
Options:
--url <RPC_URL> Set URL to Solana RPC endpoint
--keypair <PATH_TO_KEYPAIR> Set path to keypair
-h, --help display help for command
config set: Sets the configuration file
--url <URL>: Solana Cluster endpoint (mainnet-beta, devnet, testnet)--keypair <PATH_TO_KEYPAIR>: Path to keypair
job get [publicKey]
publicKey: Public key of a job
Usage: snowflake jobs get [options]
Get global jobs
Options:
--latest Get latest job
--limit <LIMIT> Limit number of jobs
--offset <OFFSET> Offset number of jobs
--owner <OWNER_ADDRESS> Get jobs by owner
-p, --pretty Pretty print
-f, --fields [FIELDS] Fields to display
-h, --help display help for command
jobs get: Get all Jobs
--limit <LIMIT>: Limit number of jobs fetched--offset <OFFSET>: Offset number of jobs fetched--owner <OWNER_ADDRESS>: Fetch jobs of provided owner address-p, --pretty: Prettify the output data-f, --fields: Specify the fields of the output data
Usage: snowflake job delete [options] [publicKey]
Delete a job
Arguments:
publicKey Public key of the job
Options:
-h, --help display help for command
job delete [publicKey]: Deletes a job
publicKey: Public key of a job
Usage: snowflake account [options] [command]
Manage wallet account
Options:
-h, --help display help for command
Commands:
pda [publicKey] Get user account information
deposit [amount] Deposit to user fee account
help [command] display help for command
account pda [publicKey]: Get information of the user fee account (Program Derived Address)
publicKey: Public key of wallet account
account deposit [amount]: Deposit an amount of lamports to the user fee account
amount: Amount of lamports to be deposited
-
Twitter: https://twitter.com/snowflake_sol
-
Website: https://snowflake.so/
-
Discord: https://discord.gg/VjebQgGa
@snowflake-so