TCCLI is Tencent Cloud's answer to AWS CLI - a command-line tool that lets you manage cloud resources without clicking through web interfaces. If you've ever tried to automate Tencent Cloud deployments or just hate switching between browser tabs, this might save your sanity.
I've been using TCCLI for about 8 months managing our staging environment, and here's the real deal: it works fine for simple stuff, gets annoying for complex deployments, but beats the hell out of clicking through the web console for repetitive tasks.
Installation Reality Check
First thing - ignore the docs saying "Python 2.7 or later." Python 2.7 died in 2020. The real problem? TCCLI maxes out at Python 3.6 - anything newer breaks with random import errors. Python 3.6 in 2025 is like running Windows XP, but that's what you're stuck with.
pip install tccli-intl-en
This works fine on Linux and macOS. On Windows? Good fucking luck. The installation breaks constantly because of PATH issues - took me three attempts on our Windows Server 2019 build box. And the autocompletion only works on Unix systems. Windows users get to type every command manually like cavemen.
What Actually Works
TCCLI basically wraps Tencent's APIs so you don't have to mess with raw HTTP calls. When it works, it works well:
- Quick server spin-ups:
tccli cvm RunInstances
beats clicking through 5 web pages - Bulk operations: Need 10 identical servers? One script instead of 10 browser sessions
- CI/CD integration: Works great with Jenkins, GitLab CI, whatever
- Resource monitoring: Fast way to check usage without logging into the console
The command structure is predictable: tccli [service] [action] [parameters]
. Once you get used to it, you can guess commands without looking at docs.
Then it gets annoying as hell
JSON parameter hell: This is where TCCLI becomes a pain in the ass. Complex configurations require JSON strings that are annoying as hell to type:
tccli cvm RunInstances --Placement '{"Zone":"ap-guangzhou-2"}' --SystemDisk '{"DiskType":"CLOUD_BASIC", "DiskSize":50}'
Get the quoting wrong and you'll get errors like InvalidParameterValue
with no explanation. Always wrap JSON in single quotes or the shell will eat your parameters.
Error messages are garbage: When something fails, TCCLI gives you cryptic API errors that tell you nothing useful. "Operation failed" - thanks, that's helpful. The --debug
flag helps sometimes, but you'll still be guessing half the time.
Region switching sucks: You can only work in one region per command. For multi-region deployments, you're writing scripts that loop through regions or managing multiple credential profiles. It's tedious.
Real Production Gotchas
Credential rotation nightmare: We learned this the hard way when our SecretKey expired at 3am and took down our deployment pipeline. TCCLI doesn't warn you about expiring credentials - it just starts failing randomly.
Rate limiting: Hit the APIs too hard and you'll get throttled with no warning. This bit us during a bulk server migration when we were spinning up 50+ instances. Had to add delays between commands.
Silent timeouts: Large operations just... stop. No error, no warning, just silence. We lost 2 hours debugging why a batch storage sync "succeeded" but only processed like 350 out of 600+ files. Had to count them manually because the fucking logs said everything was fine. Anything over 50 items in a batch? Guaranteed timeout. Keep batches small or just use the web console.
Multi-Account Management
The profile system works, but it's clunky:
tccli configure --profile staging
tccli configure --profile production
Switching between accounts means remembering profile names or checking tccli configure list
. Environment variables work better for automation:
TENCENTCLOUD_SECRET_ID
TENCENTCLOUD_SECRET_KEY
TENCENTCLOUD_REGION
Pro tip: Never store credentials in config files on production systems. Use IAM roles or inject them via environment variables.
Output Formats That Don't Suck
TCCLI gives you three output formats:
- JSON: For scripts and automation. Works well with jq for parsing
- Table: For humans. Actually readable, unlike the JSON blob
- Text: For quick shell hacks. Good for
grep
andawk
workflows
Use --output table
when you're debugging. Use --output json
when you're scripting. Use --output text
when you need specific values fast.
Automation Lessons Learned
TCCLI shines in CI/CD pipelines once you figure out the gotchas:
- Always quote your JSON parameters - the shell will fuck up your syntax
- Set explicit timeouts - some operations take forever
- Handle API rate limits - add retries with exponential backoff
- Check credentials before running - expired keys cause mysterious failures
- Use environment variables for credentials - never commit secrets to repos
When NOT to Use TCCLI
- One-off tasks: The web console is faster for simple stuff
- Complex networking: VPC configurations are easier to visualize in the GUI
- Large data operations: Storage transfers work better through the web interface
- Team collaboration: Other people can't easily see what you did via CLI
The Bottom Line
TCCLI is decent for automation and saves you from clicking through web interfaces. The JSON parameter syntax will make you hate your life until you get used to it, and error messages range from helpful to completely useless.
But once you figure out the quirks, it's way faster than the web console for repetitive tasks. Just don't expect it to be as polished as AWS CLI - it's functional but rough around the edges.
If you're managing Tencent Cloud infrastructure at scale, learn TCCLI. If you're just spinning up a server once a month, stick with the web console.