I’m happy to announce the initial release of klipper-repl, a command line frontend for Klipper that uses the same socket API as Fluidd and Mainsail to provide an efficient G-Code REPL interface.
Thank you for your work on this! This looks really useful. It will be a while before I have a chance to test it but I can already think of several ways it would help me.
Thank you! Definitely let me know if you run into any install problems when you give it a try – my Klipper host uses NixOS, so the pip instructions in the readme haven’t been tested yet.
I am using CB1. I am not able to install klipper-repl.
Method 1:|
biqu@BTT-CB1:~$ cd klipper-repl/
biqu@BTT-CB1:~/klipper-repl$ pip install klipper-repl
ERROR: Could not find a version that satisfies the requirement klipper-repl
ERROR: No matching distribution found for klipper-repl
Method2:
biqu@BTT-CB1:~/klipper-repl$ pip install .
Processing /home/biqu/klipper-repl
Installing build dependencies … done
Getting requirements to build wheel … done
Preparing wheel metadata … done
Collecting prompt-toolkit<4.0.0,>=3.0.38
Using cached prompt_toolkit-3.0.38-py3-none-any.whl (385 kB)
Collecting pygments<3.0.0,>=2.15.1
Using cached Pygments-2.15.1-py3-none-any.whl (1.1 MB)
ERROR: Package ‘klipper-repl’ requires a different Python: 3.9.2 not in ‘<4.0,>=3.10’
FYI: I am accessing CB1 using sudo minicom -D /dev/ttyUSB0 -b 115200
I’m not familiar with the CB1, but method 2 is failing because the CB1’s version of python is slightly older than what klipper-repl supports. Whichever package manager the CB1’s OS uses may have a newer version available.
First I tried this command as mentioned in Readme.
biqu@BTT-CB1:~nix run github:unjordy/klipper-replpl
error: experimental Nix feature ‘nix-command’ is disabled; use ‘–extra-experimental-features nix-command’ to override
It didnt wqork, so i tried:
biqu@BTT-CB1:~$ nix run --extra-experimental-features ‘flakes nix-command’ github:unjordy/klipper-repl – /tmp/klippy_uds
/nix/store/844w1zapdic2pfq489dp9lz60s4q51j7-bash-5.2-p15/bin/bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
biqu@BTT-CB1:~/klipper-repl/result/bin$ ./klipper-repl ~/printer_data/comms/klippy.sock
/nix/store/844w1zapdic2pfq489dp9lz60s4q51j7-bash-5.2-p15/bin/bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
10:04:06 AM ## Connected to Klipper at BTT-CB1:/home/biqu/printer_data/comms/klippy.sock
^C or ^D to quit; type M112 for emergency stop
BTT-CB1:/home/biqu/printer_data/comms/klippy.sock*