Skip to content
This repository has been archived by the owner on Aug 23, 2024. It is now read-only.

Commit

Permalink
Merge pull request #63 from xplshn/dev
Browse files Browse the repository at this point in the history
1.6.2 is out!
  • Loading branch information
xplshn committed May 11, 2024
2 parents a05324a + 22e6857 commit 6085240
Show file tree
Hide file tree
Showing 12 changed files with 1,330 additions and 98 deletions.
74 changes: 70 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,19 +23,85 @@ BigDL is a sophisticated, Golang-based rewrite of the original BDL, it is like a
### Usage

```
$ Usage: bigdl [-v,-h] {list|install|remove|update|run|info|search|tldr} [args...]
$ bigdl --help
Usage:
[-v|-h] [list|install|remove|update|run|info|search|tldr] <{args}>
Options:
-h, --help Show this help message
-v, --version Show the version number
Commands:
list List all available binaries
install, add Install a binary to $INSTALL_DIR
remove, del Remove a binary from the $INSTALL_DIR
update Update binaries, by checking their SHA against the repo's SHA
run Run a binary from cache
info Show information about a specific binary OR display installed binaries
search Search for a binary - (not all binaries have metadata. Use list to see all binaries)
tldr Show a brief description & usage examples for a given program/command. This is an alias equivalent to using "run" with "tlrc" as argument.
```

### Examples
```
bigdl search editor
bigdl install micro
bigdl install lux --fancy "%s was installed to $INSTALL_DIR." --newline
bigdl install bed --fancy --truncate "%s was installed to $INSTALL_DIR." --newline
bigdl install orbiton --truncate "installed Orbiton to $INSTALL_DIR."
bigdl remove bed
bigdl remove orbiton tgpt lux
bigdl info jq
bigdl tldr gum
bigdl run --verbose curl -qsfSL "https://raw.githubusercontent.com/xplshn/bigdl/master/stubdl" | sh -
bigdl run --silent elinks -no-home "https://fatbuffalo.neocities.org/def"
bigdl run --transparent --silent micro ~/.profile
bigdl run btop
```

#### What are these optional flags?
##### Flags that correspond to the `run` functionality
In the case of `--transparent`, it runs the program from $PATH and if it isn't available in the user's $PATH it will pull the binary from `bigdl`'s repos and run it from cache.
In the case of `--silent`, it simply hides the progressbar and all optional messages (warnings) that `bigdl` can show, as oppossed to `--verbose`, which will always report if the binary is found on cache + the return code of the binary to be ran if it differs from 0.
##### Flags that correspond to the `install` functionality
Install accepts three optional flags too. These affect the install message that will be displayed.
1. `"You can put a custom installation complete message just after the name of the binary, --newline will be assumed"`
2. `--fancy "This one allows exactly ONE formatting parameter (%s), which will be replaced with installation path, it MUST be used." --newline`
3. `--fancy --truncate "Same as before, but will be truncated once the text wraps around" --newline`
4. `--fancy "Text, but without the --newline, for some reason."`
5. `--truncate "This will truncate text when it overflows the terminal's size. --new-line is assumed."`
`--silent` will work the same as `run`'s `--silent` option
###### NOTE: I may remove this at some point and instead make the `install`/`add` functionality be able to install multiple binaries at the same time.
##### Arguments of `info`
When `info` is called with no arguments, it displays binaries which are part of the `list` and are also found on your `$INSTALL_DIR`. If `info` is called with a binary's name as argument, `info` will display as much information of it as is available. The "Size", "SHA256", "B3SUM" fields may not match your local installation.
###### Example:
```
$ bigdl info jq
Name: jq
Description: Command-line JSON processor
Repo: https://github.com/jqlang/jq
Updated: 2023-12-13T19:56:17Z
Version: jq-1.7.1
Size: 2.32 MB
Source: https://bin.ajam.dev/x86_64_Linux/jq
SHA256: 5942c9b0934e510ee61eb3e30273f1b3fe2590df93933a93d7c58b81d19c8ff5
B3SUM: f4f456f3a1a9a0dbcd9b0c2a77e29d14bc1f8bb036db4f6ff06d8c76a99e5ef2
```

## Getting Started

To begin using BigDL, simply download and install it on your Linux system. No additional setup is required.

###### Use without installing:
```
wget -qO- "https://raw.githubusercontent.com/xplshn/bigdl/master/stubdl" | sh -s -- --help
```
###### Install to `~/.local/bin`
```
wget -qO- "https://raw.githubusercontent.com/xplshn/bigdl/master/stubdl" | sh -s -- --install "$HOME/.local/bin/bigdl"
```

###### Example of one use case of bigdl | Inside of a SH script
Whenever you want to pull a specific GNU coreutil, insert a bash snippet, use a *fetch tool, etc, you can use bigdl for the job! There's also a `--transparent` flag for `run`, which will use the users' installed version of the program you want to run, and if it is not found in the `$PATH` bigdl will fetch it and run it from `/tmp/bigdl_cached`.
#### Example of one use case of bigdl | Inside of a SH script
Whenever you want to pull a specific GNU coreutil, busybox, toybox, etc, insert a bash snippet, use a *fetch tool, etc, you can use bigdl for the job! There's also a `--transparent` flag for `run`, which will use the users' installed version of the program you want to run, and if it is not found in the `$PATH` bigdl will fetch it and run it from `/tmp/bigdl_cached`.
```sh
system_info=$(wget -qO- "https://raw.githubusercontent.com/xplshn/bigdl/master/stubdl" | sh -s -- run --silent albafetch --no-logo - || curl -qsfSL "https://raw.githubusercontent.com/xplshn/bigdl/master/stubdl" | sh -s -- run --silent albafetch --no-logo -)
```
Expand Down
Loading

0 comments on commit 6085240

Please sign in to comment.