There's an (experimental) Cody CLI: https://github.com/sourcegraph/cody/tree/main/cli. If you try it and like it, let us know over on that repo! (Or if by headless you just mean "editor extension only", just install the Cody VS Code extension and sign into Sourcegraph.com, and it'll work without the desktop app. The response quality will be slightly lower than if you have the desktop app, but we're working on that and it should be at parity soon.)