@@ -7,9 +7,12 @@ import { createContext, type GitsheetsContext } from './context.js';
77import { homeCommand } from './commands/home.js' ;
88import { sheetsCommand , SHEETS_HELP } from './commands/sheets.js' ;
99import { queryCommand , QUERY_HELP } from './commands/query.js' ;
10+ import { countCommand , COUNT_HELP } from './commands/count.js' ;
11+ import { distinctCommand , DISTINCT_HELP } from './commands/distinct.js' ;
1012import { readCommand , READ_HELP } from './commands/read.js' ;
1113import { upsertCommand , UPSERT_HELP } from './commands/upsert.js' ;
1214import { patchCommand , PATCH_HELP } from './commands/patch.js' ;
15+ import { renameCommand , RENAME_HELP } from './commands/rename.js' ;
1316import { deleteCommand , DELETE_HELP } from './commands/delete.js' ;
1417import { checkCommand , CHECK_HELP } from './commands/check.js' ;
1518import { diffCommand , DIFF_HELP } from './commands/diff.js' ;
@@ -28,35 +31,37 @@ const DESCRIPTION =
2831const VERSION = readPackageVersion ( ) ;
2932
3033export const TOP_HELP = `usage: gitsheets-axi [command] [args] [flags]
31- commands[16 ]:
32- (none)=home, sheets, query, read ,
33- upsert, patch, delete ,
34- check, diff, normalize,
34+ commands[19 ]:
35+ (none)=home, sheets, query, count ,
36+ distinct, read, upsert, patch, rename ,
37+ delete, check, diff, normalize,
3538 init, infer, migrate-config,
3639 attachment, push, setup
3740flags[2]:
3841 --help, -v/-V/--version
3942examples:
4043 gitsheets-axi
41- gitsheets-axi query users --filter status=active
44+ gitsheets-axi query repos --filter status=unclassified --sort pushed_at
45+ gitsheets-axi count repos --filter archived=true
46+ gitsheets-axi query repos --group-by target_team
47+ gitsheets-axi distinct repos disposition
4248 gitsheets-axi upsert users --data '{"slug":"jane","email":"jane@x.org"}'
4349 gitsheets-axi patch users '{"slug":"jane"}' --patch '{"name":"Jane"}'
4450 gitsheets-axi check users users/jane.toml --fix
4551 gitsheets-axi diff posts HEAD~10
46- gitsheets-axi normalize users
47- gitsheets-axi init users
48- gitsheets-axi infer users
4952 gitsheets-axi attachment list users jane
50- gitsheets-axi push
5153 gitsheets-axi setup hooks
5254` ;
5355
5456const COMMAND_HELP : Record < string , string > = {
5557 sheets : SHEETS_HELP ,
5658 query : QUERY_HELP ,
59+ count : COUNT_HELP ,
60+ distinct : DISTINCT_HELP ,
5761 read : READ_HELP ,
5862 upsert : UPSERT_HELP ,
5963 patch : PATCH_HELP ,
64+ rename : RENAME_HELP ,
6065 delete : DELETE_HELP ,
6166 check : CHECK_HELP ,
6267 diff : DIFF_HELP ,
@@ -74,9 +79,12 @@ type CommandFn = (args: string[], ctx: GitsheetsContext) => Promise<string | Rec
7479const COMMANDS : Record < string , CommandFn > = {
7580 sheets : sheetsCommand ,
7681 query : queryCommand ,
82+ count : countCommand ,
83+ distinct : distinctCommand ,
7784 read : readCommand ,
7885 upsert : upsertCommand ,
7986 patch : patchCommand ,
87+ rename : renameCommand ,
8088 delete : deleteCommand ,
8189 check : checkCommand ,
8290 diff : diffCommand ,
0 commit comments