askill
controller-cli

controller-cliSafety 85Repository

Execute Starknet transactions using Cartridge Controller sessions with human-authorized policies. Use when the user wants to execute Starknet smart contract transactions, transfer tokens on Starknet, interact with gaming contracts, query contract state, look up Cartridge usernames/addresses, or manage session-based authentication.

1 stars
1.2k downloads
Updated 2/26/2026

Package Files

Loading files...
SKILL.md

Controller CLI

Manage Cartridge Controller sessions and execute Starknet transactions through a secure human-in-the-loop workflow.

Prerequisites

Controller CLI must be installed:

curl -fsSL https://raw.githubusercontent.com/cartridge-gg/controller-cli/main/install.sh | bash

Session Workflow

Sessions use keypair-based auth where humans authorize specific contracts/methods via browser, then the agent executes transactions within those constraints.

  1. Check statuscontroller status --json
  2. Generate keypair (if needed) — controller generate --json
  3. Create policy file — Define allowed contracts and methods
  4. Register sessioncontroller register --file policy.json --json (user must authorize via browser URL)
  5. Execute transactionscontroller execute <contract> <entrypoint> <calldata> --json

Commands

Status & Setup

controller status --json          # Check session status and expiration
controller generate --json        # Generate new session keypair
controller clear --yes            # Clear all session data

Register Session

controller register --file policy.json --json

Outputs an authorization URL. Display it to the user and wait — the command polls for up to 6 minutes until the user authorizes in their browser.

Execute Transaction

Single call (positional args):

controller execute <contract> <entrypoint> <calldata> [--wait] [--timeout <secs>] --json

Multiple calls from file:

controller execute --file calls.json [--wait] --json

Read-Only Call (no session required)

controller call <contract> <entrypoint> <calldata> --chain-id SN_SEPOLIA --json
controller call --file calls.json --chain-id SN_SEPOLIA --json

Transaction Status

controller transaction <hash> --chain-id SN_SEPOLIA [--wait] --json

Username/Address Lookup

controller lookup --usernames shinobi,sensei --json
controller lookup --addresses 0x123...,0x456... --json

Calldata Format

  • Values are comma-separated, hex with 0x prefix by default
  • Decimal values: use u256:100 prefix for automatic u256 encoding
  • String values: use str:hello prefix for automatic felt encoding
  • U256 manual encoding: split into low,high — e.g., 100 tokens = 0x64,0x0

Policy File Format

See references/policy-examples.md for complete examples.

{
  "contracts": {
    "<contract_address>": {
      "name": "Contract Name",
      "methods": [
        { "name": "transfer", "entrypoint": "transfer", "description": "Transfer tokens" }
      ]
    }
  }
}

Multi-Call File Format

{
  "calls": [
    {
      "contractAddress": "<contract_address>",
      "entrypoint": "transfer",
      "calldata": ["0xRECIPIENT", "0x64", "0x0"]
    }
  ]
}

Common Contracts (Sepolia)

TokenAddress
ETH0x049d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7
STRK0x04718f5a0fc34cc1af16a1cdee98ffb20c31f5cd61d6ab07201858f4287c938d

Error Handling

ErrorCauseFix
NoSessionNo keypair foundRun controller generate
SessionExpiredSession expiredRun controller register --file policy.json
ManualExecutionRequiredNo authorized sessionRegister session with appropriate policies
PolicyViolationTransaction not in allowed policiesRegister new session with expanded policies

Important Notes

  • Always use --json flag for machine-readable output
  • Sessions expire — always check status before transactions
  • Human authorization is required for all sessions (cannot be bypassed)
  • Sepolia transactions are automatically subsidized (no gas needed)
  • Contract addresses must be 32-byte hex with 0x prefix

Install

Download ZIP
Requires askill CLI v1.0+

AI Quality Score

87/100Analyzed 2/19/2026

High-quality technical reference for Cartridge Controller CLI. Provides comprehensive command documentation, workflow examples, file formats, and error handling for executing Starknet transactions. Well-structured with clear sections, code examples, and tables. Includes 'when to use' guidance in description. Tags present but missing icon. Slight penalty for not being in dedicated skills folder but otherwise excellent.

85
92
75
90
90

Metadata

Licenseunknown
Version-
Updated2/26/2026
Publishercartridge-gg

Tags

github-actionssecurity