Sifrei Mitzvot sur L’Exode 21:2

כִּ֤י תִקְנֶה֙ עֶ֣בֶד עִבְרִ֔י שֵׁ֥שׁ שָׁנִ֖ים יַעֲבֹ֑ד וּבַ֨שְּׁבִעִ֔ת יֵצֵ֥א לַֽחָפְשִׁ֖י חִנָּֽם׃

Si tu achètes un esclave hébreu, il restera six années esclave et à la septième il sera remis en liberté sans rançon.

Sefer HaMitzvot

That is that He commanded about the law of a Hebrew (Jewish) slave. And that is His, may He be blessed, saying, "When you acquire a Hebrew slave" (Exodus 21:2). And [while] most of the laws of this commandment have already been explained explicitly in the Torah, all of the laws of this commandment are explained in Tractate Kiddushin. (See Parashat Mishpatim; Mishneh Torah, Slaves 1.)