Fiber Agent is a project designed to streamline server management and operations. Follow the steps below to install, configure, and run the project.
- Install Bun
- Bun Installation Guide
- Ensure Bun is properly installed before proceeding.
- Clone the repository:
$ git clone https://github.com/Keith-CY/fiber-agent.git
- Navigate into the project directory:
$ cd fiber-agent
- Install the dependencies using bun:
$ bun install
- Initialize the database:
$ npm run db
This command will create a temporary database inside the project, set NODE_ENV=production
to set the database in app directory
- Set the admin of the server:
$ npm run cli set-admin --code_hash <value> --hash_type <value> --args <value>
Replace placeholders with the appropriate values for your setup.
This admin will claim balances when channels are closed proactively.
- Start the development server:
$ npm run dev:server
- Access the management panel:
Open your browser and visit: http://127.0.0.1:3000/dashboard
Notes • Ensure all dependencies are correctly installed before running commands. • Replace placeholder values in set-admin command with valid inputs.
Several cli commands are provided for convenient operations.
$ npm run cli [command]
# Commands:
# set-admin [options] Set admin script for fiber agent
# admin Check admin info
# local-node Sync local fnn node
# channels List open channels
# sync Sync data from node
# clear-cache Clear Nodes, Channels and Invoices
# events
# help [command] display help for command