CLI
@theneuralledger/cli provides the tnl command: read intelligence from a terminal, run the MCP server, or run a foreground sync daemon.
npm install -g @theneuralledger/cli
export TNL_API_KEY=your_api_keyOr without installing:
npx @theneuralledger/cli latest --limit 5Environment
| Variable | Purpose |
|---|---|
TNL_API_KEY | API key. Required. |
TNL_BASE_URL | Override the API base URL. Rarely needed. |
TNL_STATE_DIR | Where serve keeps sync state. |
Reading
# Newest stories
tnl latest
tnl latest --limit 20
# Full text search
tnl search "tariff"
tnl search "central bank" --limit 50
# Stories touching an asset
tnl asset KRW
tnl asset BRENT --limit 10Every read command takes --json, which is what makes the CLI useful in pipelines:
# Headlines only
tnl latest --limit 50 --json | jq -r '.data[].title'
# Stories mentioning an impact path, as CSV
tnl search "oil" --limit 100 --json \
| jq -r '.data[] | select(.impactPaths | length > 0) | [.publishedAt, .title] | @csv'Without --json the output is formatted for reading and is not a stable interface — always use --json when scripting.
Account status
tnl status
tnl status --json | jq '.data.plan, .data.usage'Shows your plan, quota, and usage — the quickest way to check whether a failing integration has simply run out of quota.
MCP server
tnl mcpRuns the read-only MCP server over stdio, for AI clients that launch a subprocess. Configuration for specific clients is in MCP connecting.
Sync daemon
tnl serve --interval 300 --state-dir ./tnl-statePolls for new stories on an interval and keeps a local state directory so a restart resumes where it stopped rather than refetching everything.
tnl serve --host 127.0.0.1 --port 8787 --interval 300Options:
| Option | Meaning |
|---|---|
--interval <seconds> | Poll interval |
--state-dir <dir> | Where sync state is kept |
--host, --port | Bind address for the local HTTP surface |
--once | Run a single sync and exit — good for cron |
# Cron-style single run
tnl serve --once --state-dir /var/lib/tnlPrefer webhooks for freshness
serve polls. If you need stories within seconds and can expose an HTTPS endpoint, webhooks are faster and cheaper in quota. Use serve when you cannot accept inbound connections.
Docker
docker run --rm -e TNL_API_KEY=$TNL_API_KEY \
ghcr.io/bekirdag/tnl-intelligence tnl latest --limit 5Useful in CI, where installing Node globally is not worth it.