-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathcli.ts
More file actions
39 lines (33 loc) · 1.29 KB
/
Copy pathcli.ts
File metadata and controls
39 lines (33 loc) · 1.29 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/usr/bin/env node
import { Command } from 'commander';
import { createWorkspaceCommand } from './commands/workspace';
import { createObjectCommand } from './commands/object';
import { createRecordCommand } from './commands/record';
import { createListCommand } from './commands/list';
import { createEntryCommand } from './commands/entry';
import { createNoteCommand } from './commands/note';
import { createTaskCommand } from './commands/task';
import { createMeetingCommand } from './commands/meeting';
import { createAttributeCommand } from './commands/attribute';
const program = new Command();
program
.name('attio')
.description('Fully-typed TypeScript CLI for managing Attio CRM via REST API')
.version('0.1.0');
// Global options
program.option(
'--api-key <key>',
'Attio API key (overrides ATTIO_API_KEY env var)'
);
program.option('--verbose', 'Show detailed error messages');
// Add commands
program.addCommand(createWorkspaceCommand());
program.addCommand(createObjectCommand());
program.addCommand(createRecordCommand());
program.addCommand(createListCommand());
program.addCommand(createEntryCommand());
program.addCommand(createNoteCommand());
program.addCommand(createTaskCommand());
program.addCommand(createMeetingCommand());
program.addCommand(createAttributeCommand());
program.parse();