Is it a coincidence that recently we were discussing a book that Rabbi Yitzak Shapiro wrote entitled "The Torah of the King" which became notorious to the Israeli government because of accusations that it advised people to kill muslims. The book does discuss the various halachas concerning when a Jew is permitted, or commanded, to kill non-Jews. The Tanakh is a prime source for the book along with the Gemara. But while I am studying this coming Shabbat parasha I read the commandments concerning the Jewish king, and the Torahs he must write...
Deuteronomy - Chapter 1714. When you come to the land the Lord, your God, is giving you, and you possess it and live therein, and you say, "I will set a king over myself, like all the nations around me,"
15. you shall set a king over you, one whom the Lord, your God, chooses; from among your brothers, you shall set a king over yourself; you shall not appoint a foreigner over yourself, one who is not your brother.
16. Only, he may not acquire many horses for himself, so that he will not bring the people back to Egypt in order to acquire many horses, for the Lord said to you, "You shall not return that way any more."
17. And he shall not take many wives for himself, and his heart must not turn away, and he shall not acquire much silver and gold for himself.
18.
And it will be, when he sits upon his royal throne, that he shall write for himself two copies of this Torah on a scroll from [that Torah which is] before the Levitic kohanim.19.
And it shall be with him, and he shall read it all the days of his life, so that he may learn to fear the Lord, his God, to keep all the words of this Torah and these statutes, to perform them,20.
so that his heart will not be haughty over his brothers, and so that he will not turn away from the commandment, either to the right or to the left, in order that he may prolong [his] days in his kingdom, he and his sons, among Israel.
INN Story on Rabbi being harassed for this book :
http://www.israelnationalnews.com/News/news.aspx/139031