No description
Find a file
2024-09-05 18:22:55 +00:00
.woodpecker ci: --features flag, not --feature 2024-08-07 20:40:22 -04:00
src feat: automatically add ssh url as alias if it is different 2024-09-05 14:17:32 -04:00
.gitignore feat: add Nix flake 2024-08-10 12:01:07 +02:00
Cargo.lock Update Cargo.lock to openssl 0.10.66 2024-08-11 01:06:12 -06:00
Cargo.toml chore: bump version to 0.1.1 2024-08-09 14:55:43 -04:00
Dockerfile install certificates in Dockerfile 2023-12-17 22:31:36 -05:00
flake.lock feat: add Nix flake 2024-08-10 12:01:07 +02:00
flake.nix feat: add Nix flake 2024-08-10 12:01:07 +02:00
LICENSE-APACHE add licensing 2023-11-17 18:04:02 -05:00
LICENSE-MIT add licensing 2023-11-17 18:04:02 -05:00
README.md docs: add Nix instructions to README 2024-08-10 17:15:34 +02:00

forgejo-cli

CLI tool for interacting with Forgejo

Matrix Chat

Installation

Pre-built

Pre-built binaries are available for x86_64 Windows and Linux (GNU) on the releases tab.

From source

Install with cargo install

# Latest version
cargo install forgejo-cli
# From `main`
cargo install --git https://codeberg.org/Cyborus/forgejo-cli.git --branch main

Nix

A Nix flake is included in this repository that you may use. You could install it into your Nix profile, for example:

nix profile install git+https://codeberg.org/Cyborus/forgejo-cli

...or include it in the flake inputs of your NixOS system:

{
  inputs = {
    # ...
    forgejo-cli.url = "git+https://codeberg.org/Cyborus/forgejo-cli";
  };
  # ...
}

OCI Container

forgejo-cli is available as an OCI container for use in CI, at codeberg.org/cyborus/forgejo-cli:latest

Usage

Instance-specific aliases

While you can just use the fj binary directly, it can be useful to alias it with the --host flag set, to create shorthands for certain instances.

# For example, a `cb` command for interacting with codeberg
alias cb="fj --host codeberg.org"
# Or disroot
alias dr="fj --host git.disroot.org"
# Or any other instance you want!
# And the alias name can be whatever, as long as the `--host` flag is set.

Now, when you reference a repository such as forgejo/forgejo, it will implicitly get it from whichever alias you used!

$ cb repo info forgejo/forgejo
forgejo/forgejo
> Beyond coding. We forge.

Primary language is Go
# etc...

When using fj directly, you'd have to use a URL to access it.

$ fj repo info codeberg.org/forgejo/forgejo
forgejo/forgejo
> Beyond coding. We forge.

Primary language is Go
# etc...

# Notice the "dr", trying to access Disroot, still works when you specify Codeberg in the repository name!
$ dr repo info codeberg.org/forgejo/forgejo
forgejo/forgejo
> Beyond coding. We forge.

Primary language is Go
# etc...

Licensing

This project is licensed under either Apache License Version 2.0 or MIT License at your option.

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.