Prompt diagnosis, patient isolation, and contact tracing are key measures to contain the coronavirus disease 2019 (COVID-19). Molecular tests are the current gold standard for COVID-19 detection, but are carried out at central laboratories, delaying treatment and control decisions. Here we describe a portable assay system for rapid, onsite COVID-19 diagnosis. Termed CODA (CRISPR Optical Detection of Anisotropy), the method combined isothermal nucleic acid amplification, activation of CRISPR/Cas12a, and signal generation in a single assay, eliminating extra manual steps. Importantly, signal detection was based on the ratiometric measurement of fluorescent anisotropy, which allowed CODA to achieve a high signal-to-noise ratio. For point-of-care operation, we built a compact, standalone CODA device integrating optoelectronics, an embedded heater, and a microcontroller for data processing. The developed system completed SARS-CoV-2 RNA detection within 20 min of sample loading; the limit of detection reached 3 copy/mu L. When applied to clinical samples (10 confirmed COVID-19 patients; 10 controls), the rapid CODA test accurately classified COVID-19 status, in concordance with gold-standard clinical diagnostics.