Repository files navigation

@jecpdev/cli

Command-line interface for JECP — Joint Execution & Commerce Protocol. Register agents, invoke capabilities, manage Providers from your terminal.

npmLicense

npm install -g @jecpdev/cli
# or one-shot
npx @jecpdev/cli --help

Quickstart — agent in 30 seconds

$ jecp register --name MyBot --type demo
✓ Agent registered.
AGENT_ID: jdb_ag_a1b2c3...
API_KEY: jdb_ak_xxxxxxxxxxxx
Free calls: 100
✓ Credentials saved to ~/.jecp/config.json (mode 0600)
$ jecp invoke jobdonebot/content-factory translate \
--input '{"text":"Hello","target_lang":"JA"}'
✓ Invocation complete.
Output: {"translated":"こんにちは"}
Provider: jobdonebot/content-factory@1.0.0
Charged: $0.005 USDC
Balance: $0.995 USDC

Quickstart — Provider in 30 minutes (v0.8.1+)

$ jecp init-provider --example hello-world # scaffold runnable starter
✓ Scaffolded hello-world Provider in.
→ jecp.yaml, handler.mjs, package.json, README.md
$ npm install
$ jecp provider register \
--namespace myco --display-name "MyCo" \
--email ops@myco.example --endpoint https://myco.example/jecp \
--country JP --wait # auto-polls DNS until verified
✓ Provider registered. Credentials saved to ~/.jecp/config.json
→ Add this DNS TXT record:
_jecp.myco.example TXT "jecp-verify=tok_xyz"
Polling /v1/providers/verify-dns until propagation…
✓ DNS verified after 3 attempts.
$ JECP_HMAC_SECRET=$(jq -r .provider_hmac_secret ~/.jecp/config.json) \
node handler.mjs &# local Provider running
$ jecp provider connect-stripe # open the URL in browser
$ jecp provider publish jecp.yaml # active once DNS+Stripe verified
✓ Published myco/echo@1.0.0

For a fully interactive scaffold (without the hello-world starter), omit --example. The bare YAML stub is available with --example.

Commands

CommandDescription
jecp registerRegister a new agent (interactive or via flags)
jecp loginSave existing agent credentials
jecp logoutClear stored credentials
jecp invoke <cap> <action>Invoke a capability action (--pay wallet|x402|auto)
jecp catalogList capabilities (paginated)
jecp topup <amount>Top up wallet (5/20/100 USDC)
jecp statusShow health, balance, agent info
jecp doctorDiagnose connectivity, config, SDK version, x402 readiness
jecp wallet:link-usdc <addr>v0.7.0 — Link Base USDC wallet for x402 payments
jecp init-providerInteractive jecp.yaml scaffold (now with x402 prompts)
jecp provider registerv0.8.0 — Register as Provider; saves creds, prints DNS TXT
jecp provider verify-dnsv0.8.0 — Auto-poll until DNS TXT propagates (--once for CI)
jecp provider validate [file]v0.8.2 — Validate jecp.yaml locally against the manifest schema (exits 1 on invalid)
jecp provider publish [file]v0.8.0 — Publish jecp.yaml to /v1/manifests
jecp provider mev0.8.0 — Show Provider DNS/Stripe/endpoint status
jecp provider rotate-keyv0.8.0 — Rotate Provider api_key (7-day grace)
jecp provider connect-stripev0.8.0 — Get Stripe Connect onboarding URL
jecp rotate-keyRotate this agent's API key (7-day grace)
jecp refund … / webhook …Refund + webhook subscription management

Run jecp <command> --help for full options.

