This is a fabric client mod which will help you place torches.
NOTE: Fabric API is needed for this mod to function.
To use it, put torches in your offhand. It will then start automatically placing torches when the LightLevel of the block you are standing on is less than 4. It's that simple!
Changing light level (introduced in v1.1)
You can change the light level at which the mod starts placing torches using the mod settings on Mod Menu. Or edit
.minecraft/config/autotorch.json and change
lightLevel to what you want
Accurate Torch Placement (Introduced in v1.2)
You can enable the Accurate Torch Placement option in the Mod settings if you want your torch to be placed on top of the block you are standing on, every time. It is trned off by default because it can be considered cheaty. So be careful while using it.
NOTE: You only need to install this on your client. Installing on server is unnecessary.