Setup the claude-slack bot and to your slack workspace.
- nodejs
- google chrome - Slack running on web
npm install -g puppeteer
npm install -g html-to-text
- Start chrome with remote debugging port
chrome --remote-debugging-port=9999
-
Open https://workspace.slack.com/ and login
-
Run the script to start chatting, you can add aias in your .bashrc or .zshrc
node calude.js <Query>
You can any kind of editor to run command to get output back. here just use Emacs for demo
(defun query-gpt-chat()
"Run script command with current line content and insert output in buffer"
(interactive)
(let ((current-line (thing-at-point 'line t))
(output (shell-command-to-string (concat "claude" (thing-at-point 'line t)))))
(insert (mapconcat 'identity (nthcdr 4 (split-string output "\n")) "\n"))))
(global-set-key (kbd "C-;") 'query-gpt-chat)
which ngpt just a alias to command node claude.js