Describe the Bug
cannot find output in nodejs
Steps to Reproduce
const child = spawn('cursor-agent', ['-p', '--api-key', 'xxx', '"hello"', '-m', 'claude-4-sonnet'], {
shell: true
});
let output = '';
child.stdout.on('data', (data) => {
const str = data.toString();
output += str;
console.log('stdout: ', str);
});
child.stderr.on('data', (data) => {
const str = data.toString();
output += str;
console.log('stderr: ', str);
});
child.on('close', (code) => {
console.log('close: ', code);
});
child.on('error', (err) => {
console.error('error:', err);
});
there no any console output in cmd.
if i remove apiKey
const child = spawn('cursor-agent', ['-p', '"hello"', '-m', 'claude-4-sonnet'], {
shell: true
});
I will get the output
+i":;;
[?+<l,",::;;;I
{[]_~iI"":::;;;;II
)){↗↗↗↗↗↗↗↗↗↗↗↗↗↗↗↗↗↗↗↗↗ll … Cursor Agent
11{[#M##M##M#########*ppll
11}[]-+############oppqqIl Press any key to sign in...
1}[]_+<il;,####bpqqqqwIIII
[]?_~<illi_++qqwwwwww;IIII
]?-+~>i~{??--wwwwwww;;;III
-_+]>{{{}}[[[mmmmmm_<_:;;I
r\\|||(()))))mmmm)1)111{?_
t/\\\\\|||(|ZZZ||\\\/tf^
ttttt/tZZfff^>
^^^O>>
>>
Then i run this cmd in shell, it works
cursor-agent -p --api-key xxx -f "hello" -m claude-4-sonnet
i dont know how to use cursor cli in nodejs
Operating System
MacOS
Current Cursor Version (Menu → About Cursor → Copy)
Mac: Apple M1 Pro
cursor-agent -v
2025.08.09-d8191f3
node -v
v20.18.1
Does this stop you from using Cursor
Yes - Cursor is unusable