Identity Commands (modal id)
Create a New Identity
# Create with default path
modal id create --path alice.passfile
# Create with password protection
modal id create --path alice.passfile --password
Derive Sub-Identity
modal id derive --path alice.passfile --sub "escrow-key" --output alice-escrow.passfile
Derives a deterministic sub-key from your main identity. Useful for:
- Contract-specific keys
- Rotating access keys
- Hierarchical key management
Get Public ID
modal id get --path alice.passfile
# Output: ed25519:abc123...
Passfile Operations
Encrypt a Passfile
modal passfile encrypt --path alice.passfile --password
Decrypt a Passfile
modal passfile decrypt --path alice.passfile.enc --password
Best Practices
- Protect your passfiles — They contain your private keys
- Use password encryption for long-term storage
- Derive sub-keys for different contracts
- Back up your identity key — It represents your identity