Yes, LLMs have had API access to terminals for quite a while now. I've been using Windsurf and Claude Code to type terminal commands for me for a long while (and `gh copilot suggest` before that) and couldn't be happier. I still manually review most of them before approving, but I've seen that the chances of the AI getting an advanced incantation right on the first try are much higher than mine, and I haven't yet once had it make a disastrous one, while that's happened to me quite a few times with commands I typed on my own.
>and I haven't yet once had it make a disastrous one
I've had it make some pretty bad ones. Not directly hooked in to my terminal, just copy and paste. A couple of git doozies that lost my work, but I've done those too. Others more subtle, one of note is a ZFS ZPOOL creation script it gave me used classic linux style /dev/sda style drive identifiers instead of proper /dev/by-id paths which led to the disks being marked as failed every time I rebooted. Sure, that's on me for not verifying, but I was a little out of my depth with ZFS on Linux and thought that ZFS' own internal uuid scheme was handling it.
Oh, I just copy paste back and forth.
Often I just paste an error with some scroll back but no instructions and it works out what I need.