Smart film is widely used in the field of food packaging. The smart film was prepared by adding anthocyanin-rich Robusta coffee peel (RCP) extract into a chitosan (CS)–glycerol (GL) matrix by a solution-casting method. By changing the content of RCP (0, 10%, 15% and 20%) in the CS–GL film, the related performance indicators of CS–GL–RCP films were studied. The results showed that the CS–GL–RCP films had excellent mechanical properties, and CS–GL–RCP15 film maintained the tensile strength (TS) of 16.69 MPa and an elongation-at-break (EAB) of 18.68% with RCP extract. CS–GL–RCP films had the best UV-vis light barrier property at 200–350 nm and the UV transmittance was close to 0. The microstructure observation results showed that CS–GL–RCP films had a dense and uniform cross section, which proved that the RCP extract had good compatibility with the polymer. In addition, the CS–GL–RCP15 film was pH-sensitive and could exhibit different color changes with different pH solutions. So, the CS–GL–RCP15 film was used to detect the fermentation process of pickles at 20 ± 1 °C for 15 days. The pickles were stored in a round pickle container after the boiling water had cooled. The color of the CS–GL–RCP15 film changed significantly, which was consistent with the change of pickles from fresh to mature. The color of the smart film changed significantly with the maturity of pickles, and the difference of ΔE of film increased to 8.89 (15 Days), which can be seen by the naked eye. Therefore, CS–GL–RCP films prepared in this study provided a new strategy for the development of smart packaging materials.