agentgate 0.1.5 → 0.1.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/cli.js +7 -4
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agentgate",
3
- "version": "0.1.5",
3
+ "version": "0.1.6",
4
4
  "type": "module",
5
5
  "description": "API gateway for AI agents with human-in-the-loop write approval",
6
6
  "main": "src/index.js",
package/src/cli.js CHANGED
@@ -37,12 +37,15 @@ Examples:
37
37
  }
38
38
 
39
39
  async function main() {
40
- if (!command || command === '-h' || command === '--help') {
40
+ if (command === '-h' || command === '--help') {
41
41
  printUsage();
42
42
  process.exit(0);
43
43
  }
44
44
 
45
- if (command === 'start') {
45
+ // Default to start if no command given
46
+ const cmd = command || 'start';
47
+
48
+ if (cmd === 'start') {
46
49
  // Parse port from args
47
50
  const portIdx = args.findIndex(a => a === '-p' || a === '--port');
48
51
  if (portIdx !== -1 && args[portIdx + 1]) {
@@ -51,7 +54,7 @@ async function main() {
51
54
 
52
55
  // Import and run the server
53
56
  await import('./index.js');
54
- } else if (command === 'keys') {
57
+ } else if (cmd === 'keys') {
55
58
  const subcommand = args[0];
56
59
  const { createApiKey, listApiKeys, deleteApiKey } = await import('./lib/db.js');
57
60
 
@@ -103,7 +106,7 @@ async function main() {
103
106
  process.exit(1);
104
107
  }
105
108
  } else {
106
- console.error(`Unknown command: ${command}`);
109
+ console.error(`Unknown command: ${cmd}`);
107
110
  printUsage();
108
111
  process.exit(1);
109
112
  }