@agentgrant.cash/cli 1.0.1 → 1.0.2
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/.env.example +9 -9
- package/dist/lib/config.js +9 -10
- package/package.json +1 -1
package/.env.example
CHANGED
|
@@ -3,21 +3,21 @@
|
|
|
3
3
|
# Copy to `.env` in the folder you run the CLI from (the current working
|
|
4
4
|
# directory). The CLI loads it automatically — this is how you point an
|
|
5
5
|
# installed / `npx` CLI at localhost or staging. Already-exported shell env vars
|
|
6
|
-
# take precedence over the file. Every value is optional; the defaults
|
|
7
|
-
#
|
|
6
|
+
# take precedence over the file. Every value is optional; the built-in defaults
|
|
7
|
+
# point at the DEVELOP environment. The active backend is shown by `grant config
|
|
8
|
+
# show` / `grant status`.
|
|
8
9
|
#
|
|
9
10
|
# Example (local dev):
|
|
10
11
|
# GRANTCASH_API_URL=http://localhost:3001/api
|
|
11
12
|
# GRANTCASH_AGENT_URL=http://localhost:8080
|
|
12
13
|
|
|
13
|
-
# ── Money side (Perfolio backend — gold, portfolio, cash) ──
|
|
14
|
-
GRANTCASH_API_URL=https://api.perfolio.ai/api
|
|
15
|
-
GRANTCASH_FIAT_URL=https://api-fiat.perfolio.ai/api
|
|
16
|
-
GRANTCASH_APP_URL=https://app.
|
|
14
|
+
# ── Money side (Perfolio backend — gold, portfolio, cash) ── [develop defaults]
|
|
15
|
+
GRANTCASH_API_URL=https://api-dev.perfolio.ai/api
|
|
16
|
+
GRANTCASH_FIAT_URL=https://api-dev-fiat.perfolio.ai/api
|
|
17
|
+
GRANTCASH_APP_URL=https://grant-cash-app-production.up.railway.app
|
|
17
18
|
|
|
18
|
-
# ── Agent side (Agent-mode backend — pay-per-use services, x402) ──
|
|
19
|
-
|
|
20
|
-
GRANTCASH_AGENT_URL=https://api-agent.perfolio.ai
|
|
19
|
+
# ── Agent side (Agent-mode backend — pay-per-use services, x402) ── [develop]
|
|
20
|
+
GRANTCASH_AGENT_URL=https://agent-mode-backend-develop.up.railway.app
|
|
21
21
|
|
|
22
22
|
# ── Misc ──
|
|
23
23
|
# Override the merged credentials file (default ~/.grant-cash/credentials.json).
|
package/dist/lib/config.js
CHANGED
|
@@ -2,19 +2,18 @@ import { homedir } from "node:os";
|
|
|
2
2
|
import { join, dirname } from "node:path";
|
|
3
3
|
import { mkdirSync, readFileSync, writeFileSync, unlinkSync } from "node:fs";
|
|
4
4
|
/**
|
|
5
|
-
* Backend base URLs — env-overridable
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
* backend is shown in `grant status`.
|
|
5
|
+
* Backend base URLs — env-overridable. Defaults point at the DEVELOP environment
|
|
6
|
+
* (this is an internal/testing CLI for now). Set the env vars (in a `.env` in the
|
|
7
|
+
* directory you run the CLI from, or as exported shell vars) to repoint at
|
|
8
|
+
* localhost/staging/production without touching code. The active backend is shown
|
|
9
|
+
* by `grant config show` / `grant status`.
|
|
11
10
|
*/
|
|
12
11
|
export function baseUrls(env = process.env) {
|
|
13
12
|
return {
|
|
14
|
-
api: env.GRANTCASH_API_URL || "https://api.perfolio.ai/api",
|
|
15
|
-
fiat: env.GRANTCASH_FIAT_URL || "https://api-fiat.perfolio.ai/api",
|
|
16
|
-
app: env.GRANTCASH_APP_URL || "https://app.
|
|
17
|
-
agent: env.GRANTCASH_AGENT_URL || "https://
|
|
13
|
+
api: env.GRANTCASH_API_URL || "https://api-dev.perfolio.ai/api",
|
|
14
|
+
fiat: env.GRANTCASH_FIAT_URL || "https://api-dev-fiat.perfolio.ai/api",
|
|
15
|
+
app: env.GRANTCASH_APP_URL || "https://grant-cash-app-production.up.railway.app",
|
|
16
|
+
agent: env.GRANTCASH_AGENT_URL || "https://agent-mode-backend-develop.up.railway.app",
|
|
18
17
|
};
|
|
19
18
|
}
|
|
20
19
|
export function resolveCredsPath(flag, env = process.env) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agentgrant.cash/cli",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"description": "Grant Cash — one CLI for your money (gold) and your agent (pay-per-use services). Routes to the Perfolio backend and the Agent-mode backend behind a single, plain-language surface.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|