Effective field theory (EFT) methods are applied to density functional theory (DFT) as part of a program to systematically go beyond mean-field approaches to medium and heavy nuclei. A system of fermions with short-range, natural interactions and an external confining potential (e.g., fermionic atoms in an optical trap) serves as a laboratory for studying DFT/EFT. An effective action formalism leads to a Kohn-Sham DFT by applying an inversion method order-by-order in the EFT expansion parameter. Representative results showing the convergence of Kohn-Sham calculations at zero temperature in the local density approximation (LDA) are compared to Thomas-Fermi calculations and to power-counting estimates.case, the explicit expansion parameter is the local Fermi momentum times the scattering length (and other effective range parameters). We assume a gradient expansion parameter that justifies a local density approximation, but the verification of this assumption is postponed to future work. Ultimately we are interested in calculating self-bound systems (e.g., nuclei), with spin-and isospin-dependent interactions and long-range forces (e.g., pion exchange). These are all significant but well-defined extensions of the model described here. In the meantime, the model provides a prototype for more complex systems and also has a physical realization in recent and forthcoming experiments on fermionic atoms in optical traps [17].The Kohn-Sham approach to DFT was proposed in Ref.[1]. Since then, the literature of DFT applications has grown exponentially, primarily in the areas of quantum chemistry and electronic structure [5]. A general introduction to density functional theory as conventionally applied is provided in the books by Dreizler and Gross [3] and Parr and Young [2], while Ref.[18] is a practitioners guide to DFT for quantum chemists. The connection of DFT to nonrelativistic mean-field approaches to nuclei (e.g., Skyrme models) was pointed out in Ref. [19] (and no doubt elsewhere) and was explored for covariant nuclear mean-field models in Refs. [20,21]. However, it has not led, to our knowledge, to new or systematically improved mean-field-type functionals for nuclei.The use of functional Legendre transformations for DFT with the effective action formalism was first detailed by Fukuda and collaborators [22,23], who also discuss the inversion and auxiliary field methods of constructing the effective action. The connection to Kohn-Sham DFT was shown by Valiev and Fernando [24,25,26,27] and later by other authors in Refs. [28,29,30]. Recent work by Polonyi and Sailer applies renormalization group methods and a cluster expansion to an effective-action formulation of generalized DFT for Coulomb systems [31]. To our knowledge, however, there is no prior work on merging the Kohn-Sham density functional approach and effective field theory.The plan of the paper is as follows. In Sect. II, we review effective field theory for a dilute system of fermions. In Sect. III, the effective action approach for determining a Kohn-Sham ...