cess-portal is the client of the cess project. By using some simple commands of cess-portal, you can easily realize a series of operations such as purchasing space, querying space, uploading/downloading files, and querying file information on the Linux system.
If you don't have git software on your machine, please install it first
yum install git -y
First you need to download the cess-portal project from GitHub
git clone https://github.com/CESSProject/cess-portal.git
Then run the build.sh(On Linux) or build.bat(On Windows) script file in the ‘install_ctl‘ folder,You can compile this project on any system,Before downloading, please install golang on the system and the version must be over 1.17.
##Compile with script
cd /cess-portal/install_ctl
##Run it on linux platform
sh build.sh
Finally, you can place the 'install_ctl' folder in your Linux environment,you can also operate directly in this folder
#If you are not in the install_ctl folder, please enter first
cd install_ctl
##Provide run permission
chmod 777 install-cessctl.sh
##Configure a one-click install script
vim install-cessctl.sh
Let me introduce the content of the configuration file of the one-click installation script.
##The log file of the client's operation output, your operation results will be recorded in the output.log file under this file
boardPath='/root'
##The mailing address of the CESS chain
cessRpcAddr='ws://xxx.xx.xx.xxx:9949/'
##tCESS pick-up tap address
faucetAddress='http://xx.xxx.xx.xx:9708/transfer'
##Memo Seed for Wallet
idAccountPhraseOrSeed='lazy funny invest opinion jaguar romance anger return glare flat lift clap'
##wallet address
walletAddress='5AhdZVDwjFXpvbsTjHaXv2jqNos49zFFnb5K4A1hnzVSo1iR'
##If the file upload is encrypted, the password memo of the file will be saved here, and it can be created to the next directory of the existing folder.
keyPath='/root/keypath'
##The path address of the file download, the downloaded files will appear here, support to create the next level directory of the existing folder
installPath='/root/cessDownload'
Please edit the configuration of the above file, press the ESC key on the keyboard and enter': wq', then press the Enter key on keyboard for save it.Next you can run the script to install.
./install-cessctl.sh
| command group name | subcommand name | features |
|---|---|---|
| query | price | Query the current storage price per MB |
| query | space | Query currently used space, purchased space, remaining space |
| query | file | Query file or file list |
| file | upload | upload files |
| file | download | download file |
| file | delete | delete file |
| file | decrypt | decrypt encrypted files |
| purchase | storage | buy storage |
| purchase | free | Get coins from the faucet |
-h,--help:Get the specific operation method of the command line
-c,--config:Absolute path, the address of the configuration file; used when not defined:/etc/cess.d/cess_client.yaml
boardPath:Absolute path, the data kanban location of the result output; if not defined, output to: /etc/cess.d file.
cessRpcAddr:Chain interaction address, the address that interacts with the chain.
faucetAddress:Faucet address, the address to get coins from the faucet.
idAccountPhraseOrSeed:Account private key, which is used as the user's mnemonic when signing transactions.
walletAddress:The wallet public key address, the owner id of the file when uploading the file metadata.
Chain query and displays the current lease storage space Price (Unit: TCess / GB)
cessctl query price
cessctl query price
Chain query current account purchased storage space usage (used and remaining)
cessctl query space
cessctl query space
Chain query all file information that has been uploaded by the current account (sorting, keyword retrieval...)
cessctl query file
If fileid is vaild, output all uploaded file information of the user in the configuration file
Query single file information:cessctl query file 1483720947931287552
Query file list information:cessctl query file
Send local source files to scheduling nodes
cessctl file upload
file path:The absolute path of the file, not a folder
backups:The number of backups of uploaded files in the CESS system. The more the number of backups, the more secure it is and the more space it consumes
cessctl file upload /root/test.txt 3
Download file based on fileid,Download to the installPath path in the configuration file
cessctl file download
fileid:The unique id of the file
cessctl file download 1483720947931287552
Send on-chain transactions, buy space
cessctl purchase storage
space quantity:The number of expansion capacity, unit: 1/1GB
space duration:You want to buy space for several time units, unit: 1/1month
expected price:The maximum acceptable price for buying space, in cess; if it is empty, all prices are accepted
expected price 20cess:cessctl purchase storage 1 1 20
All price accepted:cessctl purchase storage 1 1
Get a certain amount of tokens through the faucet service
cessctl purchase free
address:wallet address
cessctl purchase free cXjsAyird2dizRjmHML9Eqxp1MGodGdEUHv8rjr7z56Dv5A7C
Delete file meta information.
cessctl file delete
fileid:file unique id
cessctl file delete 1506154108548026368
Decrypt the files that have not been decrypted, and the decrypted files will be stored in the 'installPath' path of the configuration file.
cessctl file decrypt
filepath:path to the file that needs to be decrypted
cessctl file decrypt /root/test.txt
$ claude mcp add cess-portal \
-- python -m otcore.mcp_server <graph>