Skip to content

Commit 1efaecf

Browse files
committed
feat: create instabug CLI with --help flag
1 parent dd69dcc commit 1efaecf

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

bin/instabug.dart

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#!/usr/bin/env dart
2+
3+
import 'package:args/args.dart';
4+
5+
void main(List<String> args) {
6+
final parser = ArgParser()..addFlag('help', abbr: 'h');
7+
final result = parser.parse(args);
8+
if (result['help'] as bool) {
9+
print('Usage: instabug [options]');
10+
print(parser.usage);
11+
return;
12+
}
13+
// …call into your SDK’s API…
14+
}

pubspec.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,3 +37,6 @@ flutter:
3737
environment:
3838
sdk: ">=2.14.0 <4.0.0"
3939
flutter: ">=1.17.0"
40+
41+
executables:
42+
instabug: instabug

0 commit comments

Comments
 (0)