I found the answer. put this code in php file on the root of crm path and run in webbrowser:
<?php
include_once('vtlib/Vtiger/Module.php');
$moduleInstance = Vtiger_Module::getInstance('Leads');
$moduleInstance->addLink('DETAILVIEW', 'Test1', 'index.php');
//$moduleInstance->deleteLink('DETAILVIEW', 'Test1', 'index.php'); //this is for delete
?>