summaryrefslogtreecommitdiffstats
path: root/README.md
diff options
context:
space:
mode:
authorCyborus <cyborus@cyborus.xyz>2024-04-18 20:11:31 +0200
committerCyborus <cyborus@cyborus.xyz>2024-04-18 20:11:31 +0200
commit6f8c924498e5b59c10b87a7b52ae66cb29ffc5a0 (patch)
treec2f8027d608a6b97277d4f9f4df7c9e555e52f3d /README.md
parentMerge pull request 'run ci build on tag rather than deploy' (#41) from tag-bu... (diff)
downloadforgejo-cli-6f8c924498e5b59c10b87a7b52ae66cb29ffc5a0.tar.xz
forgejo-cli-6f8c924498e5b59c10b87a7b52ae66cb29ffc5a0.zip
improve readme
Diffstat (limited to 'README.md')
-rw-r--r--README.md72
1 files changed, 71 insertions, 1 deletions
diff --git a/README.md b/README.md
index f211aba..ba5a71a 100644
--- a/README.md
+++ b/README.md
@@ -2,7 +2,77 @@
CLI tool for interacting with Forgejo
-# Licensing
+## Installation
+
+### Pre-built
+
+Pre-built binaries are available for x86 Windows and Linux (GNU) on the
+[releases tab](https://codeberg.org/Cyborus/forgejo-cli/releases/latest).
+
+### From source
+
+Install with `cargo install`
+
+```
+# Latest version
+cargo install --git https://codeberg.org/Cyborus/forgejo-cli.git --tag v0.0.3
+# From `main`
+cargo install --git https://codeberg.org/Cyborus/forgejo-cli.git --branch main
+```
+
+### 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.
+
+```bash
+# 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](LICENSE-APACHE) or [MIT License](LICENSE-MIT)