Local-first linting
The project validates a file before it is deployed, instead of waiting for a live domain to fail in production.
Offline SEP-1 validation
stellar-toml-lint reads your local stellar.toml or a live domain and
reports rule violations with file/line references, severity levels, and spec links.
$ npx stellar-toml-lint public/.well-known/stellar.toml
public/.well-known/stellar.toml
12:1 error NETWORK_PASSPHRASE has stray whitespace
31:1 error CURRENCIES[0].issuer is not a valid Stellar account ID
34:1 error issuance policies are mutually exclusive
19:1 warning DOCUMENTATION.ORG_PHONE_NUMBER is not in E.164 format
4 problems (3 errors, 1 warning, 0 infos)
In-browser validation
Linting runs locally in your browser. Share the URL to send someone the current TOML.
Changes are linted as you type.
Why this exists
The project validates a file before it is deployed, instead of waiting for a live domain to fail in production.
It validates checksum correctness, URL formats, field constraints, network passphrases, policy combinations, and more.
It supports text, JSON, SARIF, and GitHub workflow annotations so the output works in pull requests and security tooling.
| Capability | stellar-toml-lint | @stellar/anchor-tests |
|---|---|---|
| Lints a local file | ✅ | ❌ |
| Needs a deployed domain | ❌ | ✅ |
| Line and column diagnostics | ✅ | ❌ |
| Validates key checksums | ✅ | Partial |
| Live SEP-6/10/24/31 flow checks | ❌ | ✅ |
What it checks
Files under the size limit, TOML parsing, line/column diagnostics, UTF-8 BOM detection.
Version fields, network passphrases, URL constraints, checksum validation, deprecated and unknown fields.
Required organization metadata, URL/domain consistency, email, phone, and social handle validation.
Name/email validation and hash plausibility for principal profile photos.
Asset code rules, issuance policies, anchored asset metadata, collateral validation, duplicate asset checks.
Alias format, unique keys and hosts, port checks, and history URL validation.
With --domain, it verifies reachability, CORS headers, content type,
file size, and the negotiated TLS session — deprecated protocol versions and weak
cipher suites included.
Usage
# Lint a local file
stellar-toml-lint public/.well-known/stellar.toml
# Fetch and lint a live site
stellar-toml-lint --domain example.com
# Read from stdin
cat stellar.toml | stellar-toml-lint -
-d, --domain <d> — serve from a domain for CORS, TLS, and
same-domain checks
-f, --format <fmt> — text, json, ndjson, sarif, github, junit,
checkstyle
--strict — treat warnings like errors--show-help-urls — include spec links for each finding--list-rules — show every built-in ruleProgrammatic API
import { lint, lintDomain, formatText } from 'stellar-toml-lint';
import { readFile } from 'node:fs/promises';
const result = lint(await readFile('stellar.toml', 'utf8'), {
domain: 'example.com',
strict: true,
rules: { 'general/unknown-field': 'off' },
});
if (!result.ok) {
console.error(formatText(result, { color: true }));
process.exit(1);
}
const live = await lintDomain('example.com');
CI and automation
- uses: anchor-tools/stellar-toml-lint@v1
with:
file: public/.well-known/stellar.toml
strict: true
repos:
- repo: local
hooks:
- id: stellar-toml-lint
entry: npx stellar-toml-lint
language: system
Error — violates SEP-1 or breaks client compatibility.
Warning — valid but incomplete or likely wrong.
Info — worth reviewing, often unknown field names.