commandline

1708 readers
1 users here now

founded 1 year ago
MODERATORS
1
 
 

Also available here. (Docker image)

2
 
 

stmps is a fork of stmp, under active development and with several additional features. (*) items are PRs which also been accepted by the stmp project.

  • mpris support (*)
  • improved help text
  • improved playlist handling, including concurrent loading in the background
  • improved browser behavior, e.g. add all songs by an artist
  • global, server-side search
  • artist search in the browser (*)
  • TUI-less server information query
  • queue reordering
  • queue shuffling
  • randomly add songs to the queue
  • randomly add similar songs to the queue, using the Subsonic "get similar songs" feature

It's fast, keyboard driven, and a single executable; it is regularly tested against Navidrome and Gonic.

stmps can be installed by a simple go install command, and it's also in AUR as stmps.

I'm not the author, but am one of the active contributors.

3
4
5
6
7
8
9
16
submitted 2 months ago by mac to c/commandline
10
11
12
13
 
 

Rook provides a secret service a-la secret-tool, keyring, or pass/gopass, except backed by a Keepass v2 kdbx file.

The problem Rook solves is mainly in script automation, where you have aerc, offlineimap, isync, vdirsyncer, msmtp, restic, or any other cron jobs that need passwords and which are often configured to fetch these passwords from a secret service with a CLI tool. Unlike existing solutions, Rook is headless, and does not have a bespoke secrets database full of passwords that must be manually synchronized with Keepass; instead, it uses a Keepass db directly.

Rook is in the AUR; binaries are available from the project page.

From the changelog, since the last Lemmy release announcement (v0.0.9):

[v0.1.3] Mon May 20 17:12:25 2024 -0500

Added

  • status command, a more lightweight way of testing if a DB is open. Using this instead of info in e.g. statusbar scripts greatly reduces CPU load.
  • case-insensitive search.

Changed

  • removing some nil panics that could occur when DB is closed while a client call is being processed.

Fixed

  • a hidden bug in the OTP pin code.
  • some errors being ignored (and therefore not logged)
  • TOTP attributes getting missed by otp generator check

[v0.1.2] Fri Apr 26 15:13:55 2024 -0500

Added

  • one-time pin soft locking
  • installation instructions for distributions that have rook in a repository
  • more of the special autotype {} commands are supported (backspace, space, esc)

Changed

  • getAttr adds a little delay before typing, allowing initiator tools (like rofi) to close windows before text is output
  • cleans up code per golint/gochk

Fixed

  • an autotype bug in outputting literals

[v0.1.1] Sun Mar 17 13:44:54 2024 -0500

Added

  • the original source rook.svg
  • ability to start the rook server passing in the password via stdin pipe.

Changed

  • assets moved to directory
  • documentation referenced Keepass v4; there's no such thing, it's v2.
  • license, was missing (c) from original
  • stop trying to remove the version number from build assets
  • documentation to clarify when the master password exists as plain text, in response to questions from @[email protected]

[v0.1.0] Fri Mar 15 14:03:25 2024 -0500

Added

  • nfpm file
  • logo

Changed

  • clears out the password so it's not being held in plain text by the flags library.
  • some of the documentation, and fixes the duplicated v0.0.9 entry in the changelog.
  • CI build targets are more limited, but also include some distro packages
  • better README documentation

Removed

  • the monitor attribute was taken out, as rook no longer busy-polls the DB
14
5
submitted 4 months ago* (last edited 1 month ago) by [email protected] to c/commandline
 
 

cross-posted from: https://programming.dev/post/15162087

so, about a month ago i stumbled upon the duckduckgo ai chat feature and wrote an article about how private their APIs are, and a few weeks after, a CLI client.

the thing is in a pretty mature stage now (its not like there is a lot of work to be done there tbh)

its not super private, but it is "private enough". the only thing duckduckgo has is your IP, which is usually not much unless you are on a residential connection with a dedicated IP

15
22
submitted 4 months ago* (last edited 4 months ago) by [email protected] to c/commandline
 
 
16
17
 
 

I use this tool instead of dig and kdig.

18
 
 

A blog post shows an example usage of hyperfine CLI tool to measure and plot time of startup and shutdown of several code interpreters.

19
 
 

https://gitlab.com/christosangel/tui-battleship

This is a tui implementation of the popular classic naval battle game, written in Bash.

The objective of the game is to destroy the computer's fleet, before the computer achieves the same against you.

You take turns with the computer, hitting squares in each other's grids.

You have to guess the position of the enemy ships on the computer's 10x10 grid, in order to win.

win

You lose if the computer achieves sinking your ships first.

lose

20
 
 

I just noticed that eza can now display total disk space used by directories!

I think this is pretty cool. I wanted it for a long time.

There are other ways to get the information of course. But having it integrated with all the other options for listing directories is fab. eza has features like --git-awareness, --tree display, clickable --hyperlink, filetype --icons and other display, permissions, dates, ownerships, and other stuff. being able to mash everything together in any arbitrary way which is useful is handy. And of course you can --sort=size

docs:

  --total-size               show the size of a directory as the size of all
                             files and directories inside (unix only)

It also (optionally) color codes the information. Values measures in kb, mb, and gb are clear. Here is a screenshot to show that:

