File tree Expand file tree Collapse file tree 5 files changed +56
-12
lines changed Expand file tree Collapse file tree 5 files changed +56
-12
lines changed Original file line number Diff line number Diff line change 1010 "build" : " tsc" ,
1111 "lint" : " eslint src"
1212 },
13+ "bin" : {
14+ "agents" : " dist/cli.js"
15+ },
1316 "devDependencies" : {
1417 "@types/bun" : " latest" ,
1518 "eslint" : " ^8.57.0" ,
Original file line number Diff line number Diff line change 1+ // SPDX-FileCopyrightText: 2024 LiveKit, Inc.
2+ //
3+ // SPDX-License-Identifier: Apache-2.0
4+
5+ import { version } from './index' ;
6+ import { Option , Command } from 'commander' ;
7+
8+ const program = new Command ( ) ;
9+ program
10+ . name ( 'agents' )
11+ . description ( 'LiveKit Agents CLI' )
12+ . version ( version )
13+ . addOption (
14+ new Option ( '--log-level' , 'Set the logging level' ) . choices ( [
15+ 'DEBUG' ,
16+ 'INFO' ,
17+ 'WARNING' ,
18+ 'ERROR' ,
19+ 'CRITICAL' ,
20+ ] ) ,
21+ ) ;
22+
23+ program
24+ . command ( 'start' )
25+ . description ( 'Start the worker' )
26+ . addOption (
27+ new Option ( '--url <string>' , 'LiveKit server or Cloud project websocket URL' )
28+ . makeOptionMandatory ( true )
29+ . env ( 'LIVEKIT_URL' ) ,
30+ )
31+ . addOption (
32+ new Option ( '--api-key <string>' , "LiveKit server or Cloud project's API key" )
33+ . makeOptionMandatory ( true )
34+ . env ( 'LIVEKIT_API_KEY' ) ,
35+ )
36+ . addOption (
37+ new Option ( '--api-secret <string>' , "LiveKit server or Cloud project's API secret" )
38+ . makeOptionMandatory ( true )
39+ . env ( 'LIVEKIT_API_SECRET' ) ,
40+ )
41+ . action ( ( ) => {
42+ return ;
43+ } ) ;
44+
45+ program . parse ( ) ;
Original file line number Diff line number Diff line change 22//
33// SPDX-License-Identifier: Apache-2.0
44
5- import { VAD , VADEventType , VADStream } from './vad' ;
6- import { Plugin } from './plugin' ;
7-
8- const version = '0.1.0' ;
9-
10- export {
11- version ,
12- VAD ,
13- VADEventType ,
14- VADStream ,
15- Plugin ,
16- } ;
5+ export { VAD , VADEventType , VADStream } from './vad' ;
6+ export { Plugin } from './plugin' ;
7+ export { version } from './version' ;
Original file line number Diff line number Diff line change 1+ // SPDX-FileCopyrightText: 2024 LiveKit, Inc.
2+ //
3+ // SPDX-License-Identifier: Apache-2.0
4+
5+ export const version = '0.1.0' ;
You can’t perform that action at this time.
0 commit comments