Provided are constrained peptides that inhibit HIV assembly. Pharmaceutical compositions comprising the peptides in a pharmaceutically acceptable carrier which can inhibit the replication of a capsid-contaning virus in a cell are also provided. Additionally provided are the peptides for use in the treatment of infection in a mammal caused by capsid-containing virus by inhibiting the assembly of the capsid-containing virus.