Theophilus served the Caliph al-Mahdî, who esteemed him very much because of his superiority in the art of astrology. It is said that one day the Caliph wanted to take a trip into one of his provinces and to take his court with him. The Caliph’s wife sent someone to say to Theophilus: «It is you who have advised the Caliph to take this trip, thereby imposing upon us the fatigue and boredom of the journey, which we don’t need. I hope therefore that God will make you perish and disappear from this world, so that, rid of you, we may find some peace.» Theophilus replied to the servant who had brought him this message: «Return to your mistress and say to her: “It is not I who have advised the king to take this trip; he travels when it pleases him to do so”. As for the curse that you have cast upon me for God to hasten my death, the decision about it has already been taken and affirmed by God; I shall die soon; but do not suppose that I shall have died so that your prayer might be fulfilled; it is the will of my Creator that will accomplish it. But you, O Queen, I say to you: “Prepare a lot of dust for yourself; and when you learn that I am dead, pile all that dust on your head”.» When the Queen had heard these words, she was seized with a great fear, and she wondered apprehensively what the result would be. A little while afterward, Theophilus died and twenty days after him the Caliph al-Mahdî also died. That which Theophilus had determined came to pass.
Theophilus wrote four treatises on astrology in Greek (some excerpts from which are edited in the CCAG).
Works on Elections for Wars and Campaigns and Sovereignty addressed to his son Deucalion.
This is a work on military astrology, based on Iranian and Indian astrology; it is the only Medieval Greek astrological treatise devoted entirely to military astrology. It begins like this: 
The nature of the stars is specific, O most excellent Deucalion; their energy does not have a single dwelling-place but a variegated one and diverse [characteristics] suitable for every type of astrological influence, and each one of these things is especially made known in one generality for the active [planet] with regard to the disposition and characteristic emphasis alloted to it, for example in wars Mars and in speech Mercury, and in agricultural matters Saturn, and in matters of love Venus; for while these have [their nature] thus, not only does Mars activate war, but Saturn also accomplishes the ruin of kings and the taking of cities, as it is found in the mundane astrological influences. But Mars also makes arsons and pestilential sicknesses and droughts and scarcities of fruits. Similarly too, Mercury [makes] armed robberies and disorders and irregularities in life, or else it is called "the messenger," and it awards peace.
Similarly too, in genethliacal astrological influences, we find the stars acting one way and another and signifying in accordance with their configurations and their alternations of houses - [sometimes] indeed the malefics acting as benefics and the benefics being inactive, but still the astrological influences are activated in accordance with the chart and the determination of their individual degrees. And in view of this, the wise men of astrology made use of the stars by a mixture of their natures - not only distinguishing [them] in their most individual [significances] and according to [the nature of] each but also in those [significances] that are the most general and specialized — for example, about war; and they used all the stars and also the lights for working with a single chart.
And I kept this in mind because I know that military methods are seldom found in [the books of] the ancients, other than that from the mundane astrological influences [we can see that] there is going to be war and captivity in a this or that land, neglecting of course the more particular things, and in particular the expeditions or counter-expeditions that are made, [the rise of] tyrants, and those actions that are done in season and are provoked, I say, by two armies when they are encamped facing and attacking each other, of which it was difficult to find accurate day-by-day accounts in the books of the ancients.
And, having turned my mind to this, I thought it necessary to make a change and to draw from the genethliacal and horary systems some elections for war that have plausibility together with the truth, since I had also really had the proof of these in many [instances] - having been forced, as you knew, by those ruling at that time to take these things in hand, at the time when we made the expedition with them into the eastern regions in the country of Margiane  , and [there] we suffered successive military calamities, with much cold and an inclement winter, as well as with much fear and countless controversies.
But, while arranging these elections into some physical conformity of order, I have neglected none of the things that are needed and required in connection with military affairs, and I have composed a book entirely for this [purpose], having the military elections along with those for information about tyrants and cities that are being besieged and such like.
But it is necessary [that] you approach this treatise with great care and diligence, and by [using] the meagre theory make for yourself a combination of the influences of the signs and the stars, I mean of the planets and the fixed stars, and the luminaries, and the lots that are there and their rulers, and you will not err, if God is willing.
A “second edition” of this work contained matter ascribed to Zoroaster and Julian of Laodicea in Chapters 24-41; a recension of that edition was made about the year 1000 and still another by the Byzantine astrologer John Abramius in the late 14th century, when Eleutherius Eleus incorporated excerpts from this work in the compendium he issued under the name Palchus (see below).
Astrological Effects addressed to his son Deucalion.
It contains some Indian astrological material and is also partly dependent on Rhetorius’s compendium of astrology.
Various [Kinds of] Elections.
A treatise on elections related to the matters ruled by each of the 12 houses. It depends mainly on Dorotheus and Hephaestio of Thebes.
Collection on Cosmic Beginnings.
This is a treatise on mundane astrology that explains how to make annual and monthly predictions. It contains a section that discusses the beginning of the year according to the Egyptians, Greeks, Persians, and Arabs.
These books have been preserved more or less intact, along with fragments of their Arabic versions. Some selections from the Greek texts have been published in the CCAG . We may hope for critical editions of the texts by David Pingree.