We propose AlphaGlass, an inherently interpretable machine-learning framework for constructing portfolios that directly optimize investment objectives. AlphaGlass maps stock characteristics into additive signals with sparse interactions and converts these signals into long-short portfolios through a differentiable rank-and-mask layer. This end-to-end design allows the model to optimize objectives such as the Sharpe ratio or mean-variance utility while keeping portfolio weights interpretable and traceable to specific characteristics and interactions. We show theoretically that in-sample objective maximization consistently estimates the population objective and that the differentiable rank-and-mask layer is a faithful smooth proxy for the corresponding conventional long-short quantile portfolio. In U.S. equities, AlphaGlass delivers strong out-of-sample performance and reveals economically interpretable drivers of long and short positions.