opencode-puter-auth 1.0.15 → 1.0.17

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.
package/README.md CHANGED
@@ -56,8 +56,14 @@ https://raw.githubusercontent.com/Mihai-Codes/opencode-puter-auth/main/README.md
56
56
  2. **Authenticate with Puter:**
57
57
 
58
58
  ```bash
59
- opencode auth login
60
- # Select "Puter.com (FREE Unlimited)"
59
+ # Install plugin globally to get CLI tool
60
+ npm install -g opencode-puter-auth
61
+
62
+ # Run authentication
63
+ puter-auth
64
+
65
+ # Or from project directory
66
+ cd ~/.config/opencode && npx opencode-puter-auth
61
67
  ```
62
68
 
63
69
  3. **Add model definitions:**
package/dist/cli.d.ts ADDED
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+ export {};
3
+ //# sourceMappingURL=cli.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":""}
package/dist/cli.js ADDED
@@ -0,0 +1,17 @@
1
+ #!/usr/bin/env node
2
+ import { PuterAuthManager } from './auth.js';
3
+ import { homedir } from 'os';
4
+ import { join } from 'path';
5
+ const configDir = join(homedir(), '.config', 'opencode');
6
+ const authManager = new PuterAuthManager(configDir);
7
+ await authManager.init();
8
+ const result = await authManager.login();
9
+ if (result.success) {
10
+ console.log('✅ Authentication successful!');
11
+ console.log('Account:', result.account?.username);
12
+ }
13
+ else {
14
+ console.error('❌ Authentication failed:', result.error);
15
+ process.exit(1);
16
+ }
17
+ //# sourceMappingURL=cli.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAC7C,OAAO,EAAE,OAAO,EAAE,MAAM,IAAI,CAAC;AAC7B,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAE5B,MAAM,SAAS,GAAG,IAAI,CAAC,OAAO,EAAE,EAAE,SAAS,EAAE,UAAU,CAAC,CAAC;AACzD,MAAM,WAAW,GAAG,IAAI,gBAAgB,CAAC,SAAS,CAAC,CAAC;AAEpD,MAAM,WAAW,CAAC,IAAI,EAAE,CAAC;AACzB,MAAM,MAAM,GAAG,MAAM,WAAW,CAAC,KAAK,EAAE,CAAC;AAEzC,IAAI,MAAM,CAAC,OAAO,EAAE,CAAC;IACnB,OAAO,CAAC,GAAG,CAAC,8BAA8B,CAAC,CAAC;IAC5C,OAAO,CAAC,GAAG,CAAC,UAAU,EAAE,MAAM,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;AACpD,CAAC;KAAM,CAAC;IACN,OAAO,CAAC,KAAK,CAAC,0BAA0B,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC;IACxD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC"}
package/package.json CHANGED
@@ -1,7 +1,10 @@
1
1
  {
2
2
  "name": "opencode-puter-auth",
3
- "version": "1.0.15",
3
+ "version": "1.0.17",
4
4
  "description": "Puter.com OAuth auth plugin for OpenCode - FREE UNLIMITED access to Claude Opus 4.5, Sonnet 4.5, GPT-5, Gemini, and 500+ AI models",
5
+ "bin": {
6
+ "puter-auth": "dist/cli.js"
7
+ },
5
8
  "main": "./dist/index.js",
6
9
  "types": "./dist/index.d.ts",
7
10
  "type": "module",