fox

command module
v1.0.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 30, 2024 License: MIT Imports: 1 Imported by: 0

README

#+BEGIN_HTML
<p align="center"><img src="images/fox.gif" width="auto" height="100px" alt="fox"></p>

<h1 align="center">
    fox
    <p align="center"><img src="images/typing.svg" /></p>
</h1>

<p align="center">
  <a href="#-about">About</a> •
  <a href="#dependencies">Dependencies</a> •
  <a href="#-installation">Installation</a> •
  <a href="#-features">Features</a> •
  <a href="#how-to-install-packages">How to install packages</a> •
  <a href="#-todos">TODOs</a> •
  <a href="#-credits">Credits</a>
</p>

<p align="center">
    <a href="https://github.com/ricardofabila/fox/releases" target="_blank">
      <img src="https://img.shields.io/github/v/release/ricardofabila/fox?label=version">
    </a>
    <a href="https://www.youtube.com/watch?v=Cqd-_fHdTyA" target="_blank">
      <img src="https://img.shields.io/badge/Coffee%20cups%20drank-13-967259">
    </a>
    <a href="https://www.youtube.com/watch?v=-Yx_3DZrRg8" target="_blank">
      <img src="https://img.shields.io/github/go-mod/go-version/ricardofabila/fox">
    </a>
    <a href="https://github.com/ricardofabila/fox/blob/main/LICENSE" target="_blank">
      <img src="https://img.shields.io/github/license/ricardofabila/fox">
    </a>
</p>

</br>

#+END_HTML

#+BEGIN_QUOTE
“It's been a prevalent notion. Fallen sparks. Fragments of vessels broken at the Creation. And someday, somehow, before the end, a gathering back to home. A messenger from the Kingdom, arriving at the last moment. But I tell you there is no such message, no such home -- only the millions of last moments... nothing more. Our history is an aggregate of last moments.”

 ― Thomas Pynchon, Gravity's Rainbow
#+END_QUOTE

#+BEGIN_HTML
<p align="center">
    <img src="images/running.svg" />
</p>
#+END_HTML

-----

[[images/fox-demo.gif]]

** 📖 About

This tool helps you install packages from private (and public) GitHub repositories.

What does =🦊 fox= do?

- Makes is trivial to install a package form a GitHub repository even if it's private. Fox packages are just GitHub releases, as long as you have read access to a repo, you can install anything you want.
- Fox installs packages to a specific directory =/usr/local/bin/Fox/bin= (on macOS and linux systems). It won't install anything outside that directory.
- Trivially create your own packages. To add your repo to the available packages list, all you need to do is edit a *yaml* file. That's it!

-----

** 🤖 Installation:

This small section is meant to help you get started in no time. Getting started is as easy as 1, 2, 3.

1.) Just run:

#+BEGIN_SRC sh
sudo curl -fsSL "install.getfox.sh" | bash
#+END_SRC

Follow the on screen instructions to add =fox= to your /$PATH/.

2.) Install the official [[https://cli.github.com/][GitHub CLI]], if you don't already have it. Relax, you can run =fox gh= to install it 😉. Then run =gh auth=. To setup authentication. I recommend using adding ssh keys so you never have to use a password.

3.) That's it! That wasn't so bad, was it?

If you did everything correctly you can try running the following command:

This will check your environment for potential problems and possible enhancements:
#+BEGIN_SRC sh
fox doctor
#+END_SRC

-----

** Dependencies:

*** ⚓ Required

This tool is as zero-dependencies as it can possibly get.

- [[https://cli.github.com/][GitHub CLI]] to install packages. You can run =fox gh= to install it.

That's it. Seriously, you don't need to install anything more.

-----

** 🎉 Features

Basically I implemented all the basic commands that you use with other package managers.

#+BEGIN_SRC yaml
completion:    Generate the autocompletion script for the specified shell
config:        Display your fox configuration
doctor:        Check for common issues and recommendations with your fox
               configuration and overall environment.
help:          Help about any command
info:          Get info about a specific package
install:       Install a package
installed:     List the packages you have installed
list:          See the repositories available
repositories:  Print your repositories file
uninstall:     Remove packages from your system
update:        Update the available packages cache
upgrade:       Upgrade installed packages to the latest version
#+END_SRC

[[images/first.png]]

*** Multiplatform

Works for the major unix-like operative systems (macOS and linux).

/Note: Even though I can build a Windows executable, it wouldn't work. I'll add windows support (much) later./

*** Doctor

[[images/doctor.png]]

Use the built-in =doctor= command to check for problems as well as recommendations.

*** Autocompletion

Use the built-in =completion= command to generate auto-completions for various shells.

[[images/autocompletion.png]]

-----


**  How to install packages

Installing packages is super easy, just run:

#+BEGIN_SRC sh
fox install <package-name>
#+END_SRC

There is an official list of packages that you can find [[https://github.com/ricardofabila/fox-packages][here]]. If you have a public package that you want to share with the world, feel free to submit a PR for it. I will gladly add it to the list 😄. See the section below for more details.

*** How install almost anything with fox

Fox packages are just regular GitHub releases, you can install packages that are on GitHub but the author didn’t add it to a package manager**.
All without needed the package authors to even know that fox exists. As long as their releases follow a pattern that fox can understand
(which is the same pattern most package managers use), you should be able to do it (some exceptions apply).

We can use this repo I [[https://github.com/metadelta/mdlt][randomly found]] as an example:

#+BEGIN_SRC sh
fox add package --path "metadelta/mdlt" --type "binary" --executableName "mdlt"
#+END_SRC

And now you can do =fox update= and then a quick =fox install mdlt= and bam! You have it without the author needing to do anything.

You can learn more details [[https://www.getfox.sh/docs/adding_packages/install-a-public-package/][here]].

*** How to make my package installable with fox

You can follow the official docs [[https://www.getfox.sh/docs/adding_packages/introduction/][here]].

** 📓 TODOs

Homework for me 🤓

- ☐ GitLab support.
- ☐ Arbitrary repositories (eg. S3 buckets, your own server) support.
- ☐ Windows support.

**  💳 Credits

#+BEGIN_HTML
<p align="center">
  Made with ❤️ by
  <a href="https://github.com/ricardofabila" target="_blank">@ricardofabila</a>
  <br/>
  at <a href="https://bishopfox.com/" target="_blank">Bishop Fox</a>
</p>
#+END_HTML

*No foxes were harmed in the making of this package.

**I can't blame them, it is unnecessary difficult; specially for private repos. That's why I made =fox= in the first place. It was easier to create a new package manager that works on macOS and linux than to add my CLI tool to HomeBrew because it was a private repo.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
src

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL