@almyty/skills 1.0.4 → 1.0.5

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/dist/auth.js +13 -1
  2. package/package.json +1 -1
package/dist/auth.js CHANGED
@@ -30,7 +30,19 @@ function loadCredentials() {
30
30
  */
31
31
  export function resolveAuth() {
32
32
  const envToken = process.env.ALMYTY_TOKEN;
33
- const envUrl = process.env.ALMYTY_URL || 'https://api.almyty.com';
33
+ // Read URL from: env > config file > default
34
+ let configUrl;
35
+ try {
36
+ const { readFileSync, existsSync } = require('fs');
37
+ const { join } = require('path');
38
+ const { homedir } = require('os');
39
+ const configPath = join(homedir(), '.almyty', 'config.json');
40
+ if (existsSync(configPath)) {
41
+ configUrl = JSON.parse(readFileSync(configPath, 'utf-8')).apiUrl;
42
+ }
43
+ }
44
+ catch { }
45
+ const envUrl = process.env.ALMYTY_URL || configUrl || 'https://api.almyty.com';
34
46
  if (envToken) {
35
47
  return { url: envUrl, token: envToken };
36
48
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@almyty/skills",
3
- "version": "1.0.4",
3
+ "version": "1.0.5",
4
4
  "description": "Install API skills into AI coding agents — Claude Code, Cursor, Windsurf, Copilot, Codex",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",