torn-cli
Hey everyone,
I made a small tool called torn-cli. It is a fast, privacy-first command-line tool for the Torn API v2 and FFScouter.
I originally built this for myself, mainly so my AI coding agents could safely query Torn data, use structured JSON output, and avoid leaking API keys in logs or URLs.
What it does
- Works with Torn API v2 endpoints
- Includes shortcuts for common user, faction, market, company, and log queries
- Includes FFScouter commands for stats, targets, activity, hit calling, losses, and more, including PREMIUM features.
- Outputs JSON, pretty text, tables, CSV, or raw API responses
- Has watch mode for repeating checks, like hospital timers
- Redacts API keys from logs, cache keys, URLs, and output where possible
- Useful for scripts, terminals, and AI agents that need clean machine-readable output
Install
Requires Rust/Cargo.
cargo install --git https://github.com/manuelcecchetto/torn-cli --locked
Basic setup
torn config set torn-api-key
torn config set ffscouter-api-key
torn config check
Examples
torn api user basic --pretty
torn api user basic --id PLAYER_ID --json
torn api faction members --id FACTION_ID --table
torn ff stats --target PLAYER_ID --pretty
torn ff targets --preset respect --limit 10 --json
Watch mode example
Subject to Torn API rate limits of course. This command lets you watch the status of a player.
torn --watch 2s --pretty api user basic --id PLAYER_ID
AI Agents .skill
A skill on the repo explains perfectly to your ai agent how to install and use the cli.
Just prompt your Codex/Claude Code/whatever you nerds are using
Help me set up https://github.com/manuelcecchetto/torn-cli
Why I made it
Mostly personal convenience. I wanted a safer way for local scripts and AI agents to access Torn/FFScouter data without pasting keys everywhere, scraping pages, or manually formatting API responses.
It is not a bot and does not play the game for you. It just calls API endpoints you request and formats the result.
AI agents are pretty good at concatenating requests and outputs to create you every report you need.
Links
GitHub: HERE
Feedback, bug reports, and feature requests are welcome.