Skip to content

Getting Started

Instalation

Via cURL:

sh
curl -sSL https://fns-cli.afonso.dev/install.sh | sh

Directly from GitHub, via go:

sh
go install github.com/afonsodemori/fns-cli@latest

Configuration

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

  1. Create the token at https://github.com/settings/tokens/new
  2. Select the scope gists: Create gists — There's no "Read-only" option 😕

GIT

  1. Create the token at https://github.com/settings/personal-access-tokens/new
  2. In "Repository access", select "Only select repositories", and select the repositories your token shoud give access to
  3. In "Permissions", click + Add permissions and select "Content"
  4. 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"
    }
  ]
}