APIs should be designed with user experience in mind, accepting inputs in formats users naturally encounter and providing clear customization options with well-documented defaults.
When designing command-line interfaces or API endpoints:
--env-interface
to specify interface names)Example from CLI design:
# Good: Accepts natural GitHub URLs and provides clear customization
wrangler create my-app https://github.com/user/repo/tree/main/templates/worker
wrangler types --env-interface MyCustomEnv # defaults to 'Env' if not specified
This approach reduces friction for users by eliminating the need to transform inputs into specific formats and provides flexibility while maintaining predictable default behavior.
Enter the URL of a public GitHub repository