eza --long -h --total-size --sort=oldest --no-permissions --no-user

Of course it take a little while to load large directories so you will not want to use by default.

Looks like it was first implemented Oct 2023 with some fixes since then. (Changelog). PR #533 - feat: added recursive directory parser with `--total-size` flag by Xemptuous

21
 
 

https://gitlab.com/christosangel/tui-mines

tui mines is evidently a text-based user interface implimentation of the classic mine sweeping puzzle game.

The user has to clear a board, square by square, flagging the squares suspected to hide mines on the way.

If the user opens a mine square, things go KABOOM! and the game is lost.

kaboom!

The user uses hints from the numbered squares. This numbers how many bombs are touching that square in every direction ( 8 in total).

Through logic, and a bit of luck, the player ends up clearing all the squares, while flagging all the mines.

22
 
 

https://github.com/dislux-hapfyl/pynksh

Writing functional shell snake code to improve my sanity.

23
 
 

Howdy Lemmy,

I'm announcing Rook v0.0.9, software that provides a secret service a-la secret-tool, keyring, or pass/gopass, except backed by a Keepass 4.x kdbx file.

The problem Rook solves is mainly in script automation, where you have aerc, offlineimap, isync, vdirsyncer, msmtp, restic, or any other cron jobs that need passwords and which are often configured to fetch these passwords from a secret service with a CLI tool. Unlike existing solutions, Rook is headless and does not have a bespoke secrets database, full of passwords that must be manually synchronized with Keepass; instead, it uses a Keepass db directly.

While the readme goes into more detail, I will say the motivation for Rook evolved from a desire to use a Keepass db in a GUI-less environment and finding no existing solutions. KeepassXC provides a secret service, but is not headless; it also provides a CLI tool, but this requires the db credentials on every call. kpmenu exists, but is designed specifically to require human interaction and is unsuitable for cron environment scripting. Every other solution maintains its own DB back end, incompatible with Keepass.

Rook also benefits from minimal external dependencies, and at 1kloc is auditable by developers - I believe even by ones who do not know Go (the language of implementation). Being able to verify for yourself that there's no malicious code is a critical trait for a tool with which you're trusting secrets.

Rook is fit for purpose, and signed binaries are provided as well as build-from-source instructions (for auditors).

The project contains work in progress: credentials are limited to simple password-locked kdbx, and so doesn't yet support key files. Bash scripts that provide autotyping and attribute/secret selection via rofi, fzf, and xdotool are provided, for GUI environments; these have known bugs. Rook has not been tested on BSD, Darwin, or any other system than Linux, but may well work; the main sticking point is the use of a local file socket for client/server communication, so POSIX systems should be fine, but still, YMMV.

As a final caveat: up until v0.0.9 I've been compressing with brotli, which is very nice yet somewhat obscure. With the next release, everything will be gzipped. Also included in the next release will be packages for various distributions.

24
 
 

Hello Lemmy,

invidtui is a TUI-based Invidious client, which can:

  • Search for and browse videos, playlists and channels
  • Play audio or video from any instance
  • View, open, edit and save m3u8 playlists
  • Download video/audio in any format
  • Authenticate with the preferred instance, and show user feed, playlists and subscriptions

This release contains the following new features/fixes:


Embedded Recommendations tab

Recommendations for the video that is currently being played is now shown in a separate tab within the queue.

A demo and instructions are posted here


YouTube timestamps

Timestamps found within Youtube URIs are now seeked to on playback.

A demo and instructions are posted here


Custom seeking

A separate modal is shown to modify the playback position. Positions can be seeked to relatively/absolutely.

A demo and instructions are posted here


I hope you enjoy this release, and any feedback is appreciated.

25
 
 

After an unexpected need to reset my work machine ๐Ÿ˜“, and needing to set up my development environment again by hand ๐Ÿ› ๏ธ, I decided to create a solution to quickly restore my local git repositories (and associated folder structure) ๐Ÿ”„.

I took this opportunity to write two bash scripts that clone and update all repositories on GitHub belonging to either a user or an organization ๐Ÿ“ฆ.

This means that, for example, with a single command โŒจ๏ธ, you can clone hundreds or thousands of repositories, with high levels of concurrency (50 clones in parallel is doable ๐Ÿ’จ).

The scripts allow for a configurable clone depth, a limit for the number of repositories cloned, and a level of concurrency that decides how many clones are run in parallel ๐Ÿ“ˆ.

By running the following command:

git-clone-all --owner f3rno64 --limit 200 --jobs 40 --dir ./f3rno64

I was able to clone all 174 personal repositories ๐Ÿ“š, with full commit histories and all tags & branches, in 58 seconds โฑ๏ธ.

I wrote a blog post describing this in more detail here ๐Ÿ“, check it out for a breakdown of the arguments and examples of usage.

The GitHub repository is f3rno64/mass-git-scripts and the README also includes examples and general usage instructions ๐Ÿ—‚๏ธ.

Please check it out and let me know what you think! ๐Ÿ’ฌ

I hope you find it useful, and any feedback or suggestions for improvement would be greatly appreciated! ๐Ÿ™

view more: next โ€บ