Commands should support a --paste option to send output to a pastebin service

When debugging, users often paste the output of their Juju client commands to https://paste.ubuntu.com. This can be an annoying 30 seconds or so, particularly when one is already annoyed because something has broken.

Perhaps we could just get Juju to do it?

1 Like

Not a bad idea, but the page says:

Please do not set up programs to send data to this site in an automated fashion;

Maybe that doesn’t count, but it is Canonical’s pastebin anyway, so you’re probably fine. :smirk:

There’s an ubuntu package called “pastebinit”

I tested it out with juju status and the like and you just pipe to it and it works out.

 juju status | pastebinit

and it spits out a link for you Ubuntu Pastebin

It’s actually kind of cool so I created a zsh pipe alias for it

alias -g P='|pastebinit'

Now I can do

juju status P
https://paste.ubuntu.com/p/C4J9S8czdD/

And I get the link right back.

I think that folks might want to use other pastebins and such and I’d rather make that the job of a plugin or other tool vs building into Juju personally, but I think highlighting that these tools are out there and making it part of things like bug filing notes/instructions is a really worthwhile endeavor.

2 Likes