How to Import and Export Wallets between CLI and Wallet providers?

How do I export my wallet keypair generated from the Solana CLI and import it into a wallet like phantom or solflare?

And how to export that wallet keypair from the wallet provider and import it back to a JSON file for the CLI?