Global flags

  • --json — machine-readable JSON output (for CI/scripting)
  • --base-url <url> — override Hub URL (default https://jecp.dev)

Auth precedence

  1. JECP_AGENT_ID + JECP_API_KEY env vars (CI mode)
  2. ~/.jecp/config.json (saved by register or login)

Environment variables

VariableStatusNotes
JECP_AGENT_IDactiveAgent ID (e.g. jdb_ag_…).
JECP_API_KEYactivePreferred name for the agent's API key. Matches the Hub's X-API-Key header convention.
JECP_AGENT_KEYdeprecatedLegacy alias for JECP_API_KEY. Still honored, but emits a deprecation warning on stderr and will be removed in v0.10.
JECP_BASE_URLactiveOverride Hub URL (default https://jecp.dev).
JECP_PROVIDER_ID / JECP_PROVIDER_KEYactiveProvider credentials, independent of agent credentials.

If both JECP_API_KEY and JECP_AGENT_KEY are set, JECP_API_KEY wins and no deprecation warning is emitted.

Config file

Stored at ~/.jecp/config.json with mode 0600. Contains agent_id, api_key, base_url. Treat like a Stripe secret key.

Examples

Invoke with budget cap

jecp invoke deepl/translate translate \
--input '{"text":"Hello","target_lang":"JA"}' \
--budget 1.00 \
--timeout 60000

Discover capabilities

jecp catalog --page-size 100 --namespace jobdonebot

CI integration

JECP_AGENT_ID=jdb_ag_... JECP_API_KEY=jdb_ak_... \
jecp invoke a/b c --json | jq '.output'

JECP_AGENT_KEY is the legacy name and still works for one more release; switch to JECP_API_KEY to avoid the deprecation warning. The variable will be removed in v0.10.

x402 quickstart (v0.7.0)

JECP supports x402 (USDC on Base) as a parallel payment rail alongside the default Stripe-funded wallet. Per-call settlement, lower fees, no balance required.

1. Link your Base wallet address

jecp wallet:link-usdc 0xAb11Cd22Ef33aaBBCcDDeeFF0011223344556677
# → stored in ~/.jecp/config.json (CLI never holds the private key)

The CLI accepts three signer kinds via --signer:

  • env (default) — SDK reads BASE_PRIVATE_KEY from env at invoke time
  • file — SDK reads ~/.jecp/base-key.txt (chmod 600)
  • kms — bring your own KMS adapter via SDK directly

2. Verify readiness

jecp doctor
# … existing 9 checks …# ── x402 ──# ✓ x402 signer configured: 0xAb11... (env)# ✓ x402 facilitator reachable: https://x402.org/facilitator (122ms)# ✓ Base RPC reachable: https://mainnet.base.org chain=base (88ms)# ✓ Splitter check: catalog advertises payment_methods: [..., x402]

3. Invoke with x402

export BASE_PRIVATE_KEY=0x...
jecp invoke jobdonebot/bg-remover-pro remove \
--pay x402 \
--input '{"image_url":"https://example.com/photo.jpg"}'# … receipt block printed:# Payment receipt (x402):# method: x402# txHash: 0xdead…# network: base# amount: $0.005 (5000 USDC micros)# Basescan: https://basescan.org/tx/0xdead…

--pay auto (default) tries x402 when both the agent and capability support it, and falls back to wallet otherwise. --pay wallet forces the classic balance-funded path.

4. Provider opt-in (when scaffolding)

jecp init-provider now asks "Accept x402 (USDC on Base) payments? (Y/n)" and emits payment_methods: ["stripe", "x402"] in the manifest by default. Locked design §6.2 — hybrid mode is the recommended default.

Note: ethers is an optional peer dep. Install it (npm i -g ethers) if you use --pay x402; otherwise the CLI falls back to wallet mode with a clear hint.

Integration tests

Default npm test runs hermetic unit tests only. An opt-in suite under test/integration/ spawns the builtdist/cli.js against a live JECP Hub to catch CLI/Hub contract drift:

# Always build first — integration tests run the compiled artifact.
npm run build
# Against the default staging Hub (https://setsuna-jobdonebot.fly.dev)
npm run test:integration
# Against a local Hub
JECP_TEST_BASE_URL=http://localhost:8080 npm run test:integration
# Against jecp.dev (production — coordinate first)
JECP_TEST_BASE_URL=https://jecp.dev npm run test:integration

See test/integration/README.md for what each test asserts and how HOME is sandboxed in spawned children.

License

Apache 2.0 — Tufe Company Inc.

About

Command-line interface for JECP — Joint Execution & Commerce Protocol. Register agents, invoke capabilities, manage Providers from your terminal.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Add copy buttons to all
 blocks\n(function() {\n function addCopyButtons() {\n document.querySelectorAll('pre code').forEach(function(codeBlock) {\n if (codeBlock.parentElement.hasAttribute('data-copy-added')) return;\n codeBlock.parentElement.setAttribute('data-copy-added', 'true');\n \n var btn = document.createElement('button');\n btn.textContent = 'Copy';\n btn.style.cssText = 'position:absolute;top:4px;right:4px;padding:2px 8px;font-size:11px;background:#4ecdc4;border:none;border-radius:4px;color:#1a1a2e;cursor:pointer;opacity:0.7;transition:opacity 0.2s;';\n btn.onmouseover = function() { this.style.opacity = '1'; };\n btn.onmouseout = function() { this.style.opacity = '0.7'; };\n btn.onclick = function() {\n navigator.clipboard.writeText(codeBlock.textContent).then(function() {\n btn.textContent = 'Copied!';\n setTimeout(function() { btn.textContent = 'Copy'; }, 1500);\n });\n };\n codeBlock.parentElement.style.position = 'relative';\n codeBlock.parentElement.appendChild(btn);\n });\n }\n \n addCopyButtons();\n \n // Re-run on dynamic content\n var observer = new MutationObserver(addCopyButtons);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Add Copy Buttons to Code Blocks");
}
} catch(__e) { console.warn('[Userscript:Add Copy Buttons to Code Blocks]', __e); }
})();
(function(){
try {
var __m = "github.com";
var __re = new RegExp('^' + "github\\.com" + '
Skip to content

Repository files navigation

@jecpdev/cli

Command-line interface for JECP — Joint Execution & Commerce Protocol. Register agents, invoke capabilities, manage Providers from your terminal.

npmLicense

npm install -g @jecpdev/cli
# or one-shot
npx @jecpdev/cli --help

Quickstart — agent in 30 seconds

$ jecp register --name MyBot --type demo
✓ Agent registered.
AGENT_ID: jdb_ag_a1b2c3...
API_KEY: jdb_ak_xxxxxxxxxxxx
Free calls: 100
✓ Credentials saved to ~/.jecp/config.json (mode 0600)
$ jecp invoke jobdonebot/content-factory translate \
--input '{"text":"Hello","target_lang":"JA"}'
✓ Invocation complete.
Output: {"translated":"こんにちは"}
Provider: jobdonebot/content-factory@1.0.0
Charged: $0.005 USDC
Balance: $0.995 USDC

Quickstart — Provider in 30 minutes (v0.8.1+)

$ jecp init-provider --example hello-world # scaffold runnable starter
✓ Scaffolded hello-world Provider in.
→ jecp.yaml, handler.mjs, package.json, README.md
$ npm install
$ jecp provider register \
--namespace myco --display-name "MyCo" \
--email ops@myco.example --endpoint https://myco.example/jecp \
--country JP --wait # auto-polls DNS until verified
✓ Provider registered. Credentials saved to ~/.jecp/config.json
→ Add this DNS TXT record:
_jecp.myco.example TXT "jecp-verify=tok_xyz"
Polling /v1/providers/verify-dns until propagation…
✓ DNS verified after 3 attempts.
$ JECP_HMAC_SECRET=$(jq -r .provider_hmac_secret ~/.jecp/config.json) \
node handler.mjs &# local Provider running
$ jecp provider connect-stripe # open the URL in browser
$ jecp provider publish jecp.yaml # active once DNS+Stripe verified
✓ Published myco/echo@1.0.0

For a fully interactive scaffold (without the hello-world starter), omit --example. The bare YAML stub is available with --example.

Commands

CommandDescription
jecp registerRegister a new agent (interactive or via flags)
jecp loginSave existing agent credentials
jecp logoutClear stored credentials
jecp invoke <cap> <action>Invoke a capability action (--pay wallet|x402|auto)
jecp catalogList capabilities (paginated)
jecp topup <amount>Top up wallet (5/20/100 USDC)
jecp statusShow health, balance, agent info
jecp doctorDiagnose connectivity, config, SDK version, x402 readiness
jecp wallet:link-usdc <addr>v0.7.0 — Link Base USDC wallet for x402 payments
jecp init-providerInteractive jecp.yaml scaffold (now with x402 prompts)
jecp provider registerv0.8.0 — Register as Provider; saves creds, prints DNS TXT
jecp provider verify-dnsv0.8.0 — Auto-poll until DNS TXT propagates (--once for CI)
jecp provider validate [file]v0.8.2 — Validate jecp.yaml locally against the manifest schema (exits 1 on invalid)
jecp provider publish [file]v0.8.0 — Publish jecp.yaml to /v1/manifests
jecp provider mev0.8.0 — Show Provider DNS/Stripe/endpoint status
jecp provider rotate-keyv0.8.0 — Rotate Provider api_key (7-day grace)
jecp provider connect-stripev0.8.0 — Get Stripe Connect onboarding URL
jecp rotate-keyRotate this agent's API key (7-day grace)
jecp refund … / webhook …Refund + webhook subscription management

Run jecp <command> --help for full options.

Global flags

  • --json — machine-readable JSON output (for CI/scripting)
  • --base-url <url> — override Hub URL (default https://jecp.dev)

Auth precedence

  1. JECP_AGENT_ID + JECP_API_KEY env vars (CI mode)
  2. ~/.jecp/config.json (saved by register or login)

Environment variables

VariableStatusNotes
JECP_AGENT_IDactiveAgent ID (e.g. jdb_ag_…).
JECP_API_KEYactivePreferred name for the agent's API key. Matches the Hub's X-API-Key header convention.
JECP_AGENT_KEYdeprecatedLegacy alias for JECP_API_KEY. Still honored, but emits a deprecation warning on stderr and will be removed in v0.10.
JECP_BASE_URLactiveOverride Hub URL (default https://jecp.dev).
JECP_PROVIDER_ID / JECP_PROVIDER_KEYactiveProvider credentials, independent of agent credentials.

If both JECP_API_KEY and JECP_AGENT_KEY are set, JECP_API_KEY wins and no deprecation warning is emitted.

Config file

Stored at ~/.jecp/config.json with mode 0600. Contains agent_id, api_key, base_url. Treat like a Stripe secret key.

Examples

Invoke with budget cap

jecp invoke deepl/translate translate \
--input '{"text":"Hello","target_lang":"JA"}' \
--budget 1.00 \
--timeout 60000

Discover capabilities

jecp catalog --page-size 100 --namespace jobdonebot

CI integration

JECP_AGENT_ID=jdb_ag_... JECP_API_KEY=jdb_ak_... \
jecp invoke a/b c --json | jq '.output'

JECP_AGENT_KEY is the legacy name and still works for one more release; switch to JECP_API_KEY to avoid the deprecation warning. The variable will be removed in v0.10.

x402 quickstart (v0.7.0)

JECP supports x402 (USDC on Base) as a parallel payment rail alongside the default Stripe-funded wallet. Per-call settlement, lower fees, no balance required.

1. Link your Base wallet address

jecp wallet:link-usdc 0xAb11Cd22Ef33aaBBCcDDeeFF0011223344556677
# → stored in ~/.jecp/config.json (CLI never holds the private key)

The CLI accepts three signer kinds via --signer:

  • env (default) — SDK reads BASE_PRIVATE_KEY from env at invoke time
  • file — SDK reads ~/.jecp/base-key.txt (chmod 600)
  • kms — bring your own KMS adapter via SDK directly

2. Verify readiness

jecp doctor
# … existing 9 checks …# ── x402 ──# ✓ x402 signer configured: 0xAb11... (env)# ✓ x402 facilitator reachable: https://x402.org/facilitator (122ms)# ✓ Base RPC reachable: https://mainnet.base.org chain=base (88ms)# ✓ Splitter check: catalog advertises payment_methods: [..., x402]

3. Invoke with x402

export BASE_PRIVATE_KEY=0x...
jecp invoke jobdonebot/bg-remover-pro remove \
--pay x402 \
--input '{"image_url":"https://example.com/photo.jpg"}'# … receipt block printed:# Payment receipt (x402):# method: x402# txHash: 0xdead…# network: base# amount: $0.005 (5000 USDC micros)# Basescan: https://basescan.org/tx/0xdead…

--pay auto (default) tries x402 when both the agent and capability support it, and falls back to wallet otherwise. --pay wallet forces the classic balance-funded path.

4. Provider opt-in (when scaffolding)

jecp init-provider now asks "Accept x402 (USDC on Base) payments? (Y/n)" and emits payment_methods: ["stripe", "x402"] in the manifest by default. Locked design §6.2 — hybrid mode is the recommended default.

Note: ethers is an optional peer dep. Install it (npm i -g ethers) if you use --pay x402; otherwise the CLI falls back to wallet mode with a clear hint.

Integration tests

Default npm test runs hermetic unit tests only. An opt-in suite under test/integration/ spawns the builtdist/cli.js against a live JECP Hub to catch CLI/Hub contract drift:

# Always build first — integration tests run the compiled artifact.
npm run build
# Against the default staging Hub (https://setsuna-jobdonebot.fly.dev)
npm run test:integration
# Against a local Hub
JECP_TEST_BASE_URL=http://localhost:8080 npm run test:integration
# Against jecp.dev (production — coordinate first)
JECP_TEST_BASE_URL=https://jecp.dev npm run test:integration

See test/integration/README.md for what each test asserts and how HOME is sandboxed in spawned children.

License

Apache 2.0 — Tufe Company Inc.

About

Command-line interface for JECP — Joint Execution & Commerce Protocol. Register agents, invoke capabilities, manage Providers from your terminal.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Force GitHub README to respect dark mode\n(function() {\n var style = document.createElement('style');\n style.textContent = '\n .markdown-body {\n color-scheme: dark light;\n }\n .markdown-body pre { background: #161b22 !important; }\n .markdown-body code { background: rgba(110, 118, 129, 0.4) !important; }\n .markdown-body table th, .markdown-body table td { border-color: #30363d !important; }\n .markdown-body img { background: #0d1117; }\n .markdown-body blockquote { border-left-color: #8b949e; }\n .markdown-body hr { border-color: #30363d; }\n ';\n document.head.appendChild(style);\n})();", "GitHub Dark Mode README Fix"); } } catch(__e) { console.warn('[Userscript:GitHub Dark Mode README Fix]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

Repository files navigation

@jecpdev/cli

Command-line interface for JECP — Joint Execution & Commerce Protocol. Register agents, invoke capabilities, manage Providers from your terminal.

npmLicense

npm install -g @jecpdev/cli
# or one-shot
npx @jecpdev/cli --help

Quickstart — agent in 30 seconds

$ jecp register --name MyBot --type demo
✓ Agent registered.
AGENT_ID: jdb_ag_a1b2c3...
API_KEY: jdb_ak_xxxxxxxxxxxx
Free calls: 100
✓ Credentials saved to ~/.jecp/config.json (mode 0600)
$ jecp invoke jobdonebot/content-factory translate \
--input '{"text":"Hello","target_lang":"JA"}'
✓ Invocation complete.
Output: {"translated":"こんにちは"}
Provider: jobdonebot/content-factory@1.0.0
Charged: $0.005 USDC
Balance: $0.995 USDC

Quickstart — Provider in 30 minutes (v0.8.1+)

$ jecp init-provider --example hello-world # scaffold runnable starter
✓ Scaffolded hello-world Provider in.
→ jecp.yaml, handler.mjs, package.json, README.md
$ npm install
$ jecp provider register \
--namespace myco --display-name "MyCo" \
--email ops@myco.example --endpoint https://myco.example/jecp \
--country JP --wait # auto-polls DNS until verified
✓ Provider registered. Credentials saved to ~/.jecp/config.json
→ Add this DNS TXT record:
_jecp.myco.example TXT "jecp-verify=tok_xyz"
Polling /v1/providers/verify-dns until propagation…
✓ DNS verified after 3 attempts.
$ JECP_HMAC_SECRET=$(jq -r .provider_hmac_secret ~/.jecp/config.json) \
node handler.mjs &# local Provider running
$ jecp provider connect-stripe # open the URL in browser
$ jecp provider publish jecp.yaml # active once DNS+Stripe verified
✓ Published myco/echo@1.0.0

For a fully interactive scaffold (without the hello-world starter), omit --example. The bare YAML stub is available with --example.

Commands

CommandDescription
jecp registerRegister a new agent (interactive or via flags)
jecp loginSave existing agent credentials
jecp logoutClear stored credentials
jecp invoke <cap> <action>Invoke a capability action (--pay wallet|x402|auto)
jecp catalogList capabilities (paginated)
jecp topup <amount>Top up wallet (5/20/100 USDC)
jecp statusShow health, balance, agent info
jecp doctorDiagnose connectivity, config, SDK version, x402 readiness
jecp wallet:link-usdc <addr>v0.7.0 — Link Base USDC wallet for x402 payments
jecp init-providerInteractive jecp.yaml scaffold (now with x402 prompts)
jecp provider registerv0.8.0 — Register as Provider; saves creds, prints DNS TXT
jecp provider verify-dnsv0.8.0 — Auto-poll until DNS TXT propagates (--once for CI)
jecp provider validate [file]v0.8.2 — Validate jecp.yaml locally against the manifest schema (exits 1 on invalid)
jecp provider publish [file]v0.8.0 — Publish jecp.yaml to /v1/manifests
jecp provider mev0.8.0 — Show Provider DNS/Stripe/endpoint status
jecp provider rotate-keyv0.8.0 — Rotate Provider api_key (7-day grace)
jecp provider connect-stripev0.8.0 — Get Stripe Connect onboarding URL
jecp rotate-keyRotate this agent's API key (7-day grace)
jecp refund … / webhook …Refund + webhook subscription management

Run jecp <command> --help for full options.

Global flags

  • --json — machine-readable JSON output (for CI/scripting)
  • --base-url <url> — override Hub URL (default https://jecp.dev)

Auth precedence

  1. JECP_AGENT_ID + JECP_API_KEY env vars (CI mode)
  2. ~/.jecp/config.json (saved by register or login)

Environment variables

VariableStatusNotes
JECP_AGENT_IDactiveAgent ID (e.g. jdb_ag_…).
JECP_API_KEYactivePreferred name for the agent's API key. Matches the Hub's X-API-Key header convention.
JECP_AGENT_KEYdeprecatedLegacy alias for JECP_API_KEY. Still honored, but emits a deprecation warning on stderr and will be removed in v0.10.
JECP_BASE_URLactiveOverride Hub URL (default https://jecp.dev).
JECP_PROVIDER_ID / JECP_PROVIDER_KEYactiveProvider credentials, independent of agent credentials.

If both JECP_API_KEY and JECP_AGENT_KEY are set, JECP_API_KEY wins and no deprecation warning is emitted.

Config file

Stored at ~/.jecp/config.json with mode 0600. Contains agent_id, api_key, base_url. Treat like a Stripe secret key.

Examples

Invoke with budget cap

jecp invoke deepl/translate translate \
--input '{"text":"Hello","target_lang":"JA"}' \
--budget 1.00 \
--timeout 60000

Discover capabilities

jecp catalog --page-size 100 --namespace jobdonebot

CI integration

JECP_AGENT_ID=jdb_ag_... JECP_API_KEY=jdb_ak_... \
jecp invoke a/b c --json | jq '.output'

JECP_AGENT_KEY is the legacy name and still works for one more release; switch to JECP_API_KEY to avoid the deprecation warning. The variable will be removed in v0.10.

x402 quickstart (v0.7.0)

JECP supports x402 (USDC on Base) as a parallel payment rail alongside the default Stripe-funded wallet. Per-call settlement, lower fees, no balance required.

1. Link your Base wallet address

jecp wallet:link-usdc 0xAb11Cd22Ef33aaBBCcDDeeFF0011223344556677
# → stored in ~/.jecp/config.json (CLI never holds the private key)

The CLI accepts three signer kinds via --signer:

  • env (default) — SDK reads BASE_PRIVATE_KEY from env at invoke time
  • file — SDK reads ~/.jecp/base-key.txt (chmod 600)
  • kms — bring your own KMS adapter via SDK directly

2. Verify readiness

jecp doctor
# … existing 9 checks …# ── x402 ──# ✓ x402 signer configured: 0xAb11... (env)# ✓ x402 facilitator reachable: https://x402.org/facilitator (122ms)# ✓ Base RPC reachable: https://mainnet.base.org chain=base (88ms)# ✓ Splitter check: catalog advertises payment_methods: [..., x402]

3. Invoke with x402

export BASE_PRIVATE_KEY=0x...
jecp invoke jobdonebot/bg-remover-pro remove \
--pay x402 \
--input '{"image_url":"https://example.com/photo.jpg"}'# … receipt block printed:# Payment receipt (x402):# method: x402# txHash: 0xdead…# network: base# amount: $0.005 (5000 USDC micros)# Basescan: https://basescan.org/tx/0xdead…

--pay auto (default) tries x402 when both the agent and capability support it, and falls back to wallet otherwise. --pay wallet forces the classic balance-funded path.

4. Provider opt-in (when scaffolding)

jecp init-provider now asks "Accept x402 (USDC on Base) payments? (Y/n)" and emits payment_methods: ["stripe", "x402"] in the manifest by default. Locked design §6.2 — hybrid mode is the recommended default.

Note: ethers is an optional peer dep. Install it (npm i -g ethers) if you use --pay x402; otherwise the CLI falls back to wallet mode with a clear hint.

Integration tests

Default npm test runs hermetic unit tests only. An opt-in suite under test/integration/ spawns the builtdist/cli.js against a live JECP Hub to catch CLI/Hub contract drift:

# Always build first — integration tests run the compiled artifact.
npm run build
# Against the default staging Hub (https://setsuna-jobdonebot.fly.dev)
npm run test:integration
# Against a local Hub
JECP_TEST_BASE_URL=http://localhost:8080 npm run test:integration
# Against jecp.dev (production — coordinate first)
JECP_TEST_BASE_URL=https://jecp.dev npm run test:integration

See test/integration/README.md for what each test asserts and how HOME is sandboxed in spawned children.

License

Apache 2.0 — Tufe Company Inc.

About

Command-line interface for JECP — Joint Execution & Commerce Protocol. Register agents, invoke capabilities, manage Providers from your terminal.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Highlight search terms from Google/DuckDuckGo/Bing referrer\n(function() {\n var ref = document.referrer;\n var terms = [];\n \n if (ref.includes('google.com') || ref.includes('duckduckgo.com') || ref.includes('bing.com')) {\n var url = new URL(ref);\n var q = url.searchParams.get('q') || url.searchParams.get('p');\n if (q) {\n terms = q.split(/\\s+/).filter(function(t) { return t.length > 2; });\n }\n }\n \n if (terms.length === 0) return;\n \n var style = document.createElement('style');\n style.textContent = '.userscript-highlight { background: #fbbf24; color: #1a1a2e; padding: 1px 3px; border-radius: 2px; }';\n document.head.appendChild(style);\n \n function highlight(node) {\n if (node.nodeType === 3) { // text node\n var text = node.textContent;\n var found = false;\n terms.forEach(function(term) {\n var regex = new RegExp('(' + term.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\') + ')', 'gi');\n if (regex.test(text)) {\n found = true;\n var frag = document.createDocumentFragment();\n var parts = text.split(regex);\n parts.forEach(function(part, i) {\n if (i % 2 === 0) {\n frag.appendChild(document.createTextNode(part));\n } else {\n var span = document.createElement('span');\n span.className = 'userscript-highlight';\n span.textContent = part;\n frag.appendChild(span);\n }\n });\n node.parentNode.replaceChild(frag, node);\n }\n });\n } else if (node.nodeType === 1 && node.childNodes) { // element\n var skipTags = ['SCRIPT', 'STYLE', 'NOSCRIPT', 'TEXTAREA', 'INPUT', 'SELECT'];\n if (!skipTags.includes(node.tagName)) {\n Array.from(node.childNodes).forEach(highlight);\n }\n }\n }\n \n highlight(document.body);\n \n // Re-highlight on dynamic content\n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1 || node.nodeType === 3) highlight(node);\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Highlight Search Terms"); } } catch(__e) { console.warn('[Userscript:Highlight Search Terms]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

Repository files navigation

@jecpdev/cli

Command-line interface for JECP — Joint Execution & Commerce Protocol. Register agents, invoke capabilities, manage Providers from your terminal.

npmLicense

npm install -g @jecpdev/cli
# or one-shot
npx @jecpdev/cli --help

Quickstart — agent in 30 seconds

$ jecp register --name MyBot --type demo
✓ Agent registered.
AGENT_ID: jdb_ag_a1b2c3...
API_KEY: jdb_ak_xxxxxxxxxxxx
Free calls: 100
✓ Credentials saved to ~/.jecp/config.json (mode 0600)
$ jecp invoke jobdonebot/content-factory translate \
--input '{"text":"Hello","target_lang":"JA"}'
✓ Invocation complete.
Output: {"translated":"こんにちは"}
Provider: jobdonebot/content-factory@1.0.0
Charged: $0.005 USDC
Balance: $0.995 USDC

Quickstart — Provider in 30 minutes (v0.8.1+)

$ jecp init-provider --example hello-world # scaffold runnable starter
✓ Scaffolded hello-world Provider in.
→ jecp.yaml, handler.mjs, package.json, README.md
$ npm install
$ jecp provider register \
--namespace myco --display-name "MyCo" \
--email ops@myco.example --endpoint https://myco.example/jecp \
--country JP --wait # auto-polls DNS until verified
✓ Provider registered. Credentials saved to ~/.jecp/config.json
→ Add this DNS TXT record:
_jecp.myco.example TXT "jecp-verify=tok_xyz"
Polling /v1/providers/verify-dns until propagation…
✓ DNS verified after 3 attempts.
$ JECP_HMAC_SECRET=$(jq -r .provider_hmac_secret ~/.jecp/config.json) \
node handler.mjs &# local Provider running
$ jecp provider connect-stripe # open the URL in browser
$ jecp provider publish jecp.yaml # active once DNS+Stripe verified
✓ Published myco/echo@1.0.0

For a fully interactive scaffold (without the hello-world starter), omit --example. The bare YAML stub is available with --example.

Commands

CommandDescription
jecp registerRegister a new agent (interactive or via flags)
jecp loginSave existing agent credentials
jecp logoutClear stored credentials
jecp invoke <cap> <action>Invoke a capability action (--pay wallet|x402|auto)
jecp catalogList capabilities (paginated)
jecp topup <amount>Top up wallet (5/20/100 USDC)
jecp statusShow health, balance, agent info
jecp doctorDiagnose connectivity, config, SDK version, x402 readiness
jecp wallet:link-usdc <addr>v0.7.0 — Link Base USDC wallet for x402 payments
jecp init-providerInteractive jecp.yaml scaffold (now with x402 prompts)
jecp provider registerv0.8.0 — Register as Provider; saves creds, prints DNS TXT
jecp provider verify-dnsv0.8.0 — Auto-poll until DNS TXT propagates (--once for CI)
jecp provider validate [file]v0.8.2 — Validate jecp.yaml locally against the manifest schema (exits 1 on invalid)
jecp provider publish [file]v0.8.0 — Publish jecp.yaml to /v1/manifests
jecp provider mev0.8.0 — Show Provider DNS/Stripe/endpoint status
jecp provider rotate-keyv0.8.0 — Rotate Provider api_key (7-day grace)
jecp provider connect-stripev0.8.0 — Get Stripe Connect onboarding URL
jecp rotate-keyRotate this agent's API key (7-day grace)
jecp refund … / webhook …Refund + webhook subscription management

Run jecp <command> --help for full options.

Global flags

  • --json — machine-readable JSON output (for CI/scripting)
  • --base-url <url> — override Hub URL (default https://jecp.dev)

Auth precedence

  1. JECP_AGENT_ID + JECP_API_KEY env vars (CI mode)
  2. ~/.jecp/config.json (saved by register or login)

Environment variables

VariableStatusNotes
JECP_AGENT_IDactiveAgent ID (e.g. jdb_ag_…).
JECP_API_KEYactivePreferred name for the agent's API key. Matches the Hub's X-API-Key header convention.
JECP_AGENT_KEYdeprecatedLegacy alias for JECP_API_KEY. Still honored, but emits a deprecation warning on stderr and will be removed in v0.10.
JECP_BASE_URLactiveOverride Hub URL (default https://jecp.dev).
JECP_PROVIDER_ID / JECP_PROVIDER_KEYactiveProvider credentials, independent of agent credentials.

If both JECP_API_KEY and JECP_AGENT_KEY are set, JECP_API_KEY wins and no deprecation warning is emitted.

Config file

Stored at ~/.jecp/config.json with mode 0600. Contains agent_id, api_key, base_url. Treat like a Stripe secret key.

Examples

Invoke with budget cap

jecp invoke deepl/translate translate \
--input '{"text":"Hello","target_lang":"JA"}' \
--budget 1.00 \
--timeout 60000

Discover capabilities

jecp catalog --page-size 100 --namespace jobdonebot

CI integration

JECP_AGENT_ID=jdb_ag_... JECP_API_KEY=jdb_ak_... \
jecp invoke a/b c --json | jq '.output'

JECP_AGENT_KEY is the legacy name and still works for one more release; switch to JECP_API_KEY to avoid the deprecation warning. The variable will be removed in v0.10.

x402 quickstart (v0.7.0)

JECP supports x402 (USDC on Base) as a parallel payment rail alongside the default Stripe-funded wallet. Per-call settlement, lower fees, no balance required.

1. Link your Base wallet address

jecp wallet:link-usdc 0xAb11Cd22Ef33aaBBCcDDeeFF0011223344556677
# → stored in ~/.jecp/config.json (CLI never holds the private key)

The CLI accepts three signer kinds via --signer:

  • env (default) — SDK reads BASE_PRIVATE_KEY from env at invoke time
  • file — SDK reads ~/.jecp/base-key.txt (chmod 600)
  • kms — bring your own KMS adapter via SDK directly

2. Verify readiness

jecp doctor
# … existing 9 checks …# ── x402 ──# ✓ x402 signer configured: 0xAb11... (env)# ✓ x402 facilitator reachable: https://x402.org/facilitator (122ms)# ✓ Base RPC reachable: https://mainnet.base.org chain=base (88ms)# ✓ Splitter check: catalog advertises payment_methods: [..., x402]

3. Invoke with x402

export BASE_PRIVATE_KEY=0x...
jecp invoke jobdonebot/bg-remover-pro remove \
--pay x402 \
--input '{"image_url":"https://example.com/photo.jpg"}'# … receipt block printed:# Payment receipt (x402):# method: x402# txHash: 0xdead…# network: base# amount: $0.005 (5000 USDC micros)# Basescan: https://basescan.org/tx/0xdead…

--pay auto (default) tries x402 when both the agent and capability support it, and falls back to wallet otherwise. --pay wallet forces the classic balance-funded path.

4. Provider opt-in (when scaffolding)

jecp init-provider now asks "Accept x402 (USDC on Base) payments? (Y/n)" and emits payment_methods: ["stripe", "x402"] in the manifest by default. Locked design §6.2 — hybrid mode is the recommended default.

Note: ethers is an optional peer dep. Install it (npm i -g ethers) if you use --pay x402; otherwise the CLI falls back to wallet mode with a clear hint.

Integration tests

Default npm test runs hermetic unit tests only. An opt-in suite under test/integration/ spawns the builtdist/cli.js against a live JECP Hub to catch CLI/Hub contract drift:

# Always build first — integration tests run the compiled artifact.
npm run build
# Against the default staging Hub (https://setsuna-jobdonebot.fly.dev)
npm run test:integration
# Against a local Hub
JECP_TEST_BASE_URL=http://localhost:8080 npm run test:integration
# Against jecp.dev (production — coordinate first)
JECP_TEST_BASE_URL=https://jecp.dev npm run test:integration

See test/integration/README.md for what each test asserts and how HOME is sandboxed in spawned children.

License

Apache 2.0 — Tufe Company Inc.

About

Command-line interface for JECP — Joint Execution & Commerce Protocol. Register agents, invoke capabilities, manage Providers from your terminal.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Strip utm_, fbclid, gclid, etc. from all links on page\n(function() {\n var trackingParams = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_term', 'utm_content',\n 'fbclid', 'gclid', 'dclid', 'msclkid', 'yclid',\n 'ref', 'ref_src', 'source', 'medium', 'campaign'];\n \n function cleanUrl(url) {\n try {\n var u = new URL(url, window.location.origin);\n var changed = false;\n trackingParams.forEach(function(p) {\n if (u.searchParams.has(p)) {\n u.searchParams.delete(p);\n changed = true;\n }\n });\n return changed ? u.toString() : url;\n } catch (e) {\n return url;\n }\n }\n \n function cleanLinks() {\n document.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n \n cleanLinks();\n \n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1) {\n if (node.tagName === 'A') cleanLinks();\n node.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Remove Tracking Parameters from Links"); } } catch(__e) { console.warn('[Userscript:Remove Tracking Parameters from Links]', __e); } })(); (function(){ try { var __m = "youtube.com"; var __re = new RegExp('^' + "youtube\\.com" + '
Skip to content

Repository files navigation

@jecpdev/cli

Command-line interface for JECP — Joint Execution & Commerce Protocol. Register agents, invoke capabilities, manage Providers from your terminal.

npmLicense

npm install -g @jecpdev/cli
# or one-shot
npx @jecpdev/cli --help

Quickstart — agent in 30 seconds

$ jecp register --name MyBot --type demo
✓ Agent registered.
AGENT_ID: jdb_ag_a1b2c3...
API_KEY: jdb_ak_xxxxxxxxxxxx
Free calls: 100
✓ Credentials saved to ~/.jecp/config.json (mode 0600)
$ jecp invoke jobdonebot/content-factory translate \
--input '{"text":"Hello","target_lang":"JA"}'
✓ Invocation complete.
Output: {"translated":"こんにちは"}
Provider: jobdonebot/content-factory@1.0.0
Charged: $0.005 USDC
Balance: $0.995 USDC

Quickstart — Provider in 30 minutes (v0.8.1+)

$ jecp init-provider --example hello-world # scaffold runnable starter
✓ Scaffolded hello-world Provider in.
→ jecp.yaml, handler.mjs, package.json, README.md
$ npm install
$ jecp provider register \
--namespace myco --display-name "MyCo" \
--email ops@myco.example --endpoint https://myco.example/jecp \
--country JP --wait # auto-polls DNS until verified
✓ Provider registered. Credentials saved to ~/.jecp/config.json
→ Add this DNS TXT record:
_jecp.myco.example TXT "jecp-verify=tok_xyz"
Polling /v1/providers/verify-dns until propagation…
✓ DNS verified after 3 attempts.
$ JECP_HMAC_SECRET=$(jq -r .provider_hmac_secret ~/.jecp/config.json) \
node handler.mjs &# local Provider running
$ jecp provider connect-stripe # open the URL in browser
$ jecp provider publish jecp.yaml # active once DNS+Stripe verified
✓ Published myco/echo@1.0.0

For a fully interactive scaffold (without the hello-world starter), omit --example. The bare YAML stub is available with --example.

Commands

CommandDescription
jecp registerRegister a new agent (interactive or via flags)
jecp loginSave existing agent credentials
jecp logoutClear stored credentials
jecp invoke <cap> <action>Invoke a capability action (--pay wallet|x402|auto)
jecp catalogList capabilities (paginated)
jecp topup <amount>Top up wallet (5/20/100 USDC)
jecp statusShow health, balance, agent info
jecp doctorDiagnose connectivity, config, SDK version, x402 readiness
jecp wallet:link-usdc <addr>v0.7.0 — Link Base USDC wallet for x402 payments
jecp init-providerInteractive jecp.yaml scaffold (now with x402 prompts)
jecp provider registerv0.8.0 — Register as Provider; saves creds, prints DNS TXT
jecp provider verify-dnsv0.8.0 — Auto-poll until DNS TXT propagates (--once for CI)
jecp provider validate [file]v0.8.2 — Validate jecp.yaml locally against the manifest schema (exits 1 on invalid)
jecp provider publish [file]v0.8.0 — Publish jecp.yaml to /v1/manifests
jecp provider mev0.8.0 — Show Provider DNS/Stripe/endpoint status
jecp provider rotate-keyv0.8.0 — Rotate Provider api_key (7-day grace)
jecp provider connect-stripev0.8.0 — Get Stripe Connect onboarding URL
jecp rotate-keyRotate this agent's API key (7-day grace)
jecp refund … / webhook …Refund + webhook subscription management

Run jecp <command> --help for full options.

Global flags

  • --json — machine-readable JSON output (for CI/scripting)
  • --base-url <url> — override Hub URL (default https://jecp.dev)

Auth precedence

  1. JECP_AGENT_ID + JECP_API_KEY env vars (CI mode)
  2. ~/.jecp/config.json (saved by register or login)

Environment variables

VariableStatusNotes
JECP_AGENT_IDactiveAgent ID (e.g. jdb_ag_…).
JECP_API_KEYactivePreferred name for the agent's API key. Matches the Hub's X-API-Key header convention.
JECP_AGENT_KEYdeprecatedLegacy alias for JECP_API_KEY. Still honored, but emits a deprecation warning on stderr and will be removed in v0.10.
JECP_BASE_URLactiveOverride Hub URL (default https://jecp.dev).
JECP_PROVIDER_ID / JECP_PROVIDER_KEYactiveProvider credentials, independent of agent credentials.

If both JECP_API_KEY and JECP_AGENT_KEY are set, JECP_API_KEY wins and no deprecation warning is emitted.

Config file

Stored at ~/.jecp/config.json with mode 0600. Contains agent_id, api_key, base_url. Treat like a Stripe secret key.

Examples

Invoke with budget cap

jecp invoke deepl/translate translate \
--input '{"text":"Hello","target_lang":"JA"}' \
--budget 1.00 \
--timeout 60000

Discover capabilities

jecp catalog --page-size 100 --namespace jobdonebot

CI integration

JECP_AGENT_ID=jdb_ag_... JECP_API_KEY=jdb_ak_... \
jecp invoke a/b c --json | jq '.output'

JECP_AGENT_KEY is the legacy name and still works for one more release; switch to JECP_API_KEY to avoid the deprecation warning. The variable will be removed in v0.10.

x402 quickstart (v0.7.0)

JECP supports x402 (USDC on Base) as a parallel payment rail alongside the default Stripe-funded wallet. Per-call settlement, lower fees, no balance required.

1. Link your Base wallet address

jecp wallet:link-usdc 0xAb11Cd22Ef33aaBBCcDDeeFF0011223344556677
# → stored in ~/.jecp/config.json (CLI never holds the private key)

The CLI accepts three signer kinds via --signer:

  • env (default) — SDK reads BASE_PRIVATE_KEY from env at invoke time
  • file — SDK reads ~/.jecp/base-key.txt (chmod 600)
  • kms — bring your own KMS adapter via SDK directly

2. Verify readiness

jecp doctor
# … existing 9 checks …# ── x402 ──# ✓ x402 signer configured: 0xAb11... (env)# ✓ x402 facilitator reachable: https://x402.org/facilitator (122ms)# ✓ Base RPC reachable: https://mainnet.base.org chain=base (88ms)# ✓ Splitter check: catalog advertises payment_methods: [..., x402]

3. Invoke with x402

export BASE_PRIVATE_KEY=0x...
jecp invoke jobdonebot/bg-remover-pro remove \
--pay x402 \
--input '{"image_url":"https://example.com/photo.jpg"}'# … receipt block printed:# Payment receipt (x402):# method: x402# txHash: 0xdead…# network: base# amount: $0.005 (5000 USDC micros)# Basescan: https://basescan.org/tx/0xdead…

--pay auto (default) tries x402 when both the agent and capability support it, and falls back to wallet otherwise. --pay wallet forces the classic balance-funded path.

4. Provider opt-in (when scaffolding)

jecp init-provider now asks "Accept x402 (USDC on Base) payments? (Y/n)" and emits payment_methods: ["stripe", "x402"] in the manifest by default. Locked design §6.2 — hybrid mode is the recommended default.

Note: ethers is an optional peer dep. Install it (npm i -g ethers) if you use --pay x402; otherwise the CLI falls back to wallet mode with a clear hint.

Integration tests

Default npm test runs hermetic unit tests only. An opt-in suite under test/integration/ spawns the builtdist/cli.js against a live JECP Hub to catch CLI/Hub contract drift:

# Always build first — integration tests run the compiled artifact.
npm run build
# Against the default staging Hub (https://setsuna-jobdonebot.fly.dev)
npm run test:integration
# Against a local Hub
JECP_TEST_BASE_URL=http://localhost:8080 npm run test:integration
# Against jecp.dev (production — coordinate first)
JECP_TEST_BASE_URL=https://jecp.dev npm run test:integration

See test/integration/README.md for what each test asserts and how HOME is sandboxed in spawned children.

License

Apache 2.0 — Tufe Company Inc.

About

Command-line interface for JECP — Joint Execution & Commerce Protocol. Register agents, invoke capabilities, manage Providers from your terminal.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Auto-enable theater mode on YouTube\n(function() {\n function tryTheater() {\n var btn = document.querySelector('button[aria-label=\"Theater mode\"], ytd-player #player button[title=\"Theater mode\"]');\n if (btn && !btn.classList.contains('activated')) {\n btn.click();\n }\n }\n \n // Try immediately\n tryTheater();\n \n // Try after navigation (SPA)\n var lastUrl = location.href;\n setInterval(function() {\n if (location.href !== lastUrl) {\n lastUrl = location.href;\n setTimeout(tryTheater, 500);\n }\n }, 1000);\n \n // Also try on player load\n var observer = new MutationObserver(tryTheater);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "YouTube Theater Mode Default"); } } catch(__e) { console.warn('[Userscript:YouTube Theater Mode Default]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

Repository files navigation

@jecpdev/cli

Command-line interface for JECP — Joint Execution & Commerce Protocol. Register agents, invoke capabilities, manage Providers from your terminal.

npmLicense

npm install -g @jecpdev/cli
# or one-shot
npx @jecpdev/cli --help

Quickstart — agent in 30 seconds

$ jecp register --name MyBot --type demo
✓ Agent registered.
AGENT_ID: jdb_ag_a1b2c3...
API_KEY: jdb_ak_xxxxxxxxxxxx
Free calls: 100
✓ Credentials saved to ~/.jecp/config.json (mode 0600)
$ jecp invoke jobdonebot/content-factory translate \
--input '{"text":"Hello","target_lang":"JA"}'
✓ Invocation complete.
Output: {"translated":"こんにちは"}
Provider: jobdonebot/content-factory@1.0.0
Charged: $0.005 USDC
Balance: $0.995 USDC

Quickstart — Provider in 30 minutes (v0.8.1+)

$ jecp init-provider --example hello-world # scaffold runnable starter
✓ Scaffolded hello-world Provider in.
→ jecp.yaml, handler.mjs, package.json, README.md
$ npm install
$ jecp provider register \
--namespace myco --display-name "MyCo" \
--email ops@myco.example --endpoint https://myco.example/jecp \
--country JP --wait # auto-polls DNS until verified
✓ Provider registered. Credentials saved to ~/.jecp/config.json
→ Add this DNS TXT record:
_jecp.myco.example TXT "jecp-verify=tok_xyz"
Polling /v1/providers/verify-dns until propagation…
✓ DNS verified after 3 attempts.
$ JECP_HMAC_SECRET=$(jq -r .provider_hmac_secret ~/.jecp/config.json) \
node handler.mjs &# local Provider running
$ jecp provider connect-stripe # open the URL in browser
$ jecp provider publish jecp.yaml # active once DNS+Stripe verified
✓ Published myco/echo@1.0.0

For a fully interactive scaffold (without the hello-world starter), omit --example. The bare YAML stub is available with --example.

Commands

CommandDescription
jecp registerRegister a new agent (interactive or via flags)
jecp loginSave existing agent credentials
jecp logoutClear stored credentials
jecp invoke <cap> <action>Invoke a capability action (--pay wallet|x402|auto)
jecp catalogList capabilities (paginated)
jecp topup <amount>Top up wallet (5/20/100 USDC)
jecp statusShow health, balance, agent info
jecp doctorDiagnose connectivity, config, SDK version, x402 readiness
jecp wallet:link-usdc <addr>v0.7.0 — Link Base USDC wallet for x402 payments
jecp init-providerInteractive jecp.yaml scaffold (now with x402 prompts)
jecp provider registerv0.8.0 — Register as Provider; saves creds, prints DNS TXT
jecp provider verify-dnsv0.8.0 — Auto-poll until DNS TXT propagates (--once for CI)
jecp provider validate [file]v0.8.2 — Validate jecp.yaml locally against the manifest schema (exits 1 on invalid)
jecp provider publish [file]v0.8.0 — Publish jecp.yaml to /v1/manifests
jecp provider mev0.8.0 — Show Provider DNS/Stripe/endpoint status
jecp provider rotate-keyv0.8.0 — Rotate Provider api_key (7-day grace)
jecp provider connect-stripev0.8.0 — Get Stripe Connect onboarding URL
jecp rotate-keyRotate this agent's API key (7-day grace)
jecp refund … / webhook …Refund + webhook subscription management

Run jecp <command> --help for full options.

Global flags

  • --json — machine-readable JSON output (for CI/scripting)
  • --base-url <url> — override Hub URL (default https://jecp.dev)

Auth precedence

  1. JECP_AGENT_ID + JECP_API_KEY env vars (CI mode)
  2. ~/.jecp/config.json (saved by register or login)

Environment variables

VariableStatusNotes
JECP_AGENT_IDactiveAgent ID (e.g. jdb_ag_…).
JECP_API_KEYactivePreferred name for the agent's API key. Matches the Hub's X-API-Key header convention.
JECP_AGENT_KEYdeprecatedLegacy alias for JECP_API_KEY. Still honored, but emits a deprecation warning on stderr and will be removed in v0.10.
JECP_BASE_URLactiveOverride Hub URL (default https://jecp.dev).
JECP_PROVIDER_ID / JECP_PROVIDER_KEYactiveProvider credentials, independent of agent credentials.

If both JECP_API_KEY and JECP_AGENT_KEY are set, JECP_API_KEY wins and no deprecation warning is emitted.

Config file

Stored at ~/.jecp/config.json with mode 0600. Contains agent_id, api_key, base_url. Treat like a Stripe secret key.

Examples

Invoke with budget cap

jecp invoke deepl/translate translate \
--input '{"text":"Hello","target_lang":"JA"}' \
--budget 1.00 \
--timeout 60000

Discover capabilities

jecp catalog --page-size 100 --namespace jobdonebot

CI integration

JECP_AGENT_ID=jdb_ag_... JECP_API_KEY=jdb_ak_... \
jecp invoke a/b c --json | jq '.output'

JECP_AGENT_KEY is the legacy name and still works for one more release; switch to JECP_API_KEY to avoid the deprecation warning. The variable will be removed in v0.10.

x402 quickstart (v0.7.0)

JECP supports x402 (USDC on Base) as a parallel payment rail alongside the default Stripe-funded wallet. Per-call settlement, lower fees, no balance required.

1. Link your Base wallet address

jecp wallet:link-usdc 0xAb11Cd22Ef33aaBBCcDDeeFF0011223344556677
# → stored in ~/.jecp/config.json (CLI never holds the private key)

The CLI accepts three signer kinds via --signer:

  • env (default) — SDK reads BASE_PRIVATE_KEY from env at invoke time
  • file — SDK reads ~/.jecp/base-key.txt (chmod 600)
  • kms — bring your own KMS adapter via SDK directly

2. Verify readiness

jecp doctor
# … existing 9 checks …# ── x402 ──# ✓ x402 signer configured: 0xAb11... (env)# ✓ x402 facilitator reachable: https://x402.org/facilitator (122ms)# ✓ Base RPC reachable: https://mainnet.base.org chain=base (88ms)# ✓ Splitter check: catalog advertises payment_methods: [..., x402]

3. Invoke with x402

export BASE_PRIVATE_KEY=0x...
jecp invoke jobdonebot/bg-remover-pro remove \
--pay x402 \
--input '{"image_url":"https://example.com/photo.jpg"}'# … receipt block printed:# Payment receipt (x402):# method: x402# txHash: 0xdead…# network: base# amount: $0.005 (5000 USDC micros)# Basescan: https://basescan.org/tx/0xdead…

--pay auto (default) tries x402 when both the agent and capability support it, and falls back to wallet otherwise. --pay wallet forces the classic balance-funded path.

4. Provider opt-in (when scaffolding)

jecp init-provider now asks "Accept x402 (USDC on Base) payments? (Y/n)" and emits payment_methods: ["stripe", "x402"] in the manifest by default. Locked design §6.2 — hybrid mode is the recommended default.

Note: ethers is an optional peer dep. Install it (npm i -g ethers) if you use --pay x402; otherwise the CLI falls back to wallet mode with a clear hint.

Integration tests

Default npm test runs hermetic unit tests only. An opt-in suite under test/integration/ spawns the builtdist/cli.js against a live JECP Hub to catch CLI/Hub contract drift:

# Always build first — integration tests run the compiled artifact.
npm run build
# Against the default staging Hub (https://setsuna-jobdonebot.fly.dev)
npm run test:integration
# Against a local Hub
JECP_TEST_BASE_URL=http://localhost:8080 npm run test:integration
# Against jecp.dev (production — coordinate first)
JECP_TEST_BASE_URL=https://jecp.dev npm run test:integration

See test/integration/README.md for what each test asserts and how HOME is sandboxed in spawned children.

License

Apache 2.0 — Tufe Company Inc.

About

Command-line interface for JECP — Joint Execution & Commerce Protocol. Register agents, invoke capabilities, manage Providers from your terminal.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Remove or un-stick sticky/fixed headers that block content\n(function() {\n function unstick() {\n document.querySelectorAll('header, nav, [role=\"banner\"], .header, .navbar, .sticky, .fixed-top, [style*=\"position: fixed\"], [style*=\"position:sticky\"]').forEach(function(el) {\n if (el.style.position === 'fixed' || el.style.position === 'sticky' || \n getComputedStyle(el).position === 'fixed' || getComputedStyle(el).position === 'sticky') {\n el.style.position = 'static';\n el.style.top = 'auto';\n el.style.zIndex = 'auto';\n }\n });\n }\n \n unstick();\n \n var observer = new MutationObserver(unstick);\n observer.observe(document.body, { childList: true, subtree: true, attributes: true, attributeFilter: ['style', 'class'] });\n})();", "Kill Sticky Headers"); } } catch(__e) { console.warn('[Userscript:Kill Sticky Headers]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

Repository files navigation

@jecpdev/cli

Command-line interface for JECP — Joint Execution & Commerce Protocol. Register agents, invoke capabilities, manage Providers from your terminal.

npmLicense

npm install -g @jecpdev/cli
# or one-shot
npx @jecpdev/cli --help

Quickstart — agent in 30 seconds

$ jecp register --name MyBot --type demo
✓ Agent registered.
AGENT_ID: jdb_ag_a1b2c3...
API_KEY: jdb_ak_xxxxxxxxxxxx
Free calls: 100
✓ Credentials saved to ~/.jecp/config.json (mode 0600)
$ jecp invoke jobdonebot/content-factory translate \
--input '{"text":"Hello","target_lang":"JA"}'
✓ Invocation complete.
Output: {"translated":"こんにちは"}
Provider: jobdonebot/content-factory@1.0.0
Charged: $0.005 USDC
Balance: $0.995 USDC

Quickstart — Provider in 30 minutes (v0.8.1+)

$ jecp init-provider --example hello-world # scaffold runnable starter
✓ Scaffolded hello-world Provider in.
→ jecp.yaml, handler.mjs, package.json, README.md
$ npm install
$ jecp provider register \
--namespace myco --display-name "MyCo" \
--email ops@myco.example --endpoint https://myco.example/jecp \
--country JP --wait # auto-polls DNS until verified
✓ Provider registered. Credentials saved to ~/.jecp/config.json
→ Add this DNS TXT record:
_jecp.myco.example TXT "jecp-verify=tok_xyz"
Polling /v1/providers/verify-dns until propagation…
✓ DNS verified after 3 attempts.
$ JECP_HMAC_SECRET=$(jq -r .provider_hmac_secret ~/.jecp/config.json) \
node handler.mjs &# local Provider running
$ jecp provider connect-stripe # open the URL in browser
$ jecp provider publish jecp.yaml # active once DNS+Stripe verified
✓ Published myco/echo@1.0.0

For a fully interactive scaffold (without the hello-world starter), omit --example. The bare YAML stub is available with --example.

Commands

CommandDescription
jecp registerRegister a new agent (interactive or via flags)
jecp loginSave existing agent credentials
jecp logoutClear stored credentials
jecp invoke <cap> <action>Invoke a capability action (--pay wallet|x402|auto)
jecp catalogList capabilities (paginated)
jecp topup <amount>Top up wallet (5/20/100 USDC)
jecp statusShow health, balance, agent info
jecp doctorDiagnose connectivity, config, SDK version, x402 readiness
jecp wallet:link-usdc <addr>v0.7.0 — Link Base USDC wallet for x402 payments
jecp init-providerInteractive jecp.yaml scaffold (now with x402 prompts)
jecp provider registerv0.8.0 — Register as Provider; saves creds, prints DNS TXT
jecp provider verify-dnsv0.8.0 — Auto-poll until DNS TXT propagates (--once for CI)
jecp provider validate [file]v0.8.2 — Validate jecp.yaml locally against the manifest schema (exits 1 on invalid)
jecp provider publish [file]v0.8.0 — Publish jecp.yaml to /v1/manifests
jecp provider mev0.8.0 — Show Provider DNS/Stripe/endpoint status
jecp provider rotate-keyv0.8.0 — Rotate Provider api_key (7-day grace)
jecp provider connect-stripev0.8.0 — Get Stripe Connect onboarding URL
jecp rotate-keyRotate this agent's API key (7-day grace)
jecp refund … / webhook …Refund + webhook subscription management

Run jecp <command> --help for full options.

Global flags

  • --json — machine-readable JSON output (for CI/scripting)
  • --base-url <url> — override Hub URL (default https://jecp.dev)

Auth precedence

  1. JECP_AGENT_ID + JECP_API_KEY env vars (CI mode)
  2. ~/.jecp/config.json (saved by register or login)

Environment variables

VariableStatusNotes
JECP_AGENT_IDactiveAgent ID (e.g. jdb_ag_…).
JECP_API_KEYactivePreferred name for the agent's API key. Matches the Hub's X-API-Key header convention.
JECP_AGENT_KEYdeprecatedLegacy alias for JECP_API_KEY. Still honored, but emits a deprecation warning on stderr and will be removed in v0.10.
JECP_BASE_URLactiveOverride Hub URL (default https://jecp.dev).
JECP_PROVIDER_ID / JECP_PROVIDER_KEYactiveProvider credentials, independent of agent credentials.

If both JECP_API_KEY and JECP_AGENT_KEY are set, JECP_API_KEY wins and no deprecation warning is emitted.

Config file

Stored at ~/.jecp/config.json with mode 0600. Contains agent_id, api_key, base_url. Treat like a Stripe secret key.

Examples

Invoke with budget cap

jecp invoke deepl/translate translate \
--input '{"text":"Hello","target_lang":"JA"}' \
--budget 1.00 \
--timeout 60000

Discover capabilities

jecp catalog --page-size 100 --namespace jobdonebot

CI integration

JECP_AGENT_ID=jdb_ag_... JECP_API_KEY=jdb_ak_... \
jecp invoke a/b c --json | jq '.output'

JECP_AGENT_KEY is the legacy name and still works for one more release; switch to JECP_API_KEY to avoid the deprecation warning. The variable will be removed in v0.10.

x402 quickstart (v0.7.0)

JECP supports x402 (USDC on Base) as a parallel payment rail alongside the default Stripe-funded wallet. Per-call settlement, lower fees, no balance required.

1. Link your Base wallet address

jecp wallet:link-usdc 0xAb11Cd22Ef33aaBBCcDDeeFF0011223344556677
# → stored in ~/.jecp/config.json (CLI never holds the private key)

The CLI accepts three signer kinds via --signer:

  • env (default) — SDK reads BASE_PRIVATE_KEY from env at invoke time
  • file — SDK reads ~/.jecp/base-key.txt (chmod 600)
  • kms — bring your own KMS adapter via SDK directly

2. Verify readiness

jecp doctor
# … existing 9 checks …# ── x402 ──# ✓ x402 signer configured: 0xAb11... (env)# ✓ x402 facilitator reachable: https://x402.org/facilitator (122ms)# ✓ Base RPC reachable: https://mainnet.base.org chain=base (88ms)# ✓ Splitter check: catalog advertises payment_methods: [..., x402]

3. Invoke with x402

export BASE_PRIVATE_KEY=0x...
jecp invoke jobdonebot/bg-remover-pro remove \
--pay x402 \
--input '{"image_url":"https://example.com/photo.jpg"}'# … receipt block printed:# Payment receipt (x402):# method: x402# txHash: 0xdead…# network: base# amount: $0.005 (5000 USDC micros)# Basescan: https://basescan.org/tx/0xdead…

--pay auto (default) tries x402 when both the agent and capability support it, and falls back to wallet otherwise. --pay wallet forces the classic balance-funded path.

4. Provider opt-in (when scaffolding)

jecp init-provider now asks "Accept x402 (USDC on Base) payments? (Y/n)" and emits payment_methods: ["stripe", "x402"] in the manifest by default. Locked design §6.2 — hybrid mode is the recommended default.

Note: ethers is an optional peer dep. Install it (npm i -g ethers) if you use --pay x402; otherwise the CLI falls back to wallet mode with a clear hint.

Integration tests

Default npm test runs hermetic unit tests only. An opt-in suite under test/integration/ spawns the builtdist/cli.js against a live JECP Hub to catch CLI/Hub contract drift:

# Always build first — integration tests run the compiled artifact.
npm run build
# Against the default staging Hub (https://setsuna-jobdonebot.fly.dev)
npm run test:integration
# Against a local Hub
JECP_TEST_BASE_URL=http://localhost:8080 npm run test:integration
# Against jecp.dev (production — coordinate first)
JECP_TEST_BASE_URL=https://jecp.dev npm run test:integration

See test/integration/README.md for what each test asserts and how HOME is sandboxed in spawned children.

License

Apache 2.0 — Tufe Company Inc.

About

Command-line interface for JECP — Joint Execution & Commerce Protocol. Register agents, invoke capabilities, manage Providers from your terminal.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Universal Dark Mode - works on any site\n(function() {\n var enabled = true;\n \n function applyDarkMode() {\n if (!enabled) return;\n \n // Create style element if it doesn't exist\n var style = document.getElementById('universal-dark-mode-style');\n if (!style) {\n style = document.createElement('style');\n style.id = 'universal-dark-mode-style';\n document.head.appendChild(style);\n }\n \n // Dark mode CSS - inverts colors but preserves images/video\n style.textContent = '\n /* Invert everything except media */\n html {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #1a1a2e !important;\n }\n \n /* Restore images, videos, iframes, canvas */\n img, video, iframe, canvas, svg, picture, [style*=\"background-image\"] {\n filter: invert(1) hue-rotate(180deg) !important;\n }\n \n /* Preserve specific elements that should not be inverted */\n .no-dark-mode, .no-dark-mode *,\n [data-theme=\"light\"], [data-theme=\"light\"],\n .ace_editor, .ace_editor *,\n .CodeMirror, .CodeMirror *,\n .monaco-editor, .monaco-editor *,\n .markdown-body pre, .markdown-body pre *,\n .highlight, .highlight *,\n pre code, pre code * {\n filter: none !important;\n }\n \n /* Fix common UI elements */\n .modal, .popup, .dropdown-menu, .tooltip, .popover {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #2d2d44 !important;\n border-color: #444 !important;\n }\n \n /* Scrollbars */\n ::-webkit-scrollbar { background: #1a1a2e !important; }\n ::-webkit-scrollbar-thumb { background: #444 !important; }\n ::-webkit-scrollbar-thumb:hover { background: #555 !important; }\n \n /* Selection */\n ::selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ::-moz-selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ';\n }\n \n function removeDarkMode() {\n var style = document.getElementById('universal-dark-mode-style');\n if (style) style.remove();\n }\n \n // Toggle with Alt+Shift+D\n document.addEventListener('keydown', function(e) {\n if (e.altKey && e.shiftKey && e.key === 'D') {\n e.preventDefault();\n enabled = !enabled;\n if (enabled) {\n applyDarkMode();\n console.log('[Universal Dark Mode] Enabled');\n } else {\n removeDarkMode();\n console.log('[Universal Dark Mode] Disabled');\n }\n }\n });\n \n // Apply on load\n applyDarkMode();\n \n // Re-apply on dynamic content\n var observer = new MutationObserver(function(mutations) {\n if (enabled && !document.getElementById('universal-dark-mode-style')) {\n applyDarkMode();\n }\n });\n observer.observe(document.head, { childList: true });\n \n console.log('[Universal Dark Mode] Loaded - Press Alt+Shift+D to toggle');\n})();", "Universal Dark Mode"); } } catch(__e) { console.warn('[Userscript:Universal Dark Mode]', __e); } })(); })();
Skip to content

Repository files navigation

@jecpdev/cli

Command-line interface for JECP — Joint Execution & Commerce Protocol. Register agents, invoke capabilities, manage Providers from your terminal.

npmLicense

npm install -g @jecpdev/cli
# or one-shot
npx @jecpdev/cli --help

Quickstart — agent in 30 seconds

$ jecp register --name MyBot --type demo
✓ Agent registered.
AGENT_ID: jdb_ag_a1b2c3...
API_KEY: jdb_ak_xxxxxxxxxxxx
Free calls: 100
✓ Credentials saved to ~/.jecp/config.json (mode 0600)
$ jecp invoke jobdonebot/content-factory translate \
--input '{"text":"Hello","target_lang":"JA"}'
✓ Invocation complete.
Output: {"translated":"こんにちは"}
Provider: jobdonebot/content-factory@1.0.0
Charged: $0.005 USDC
Balance: $0.995 USDC

Quickstart — Provider in 30 minutes (v0.8.1+)

$ jecp init-provider --example hello-world # scaffold runnable starter
✓ Scaffolded hello-world Provider in.
→ jecp.yaml, handler.mjs, package.json, README.md
$ npm install
$ jecp provider register \
--namespace myco --display-name "MyCo" \
--email ops@myco.example --endpoint https://myco.example/jecp \
--country JP --wait # auto-polls DNS until verified
✓ Provider registered. Credentials saved to ~/.jecp/config.json
→ Add this DNS TXT record:
_jecp.myco.example TXT "jecp-verify=tok_xyz"
Polling /v1/providers/verify-dns until propagation…
✓ DNS verified after 3 attempts.
$ JECP_HMAC_SECRET=$(jq -r .provider_hmac_secret ~/.jecp/config.json) \
node handler.mjs &# local Provider running
$ jecp provider connect-stripe # open the URL in browser
$ jecp provider publish jecp.yaml # active once DNS+Stripe verified
✓ Published myco/echo@1.0.0

For a fully interactive scaffold (without the hello-world starter), omit --example. The bare YAML stub is available with --example.

Commands

CommandDescription
jecp registerRegister a new agent (interactive or via flags)
jecp loginSave existing agent credentials
jecp logoutClear stored credentials
jecp invoke <cap> <action>Invoke a capability action (--pay wallet|x402|auto)
jecp catalogList capabilities (paginated)
jecp topup <amount>Top up wallet (5/20/100 USDC)
jecp statusShow health, balance, agent info
jecp doctorDiagnose connectivity, config, SDK version, x402 readiness
jecp wallet:link-usdc <addr>v0.7.0 — Link Base USDC wallet for x402 payments
jecp init-providerInteractive jecp.yaml scaffold (now with x402 prompts)
jecp provider registerv0.8.0 — Register as Provider; saves creds, prints DNS TXT
jecp provider verify-dnsv0.8.0 — Auto-poll until DNS TXT propagates (--once for CI)
jecp provider validate [file]v0.8.2 — Validate jecp.yaml locally against the manifest schema (exits 1 on invalid)
jecp provider publish [file]v0.8.0 — Publish jecp.yaml to /v1/manifests
jecp provider mev0.8.0 — Show Provider DNS/Stripe/endpoint status
jecp provider rotate-keyv0.8.0 — Rotate Provider api_key (7-day grace)
jecp provider connect-stripev0.8.0 — Get Stripe Connect onboarding URL
jecp rotate-keyRotate this agent's API key (7-day grace)
jecp refund … / webhook …Refund + webhook subscription management

Run jecp <command> --help for full options.

Global flags

  • --json — machine-readable JSON output (for CI/scripting)
  • --base-url <url> — override Hub URL (default https://jecp.dev)

Auth precedence

  1. JECP_AGENT_ID + JECP_API_KEY env vars (CI mode)
  2. ~/.jecp/config.json (saved by register or login)

Environment variables

VariableStatusNotes
JECP_AGENT_IDactiveAgent ID (e.g. jdb_ag_…).
JECP_API_KEYactivePreferred name for the agent's API key. Matches the Hub's X-API-Key header convention.
JECP_AGENT_KEYdeprecatedLegacy alias for JECP_API_KEY. Still honored, but emits a deprecation warning on stderr and will be removed in v0.10.
JECP_BASE_URLactiveOverride Hub URL (default https://jecp.dev).
JECP_PROVIDER_ID / JECP_PROVIDER_KEYactiveProvider credentials, independent of agent credentials.

If both JECP_API_KEY and JECP_AGENT_KEY are set, JECP_API_KEY wins and no deprecation warning is emitted.

Config file

Stored at ~/.jecp/config.json with mode 0600. Contains agent_id, api_key, base_url. Treat like a Stripe secret key.

Examples

Invoke with budget cap

jecp invoke deepl/translate translate \
--input '{"text":"Hello","target_lang":"JA"}' \
--budget 1.00 \
--timeout 60000

Discover capabilities

jecp catalog --page-size 100 --namespace jobdonebot

CI integration

JECP_AGENT_ID=jdb_ag_... JECP_API_KEY=jdb_ak_... \
jecp invoke a/b c --json | jq '.output'

JECP_AGENT_KEY is the legacy name and still works for one more release; switch to JECP_API_KEY to avoid the deprecation warning. The variable will be removed in v0.10.

x402 quickstart (v0.7.0)

JECP supports x402 (USDC on Base) as a parallel payment rail alongside the default Stripe-funded wallet. Per-call settlement, lower fees, no balance required.

1. Link your Base wallet address

jecp wallet:link-usdc 0xAb11Cd22Ef33aaBBCcDDeeFF0011223344556677
# → stored in ~/.jecp/config.json (CLI never holds the private key)

The CLI accepts three signer kinds via --signer:

  • env (default) — SDK reads BASE_PRIVATE_KEY from env at invoke time
  • file — SDK reads ~/.jecp/base-key.txt (chmod 600)
  • kms — bring your own KMS adapter via SDK directly

2. Verify readiness

jecp doctor
# … existing 9 checks …# ── x402 ──# ✓ x402 signer configured: 0xAb11... (env)# ✓ x402 facilitator reachable: https://x402.org/facilitator (122ms)# ✓ Base RPC reachable: https://mainnet.base.org chain=base (88ms)# ✓ Splitter check: catalog advertises payment_methods: [..., x402]

3. Invoke with x402

export BASE_PRIVATE_KEY=0x...
jecp invoke jobdonebot/bg-remover-pro remove \
--pay x402 \
--input '{"image_url":"https://example.com/photo.jpg"}'# … receipt block printed:# Payment receipt (x402):# method: x402# txHash: 0xdead…# network: base# amount: $0.005 (5000 USDC micros)# Basescan: https://basescan.org/tx/0xdead…

--pay auto (default) tries x402 when both the agent and capability support it, and falls back to wallet otherwise. --pay wallet forces the classic balance-funded path.

4. Provider opt-in (when scaffolding)

jecp init-provider now asks "Accept x402 (USDC on Base) payments? (Y/n)" and emits payment_methods: ["stripe", "x402"] in the manifest by default. Locked design §6.2 — hybrid mode is the recommended default.

Note: ethers is an optional peer dep. Install it (npm i -g ethers) if you use --pay x402; otherwise the CLI falls back to wallet mode with a clear hint.

Integration tests

Default npm test runs hermetic unit tests only. An opt-in suite under test/integration/ spawns the builtdist/cli.js against a live JECP Hub to catch CLI/Hub contract drift:

# Always build first — integration tests run the compiled artifact.
npm run build
# Against the default staging Hub (https://setsuna-jobdonebot.fly.dev)
npm run test:integration
# Against a local Hub
JECP_TEST_BASE_URL=http://localhost:8080 npm run test:integration
# Against jecp.dev (production — coordinate first)
JECP_TEST_BASE_URL=https://jecp.dev npm run test:integration

See test/integration/README.md for what each test asserts and how HOME is sandboxed in spawned children.

License

Apache 2.0 — Tufe Company Inc.

About

Command-line interface for JECP — Joint Execution & Commerce Protocol. Register agents, invoke capabilities, manage Providers from your terminal.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages