Example usage in --help, closes #22

This commit is contained in:
Simon Willison 2024-02-25 11:24:46 -08:00
commit 081aeb32a2
4 changed files with 81 additions and 5 deletions

View file

@ -56,6 +56,10 @@ Usage: dclient alias list [OPTIONS]
List aliases
Example usage:
dclient aliases list
Options:
--json Output raw JSON
--help Show this message and exit.
@ -78,6 +82,14 @@ Usage: dclient alias add [OPTIONS] NAME URL
Add an alias
Example usage:
dclient alias add content https://datasette.io/content
Then:
dclient query content 'select * from news limit 3'
Options:
--help Show this message and exit.
@ -99,6 +111,10 @@ Usage: dclient alias remove [OPTIONS] NAME
Remove an alias
Example usage:
dclient alias remove content
Options:
--help Show this message and exit.

View file

@ -101,6 +101,10 @@ Usage: dclient auth list [OPTIONS]
List stored API tokens
Example usage:
dclient auth list
Options:
--help Show this message and exit.
@ -122,6 +126,10 @@ Usage: dclient auth remove [OPTIONS] ALIAS_OR_URL
Remove the API token for an alias or URL
Example usage:
dclient auth remove https://datasette.io/content
Options:
--help Show this message and exit.

View file

@ -43,6 +43,12 @@ Usage: dclient query [OPTIONS] URL_OR_ALIAS SQL
Returns a JSON array of objects
Example usage:
dclient query \
https://datasette.io/content \
'select * from news limit 10'
Options:
--token TEXT API token
--help Show this message and exit.