ton-dev Command Reference
Complete reference for every command in the @tesserae/ton-dev-skills CLI.
Installation
npm i -g @tesserae/ton-dev-skills # Verify installation ton-dev --version ton-dev --help
ton-dev audit <path>
Run a security audit on FunC or Tact source files. Scans against 50+ TVM-native rules across 21 categories.
Free
# Audit a directory ton-dev audit ./contracts/ # Audit a single file ton-dev audit ./contracts/jetton-wallet.fc # Output as JSON ton-dev audit ./contracts/ --format json # Output as SARIF (for GitHub Code Scanning) ton-dev audit ./contracts/ --format sarif # Output as Markdown ton-dev audit ./contracts/ --format markdown # Set minimum severity threshold ton-dev audit ./contracts/ --severity high
Options:
- —
--format <terminal|json|sarif|markdown>— Output format (default: terminal) - —
--severity <critical|high|medium|low|info>— Minimum severity to report - —
--output <file>— Write results to file - —
--no-color— Disable colored output
Example output:
┌─────────────────────────────────────────────────────┐ │ TON Dev Skills — Security Audit │ │ Files scanned: 3 │ Rules applied: 54 │ ├─────────────────────────────────────────────────────┤ │ ❌ CRITICAL missing-owner-check line 42 │ │ ⚠️ HIGH unbounded-loop line 87 │ │ ⚠️ MEDIUM unchecked-bounced-msg line 23 │ │ ℹ️ INFO magic-number line 15 │ ├─────────────────────────────────────────────────────┤ │ Summary: 1 critical · 1 high · 1 medium · 1 info │ │ Verdict: FAIL │ └─────────────────────────────────────────────────────┘
ton-dev compile <file>
Compile a FunC or Tact contract to BOC (Bag of Cells).
Free
# Compile a FunC contract ton-dev compile ./contracts/jetton-minter.fc # Compile a Tact contract ton-dev compile ./contracts/nft.tact # Specify output path ton-dev compile ./contracts/jetton-minter.fc --output ./build/jetton.boc
Options:
- —
--output <file>— Output BOC file path - —
--verbose— Show compilation details
ton-dev scaffold <template>
Generate a project from a built-in template with contracts, tests, and deployment scripts.
Free
# Available templates ton-dev scaffold jetton # Jetton (fungible token) ton-dev scaffold nft-collection # NFT collection + item ton-dev scaffold sbt # Soulbound token ton-dev scaffold dao # DAO governance ton-dev scaffold multisig # Multi-signature wallet ton-dev scaffold dex-pool # DEX liquidity pool # Scaffold into a specific directory ton-dev scaffold jetton --output ./my-jetton
Options:
- —
--output <dir>— Target directory (default:./<template>) - —
--lang <func|tact>— Contract language (default: tact)
Templates include:
- 📁Contract source files
- 📁Unit tests
- 📁Deployment scripts
- 📁
package.jsonwith dependencies
ton-dev init
Initialize a TON Dev Skills project in the current directory. Creates config files and directory structure.
Free
# Initialize in current directory ton-dev init # Creates: # ton-dev.config.json # contracts/ # tests/ # scripts/
ton-dev deploy <boc>
Deploy a compiled BOC to TON testnet or mainnet.
Free
# Deploy to testnet (default)
ton-dev deploy ./build/jetton.boc
# Deploy to mainnet
ton-dev deploy ./build/jetton.boc --network mainnet
# Deploy with initial data
ton-dev deploy ./build/jetton.boc --data '{"owner":"EQ..."}'Options:
- —
--network <testnet|mainnet>— Target network (default: testnet) - —
--data <json>— Initial contract data - —
--wallet <address>— Deployer wallet address
ton-dev debug <exit-code>
Explain a TVM exit code in plain English with suggested fixes.
Free
# Explain an exit code ton-dev debug 11 # Output: # Exit code 11: Cell underflow # The contract tried to read more data from a cell slice # than was available. # # Common causes: # - Incorrect message parsing # - Missing fields in incoming message # - Wrong cell layout assumption
ton-dev debug tx <hash>
Trace a transaction and explain what happened step by step.
Free
# Trace a transaction ton-dev debug tx a1b2c3d4... # Options ton-dev debug tx a1b2c3d4... --network mainnet
Options:
- —
--network <testnet|mainnet>— Network to query (default: testnet) - —
--verbose— Show full TVM execution trace
ton-dev gas estimate <boc>
Estimate gas consumption for a compiled contract.
Free
# Estimate gas ton-dev gas estimate ./build/jetton.boc # Output: # Gas estimate for jetton.boc # ├── Deployment: ~0.05 TON # ├── Transfer: ~0.03 TON # └── Mint: ~0.04 TON
ton-dev migrate
Migrate Solidity contracts to TON equivalents. Supports ERC-20, ERC-721, ERC-1155, ERC-4626, Governor, and Multisig patterns.
Pro
# Migrate a Solidity contract ton-dev migrate ./contracts/MyToken.sol # Specify target language ton-dev migrate ./contracts/MyToken.sol --lang tact # Migrate entire directory ton-dev migrate ./contracts/ --output ./ton-contracts/
Options:
- —
--lang <func|tact>— Target language (default: tact) - —
--output <dir>— Output directory - —
--report— Generate migration report
See the Migration Guide for details.
ton-dev test-gen <file>
Generate unit tests for a FunC or Tact contract.
Pro
# Generate tests ton-dev test-gen ./contracts/jetton-wallet.fc # Specify test framework ton-dev test-gen ./contracts/nft.tact --framework jest # Output to file ton-dev test-gen ./contracts/jetton-wallet.fc --output ./tests/
Options:
- —
--framework <jest|mocha>— Test framework (default: jest) - —
--output <dir>— Output directory - —
--coverage— Target full branch coverage
ton-dev mcp start
Start the MCP (Model Context Protocol) server for AI-assisted development.
Pro
# Start with stdio transport (default) ton-dev mcp start # Start with SSE transport on a port ton-dev mcp start --transport sse --port 3100 # Start with a specific API key TON_DEV_API_KEY=tds_... ton-dev mcp start
Options:
- —
--transport <stdio|sse>— Transport mode (default: stdio) - —
--port <number>— Port for SSE transport (default: 3100)
See the MCP Integration Guide for IDE setup instructions.
Environment Variables
- —
TON_DEV_API_KEY— API key for Pro features - —
TON_DEV_NETWORK— Default network (testnetormainnet) - —
NO_COLOR— Disable colored output
