Getting Started
Installation
cURL
sh
curl -fsSL https://fns-cli.afonso.dev/install.sh | shgo install
sh
go install github.com/afonsodemori/fns-cli@latesthomebrew
sh
brew install --cask afonsodemori/tap/fns-cliDebian / Ubuntu
sh
# Import the key
curl -fsSL https://pkg.afonso.dev/afonso-dev.gpg \
| sudo tee /usr/share/keyrings/afonso-dev.gpg > /dev/null
# Add the repository
echo "deb [signed-by=/usr/share/keyrings/afonso-dev.gpg] https://pkg.afonso.dev/deb ./" \
| sudo tee /etc/apt/sources.list.d/afonso-dev.list
# Update and install
sudo apt-get update
sudo apt-get install fns-cliRedHat / Fedora / AlmaLinux
sh
sudo tee /etc/yum.repos.d/afonso-dev.repo <<EOF
[afonso-dev]
name=afonso.dev Package Repository
baseurl=https://pkg.afonso.dev/rpm
enabled=1
gpgcheck=1
gpgkey=https://pkg.afonso.dev/afonso-dev.asc
EOF
# Install
sudo dnf install -y fns-cliAlpine Linux
sh
# Download the key to /etc/apk/keys/
sudo wget -O /etc/apk/keys/afonso-dev.rsa.pub https://pkg.afonso.dev/afonso-dev.rsa.pub
# Add the repository
echo "https://pkg.afonso.dev/apk" | sudo tee -a /etc/apk/repositories
# Update and install
sudo apk update
sudo apk add --no-cache fns-cliConfiguration
Create a file at ~/.fns-cli/config. (Not autogenerated yet)
json
{
"gitlab": {
"api_base_url": "https://gitlab.com/api/v4",
"user_id": 1,
"token": "aHR0cHM6Ly95b3V0dS5iZS9vYXZNdFVXREJUTQ=="
},
"jira": {
"web_base_url": "https://company.atlassian.net",
"api_base_url": "https://company.atlassian.net/rest/api/3",
"token": "aHR0cHM6Ly95b3V0dS5iZS9vYXZNdFVXREJUTQ==",
"default_project_key": "FCLI"
},
"extras": []
}Extras
You can download and install extra scripts to be loaded on a new session starts.
When using gist or git types, also provide a token if they're secret/private.
GIST
- Create the token at https://github.com/settings/tokens/new
- Select the scope
gists: Create gists— There's no "Read-only" option 😕
GIT
- Create the token at https://github.com/settings/personal-access-tokens/new
- In "Repository access", select "Only select repositories", and select the repositories your token should give access to
- In "Permissions", click
+ Add permissionsand select "Content" - Keep it with "Read-only" access 🔒
json
{
"extras": [
{
"type": "gist",
"id": "5e13845bad38dbaa96a5a9e7c7011d1e"
},
{
"type": "git",
"url": "https://gitlab.com/afonsodemori/extra-scripts-and-configs.git",
"token": "aHR0cHM6Ly95b3V0dS5iZS9vYXZNdFVXREJUTQ=="
},
{
"type": "raw",
"url": "https://tmp.afonso.dev/raw/07Wnir"
}
]
}