Controller Cli logo

Controller Cli

Organization
keep-starknet-strange
controller-cli

Guidance for installing and operating the Cartridge Controller CLI (`controller`) to create human-approved sessions and execute Starknet transactions with JSON output, explicit network selection, scoped policies, paymaster control, and error recovery.

Overview

Publisherkeep-starknet-strange
Repositorystarknet-agentic
Skill namecontroller-cli
Stars
81
Forks
26
Bundled files
3
LicenseApache-2.0
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 3 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by keep-starknet-strange on GitHub. Read the source before you install it.

Installation

Install the Controller Cli AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/keep-starknet-strange/starknet-agentic/tree/main/skills/controller-cli
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/keep-starknet-strange/starknet-agentic.git /tmp/starknet-agentic
mkdir -p .claude/skills
cp -r /tmp/starknet-agentic/skills/controller-cli .claude/skills/controller-cli
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Controller Cli in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Controller Cli on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Controller Cli is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Cartridge Controller CLI

Use this skill when you need to run the Cartridge Controller CLI (controller-cli) to create a scoped session (human-approved) and then execute Starknet transactions via that session.

When to Use

  • Operating Cartridge Controller sessions with explicit network and least-privilege policies.
  • Running controller or controller_safe.py for human-approved Starknet transactions.

When NOT to Use

  • General Starknet scripting that does not rely on Cartridge Controller.
  • Contract authoring, testing, deployment, or security audit workflows.

Related modules: skills catalog.

Non-Negotiable Rules

  • Always pass --json and treat outputs as JSON.
  • Always be explicit about network. Never rely on defaults:
    • --chain-id SN_MAIN|SN_SEPOLIA, or
    • --rpc-url <explicit url>.
  • controller register requires human browser authorization. Do not automate/bypass it.
  • Use least-privilege policies only. Do not add token transfer permissions unless explicitly requested.
  • Transaction links: use Voyager only:
    • Mainnet: https://voyager.online/tx/0x...
    • Sepolia: https://sepolia.voyager.online/tx/0x...

Quick Start

bash
curl -fsSL https://raw.githubusercontent.com/cartridge-gg/controller-cli/main/install.sh | bash
export PATH="$PATH:$HOME/.local/bin"
controller --version

Safer Wrapper (Recommended)

This skill includes a small wrapper that enforces the rules above and normalizes output:

bash
python3 scripts/controller_safe.py status
python3 scripts/controller_safe.py register --preset loot-survivor --chain-id SN_MAIN
python3 scripts/controller_safe.py execute 0xCONTRACT entrypoint 0xCALLDATA --rpc-url https://api.cartridge.gg/x/starknet/sepolia

Behavior:

  • Adds --json if missing.
  • Refuses to run call|execute|register|transaction without --chain-id or --rpc-url.
  • Parses stdout as JSON.
  • If .status == "error", prints error_code, message, recovery_hint and exits non-zero.

Deterministic Workflow

1) Generate Keypair

bash
controller generate --json

The private key is stored locally (typically ~/.config/controller-cli/).

2) Check Session Status

bash
controller status --json

Common states:

  • no_session (no keypair)
  • keypair_only (needs registration)
  • active (registered and not expired)

3) Register Session (Human Approval Required)

Requirement: a human must approve in a browser.

Option A (preferred): preset policies:

bash
controller register --preset loot-survivor --chain-id SN_MAIN --json

Option B: least-privilege policy file:

bash
controller register --file policy.json --rpc-url https://api.cartridge.gg/x/starknet/sepolia --json

Authorization output includes short_url and/or authorization_url:

  • Display short_url if present; otherwise display authorization_url.
  • Ask the user to open it and approve.
  • The CLI blocks until approved or timeout (typically ~6 minutes).

4) Execute Transaction

Single call (positional args: contract, entrypoint, calldata):

bash
controller execute 0xCONTRACT transfer 0xRECIPIENT,0xAMOUNT_LOW,0xAMOUNT_HIGH \
  --rpc-url https://api.cartridge.gg/x/starknet/sepolia \
  --json

Multiple calls from file:

bash
controller execute --file calls.json --rpc-url https://api.cartridge.gg/x/starknet/sepolia --json

Optional confirmation wait:

bash
controller execute --file calls.json --rpc-url https://api.cartridge.gg/x/starknet/sepolia --wait --timeout 300 --json

5) Read-Only Call (No Session Needed)

bash
controller call 0xCONTRACT balance_of 0xADDRESS --chain-id SN_SEPOLIA --json

6) Transaction Status

bash
controller transaction 0xTX_HASH --chain-id SN_SEPOLIA --wait --timeout 300 --json

7) Lookup Usernames / Addresses

bash
controller lookup --usernames alice,bob --json
controller lookup --addresses 0x123...,0x456... --json

Network Selection

Always be explicit about network.

Supported networks:

Chain IDRPC URL
SN_MAINhttps://api.cartridge.gg/x/starknet/mainnet
SN_SEPOLIAhttps://api.cartridge.gg/x/starknet/sepolia

Priority order:

  1. --rpc-url flag
  2. Stored session RPC URL (from registration)
  3. Config default (lowest)

If network is ambiguous:

  1. Run controller status --json
  2. Match the session chain_id, or ask the user

Paymaster Control

Default behavior uses the paymaster (free execution). If the paymaster is unavailable, the transaction fails (no silent fallback).

To self-pay with user funds:

bash
controller execute ... --no-paymaster --json

Amount Encoding (u256)

Many ERC20-style amounts are u256 split into (low, high) u128 limbs.

For values that fit in u128 (most cases): set high = 0x0.

Example calldata: 0xRECIPIENT,0x64,0x0

Error Handling

Errors are JSON:

json
{
  "status": "error",
  "error_code": "ErrorType",
  "message": "...",
  "recovery_hint": "..."
}

Always branch on error_code and follow recovery_hint.

Common recoveries:

  • NoSession: run controller generate --json
  • SessionExpired: re-run controller register ... --json
  • ManualExecutionRequired: policy does not authorize the call; tighten/adjust policy and re-register
  • CallbackTimeout: user did not approve quickly enough; re-run register and retry

Input Validation

Addresses must be 0x-prefixed hex.

bash
python3 scripts/validate_hex_address.py 0xabc...

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Controller Cli AI skill do?

Guidance for installing and operating the Cartridge Controller CLI (`controller`) to create human-approved sessions and execute Starknet transactions with JSON output, explicit network selection, scoped policies, paymaster control, and error recovery.

Why use Controller Cli on TypingMind?

Because you install it once and use it with any model. Controller Cli is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Controller Cli in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/keep-starknet-strange/starknet-agentic/tree/main/skills/controller-cli. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Controller Cli?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Controller Cli?

As many as you like. As long as a model supports skills, you can use Controller Cli with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Controller Cli AI skill free?

Yes. It is published on GitHub by keep-starknet-strange under the Apache-2.0 license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