You’ll need a hose barb and olive, an 8mm torx, a 6mm spanner, some very sharp cable cutters or hose cutters and a bleed kit.
Disconnect the existing end from the lever caliper – unscrew the nut then pull- chop the hose to the correct length, stick the rubber bit and nut back on and an olive then screw in the new barb, slide the olive up to the barb, stick the hose back into the lever body and tighten the nut up to the correct torque. You’ll then need to bleed the brake is you’ll have let loads of air into the system.