forgejo-cli

Crates.ioforgejo-cli
lib.rsforgejo-cli
version
sourcesrc
created_at2024-08-08 01:53:21.522773
updated_at2024-12-12 19:55:49.716723
descriptionCLI tool for Forgejo
homepage
repositoryhttps://codeberg.org/Cyborus/forgejo-cli/
max_upload_size
id1328963
Cargo.toml error:TOML parse error at line 17, column 1 | 17 | autolib = false | ^^^^^^^ unknown field `autolib`, expected one of `name`, `version`, `edition`, `authors`, `description`, `readme`, `license`, `repository`, `homepage`, `documentation`, `build`, `resolver`, `links`, `default-run`, `default_dash_run`, `rust-version`, `rust_dash_version`, `rust_version`, `license-file`, `license_dash_file`, `license_file`, `licenseFile`, `license_capital_file`, `forced-target`, `forced_dash_target`, `autobins`, `autotests`, `autoexamples`, `autobenches`, `publish`, `metadata`, `keywords`, `categories`, `exclude`, `include`
size0
(Cyborus04)

documentation

README

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.

Commit count: 0

cargo fmt