📡 A command-line tool for inspecting Stellar transactions and operations.
A modern, user-friendly CLI that fetches transaction details from the Horizon API and displays them in beautiful, colored terminal output.
- ✅ Fetch transactions by hash from Horizon API
- ✅ Account inspection (balances, trustlines, transactions, signers)
- ✅ Watch mode (stream new transactions live)
- ✅ Batch inspection (multiple transaction hashes at once)
- ✅ Output to file (JSON/CSV)
- ✅ Config file support (.stellarrc)
- ✅ Support for mainnet and testnet
- ✅ Beautiful colored terminal output
- ✅ Decoded operation details (payment, create_account, etc.)
- ✅ Raw JSON output mode
- ✅ Human-readable error messages
# Install dependencies
npm install
# Build the project
npm run build
# Link globally (optional)
npm link
# Use the CLI
stellar-cli inspect <hash-or-xdr>
# Or run directly
npm run dev -- inspect <hash-or-xdr># Inspect a transaction on mainnet (default)
stellar-cli inspect <transaction-hash>
# Inspect a transaction on testnet
stellar-cli inspect <transaction-hash> --network testnet
# Show raw JSON output
stellar-cli inspect <transaction-hash> --raw
# Short flags
stellar-cli inspect <transaction-hash> -n testnet -r
# Show help
stellar-cli --help
# Show version
stellar-cli --version# View a specific transaction
stellar-cli inspect abc123def456... --network mainnet
# Output:
# 📡 Stellar Transaction Inspector
# ─────────────────────────────────────────────────
#
# ┌──────────────┬─────────────────────────────────┐
# │ Field │ Value │
# ├──────────────┼─────────────────────────────────┤
# │ Hash │ abc123...456def │
# │ Source │ GABC...XYZ │
# │ Fee │ 0.0000100 XLM │
# │ Memo │ None │
# │ Status │ ✓ Success │
# │ Created │ Jan 1, 2024, 12:00:00 AM EST │
# └──────────────┴─────────────────────────────────┘# Run in development mode (with ts-node)
npm run dev -- inspect <hash>
# Build TypeScript to JavaScript
npm run build
# Run tests
npm test
# Run tests with coverage
npm test -- --coverage
# Format code with Prettier
npm run format
# Check code formatting
npm run format:check
# Lint code with ESLint
npm run lint
# Fix linting errors
npm run lint:fixstellar-cli/
├── src/
│ ├── types/ # TypeScript interfaces
│ │ ├── index.ts
│ │ ├── account.ts
│ │ ├── assets.ts
│ │ ├── effects.ts
│ │ ├── fee.ts
│ │ ├── network.ts
│ │ ├── offers.ts
│ │ └── search.ts
│ ├── utils/ # Utility functions
│ │ └── errors.ts
│ ├── core/ # Core business logic
│ │ ├── account.ts
│ │ ├── assets.ts
│ │ ├── config.ts
│ │ ├── decoder.ts
│ │ ├── effects.ts
│ │ ├── fees.ts
│ │ ├── formatter.ts
│ │ ├── horizon.ts
│ │ ├── network.ts
│ │ ├── offers.ts
│ │ ├── search.ts
│ │ └── xdr.ts
│ ├── commands/ # CLI commands
│ │ ├── account.ts
│ │ ├── assets.ts
│ │ ├── assetsheld.ts
│ │ ├── balances.ts
│ │ ├── claimablebalances.ts
│ │ ├── data.ts
│ │ ├── effects.ts
│ │ ├── export.ts
│ │ ├── fees.ts
│ │ ├── inspect.ts
│ │ ├── ledger.ts
│ │ ├── network.ts
│ │ ├── offers.ts
│ │ ├── operations.ts
│ │ ├── orderbook.ts
│ │ ├── pathfind.ts
│ │ ├── payments.ts
│ │ ├── search.ts
│ │ ├── serverinfo.ts
│ │ ├── signers.ts
│ │ ├── stream.ts
│ │ ├── trades.ts
│ │ ├── transactions.ts
│ │ ├── trustlines.ts
│ │ ├── validate.ts
│ │ └── watch.ts
│ └── index.ts # CLI entry point
├── tests/ # Test files
│ └── sample.test.ts
├── dist/ # Compiled JavaScript
├── .eslintrc.json # ESLint config
├── .prettierrc # Prettier config
├── .commitlintrc.json # Commitlint config
├── tsconfig.json # TypeScript config
├── jest.config.js # Jest config
└── package.json
We welcome contributions! See CONTRIBUTING.md for guidelines.
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature - Make your changes
- Run tests:
npm test - Build the project:
npm run build - Commit your changes:
git commit -m 'Add amazing feature' - Push to the branch:
git push origin feature/amazing-feature - Open a Pull Request
MIT License - see LICENSE for details.
Built with:
- Commander.js - CLI framework
- Chalk - Terminal styling
- cli-table3 - ASCII tables
- Ora - Spinners
- Axios - HTTP client