@namera-ai/cli
v0.1.4
Published
Agent-first smart account interface with session keys and scoped permissions, enabling fully local multichain automation.
Downloads
224
Maintainers
Readme
Namera CLI
Namera CLI gives agents controlled access to smart accounts with session keys and scoped permissions, running fully local and agent-first across chains.
Contents
Prerequisites
- Node.js 18+ for running the CLI via npm/pnpm/bun
Installation
Install globally with your package manager:
npm i -g @namera-ai/cli
#or
pnpm i -g @namera-ai/cli
#or
bun i -g @namera-ai/cli
#or
yarn global add @namera-ai/cliBuild from source:
gh repo clone thenamespace/namera
cd namera
pnpm install
cd apps/cli
pnpm run build
pnpm run start -- --help
# or link to global install
pnpm linkQuick Start
Create a keystore, smart account, and session key (interactive prompts):
namera keystore create --alias my-ownernamera smart-account create --alias my-smart --owner-alias my-ownernamera session-key create --alias my-session-key --smart-account my-smartStart the MCP server:
namera mcp start --smart-account my-smart --session-key my-session-key=my-password --transport http --port 8080Why Namera CLI?
For humans: clear prompts, consistent flags, and readable output.
For agents: every command has a JSON schema, supports deterministic --params, and returns structured output that is easy to parse.
# Schema discovery
namera schema session-key.create# Deterministic params mode
namera session-key create --params '{"alias":"my-session-key","smartAccountAlias":"my-smart","chains":["eth-mainnet"],"sessionKeyPassword":"session-password","ownerKeystorePassword":"owner-password","policyParams":[{"type":"sudo"}]}'Command Groups
keystore(k): Create, import, list, inspect, decrypt, and remove keystoressmart-account(sa): Create, import, list, inspect, status, and remove smart accountssession-key(sk): Create, list, inspect, status, and remove session keysschema: Print JSON schema for command parametersmcp: Start the local MCP server
Explore help:
namera --help
namera keystore --help
namera smart-account --help
namera session-key --help
namera mcp --helpParams Mode and Schema
Agents should use --params with the schema command to discover the exact input shape.
namera schema keystore.create
namera schema smart-account.create
namera schema session-key.create
namera schema mcp.startExample params mode calls:
namera keystore create --params '{"alias":"my-owner","password":"my-password"}'namera smart-account create --params '{"alias":"my-smart","ownerAlias":"my-owner","ownerPassword":"my-password","index":0}'namera session-key create --params '{"alias":"my-session-key","smartAccountAlias":"my-smart","chains":["eth-mainnet"],"sessionKeyPassword":"session-password","ownerKeystorePassword":"owner-password","policyParams":[{"type":"sudo"}]}'Output Formats
All commands support global output flags:
--output,-o:pretty(default),json, orndjson--quiet,-q: Suppress output entirely
namera smart-account list --output json
namera session-key list --output ndjsonSession Key Policies
Session keys are scoped by one or more policies:
sudo: Full permission, no restrictionscall: Restrict targets, functions, and value limitstimestamp: Limit validity by time rangegas: Limit total gas spend and optionally require a paymasterrate-limit: Limit number of requests per intervalsignature-caller: Restrict who can validate signatures
Example policy payload:
{ "type": "timestamp", "validAfter": 1719916800, "validUntil": 1722604800 }MCP Server
Start MCP over stdio (default):
namera mcp start --smart-account my-smart --session-key my-session-key=my-passwordStart MCP over HTTP:
namera mcp start --smart-account my-smart --session-key my-session-key=my-password --transport http --port 8080HTTP endpoint: http://localhost:8080/mcp
Tools exposed:
get_wallet_addressget_balanceread_contractnative_transferexecute_transaction
MCP Params Mode
namera mcp start --params '{"smartAccountAlias":"my-smart","transport":"http","port":8080,"sessionKeys":{"my-session-key":"my-password"}}'Supported Chains
See the supported chain keys and IDs on Namera Documentation.
Environment Variables
You can pass chain-specific environment variables when starting MCP:
# Ethereum Mainnet
export ETH_MAINNET_RPC_URL="https://mainnet.infura.io/v3/YOUR-PROJECT-ID"
export ETH_MAINNET_BUNDLER_URL="https://rpc.zerodev.app/api/v3/<api-token>/chain/1"
export ETH_MAINNET_PAYMASTER_URL="https://rpc.zerodev.app/api/v3/<api-token>/chain/1"
# Polygon Mainnet
export POLYGON_MAINNET_RPC_URL="https://polygon-rpc.com"
export POLYGON_MAINNET_BUNDLER_URL="https://rpc.zerodev.app/api/v3/<api-token>/chain/137"
export POLYGON_MAINNET_PAYMASTER_URL="https://rpc.zerodev.app/api/v3/<api-token>/chain/137"
# ... and moreBy default, MCP uses the public RPC and public Pimlico Bundler RPC: https://public.pimlico.io/v2/{chain_id}/rpc.
Examples
Create a keystore and smart account:
# Create a keystore
namera keystore create -a my-owner -p my-password# Create a smart account
namera smart-account create -a my-smart -oa my-owner -op my-password -i 0Create a session key (interactive policy selection):
namera session-key create -a my-session-key -sa my-smartCheck deployment status:
# Check smart account deployment status on Ethereum Mainnet
namera smart-account status --alias my-smart --chain eth-mainnet# Check session key installation status on Ethereum Mainnet
namera session-key status --alias my-session-key --chain eth-mainnetDocumentation
- CLI Docs: https://namera.ai/docs/cli
- CLI Docs Source: apps/docs/content/docs/cli
Security
Please report security issues via GitHub: https://github.com/thenamespace/namera/security
License
Apache 2.0. See LICENSE.
