Hey everyone! I'm currently working with a frontend app in Nuxt and a backend using Node.js. I'm trying to figure out if there's a way to get Claude Code to actually view logs or see the console output from my frontend directly. Right now, I'm stuck manually copying and pasting log messages into Claude's REPL, but I often need to run the dev servers to check them. Is there a way to manage all of this with CC? Thanks!
5 Answers
If you set up your SSH login, Claude can execute commands on your server via SSH. I've been doing this in my staging environment, and it's pretty reliable. Even if you experiment a bit and mess up, it usually doesn't cause major issues.
I’ve done the same, and it’s been effective. I can run commands remotely with something like `ssh username@ip 'cd folder && claude --print "prompt"'` to interact with the environment. It sounds efficient!
In my Next.js project, it usually runs the development server automatically and captures all logs. I’ve set up Puppeteer to do that, but I'm not relying on it too much.
SSHFS can be a solution to consider.
You could try telling Claude to use Puppeteer to launch your frontend site. It can monitor console logs and catch errors for you. It can also start and stop your backend as necessary, but usually, it keeps them running until you tell it to shut them down.
You might want to log messages to a file instead and have Claude reference that file. It might not be perfect, but it could help you avoid the manual copying.
Could you elaborate on how you're doing that? What's your setup like?