Live by one’s wits

To survive by being clever.

The boy lives by his wits and never has any problems in his life.