Skip to content

is-it-ayush/fa

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

90 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

fa.

A password manager that lives in your "terminal".

# initialize fa.
fa init

# add
fa add [email protected] password # add a credential to the 'default' store.
fa add [email protected] password --store bingus_store #  add a credential to the 'bingus' store.
fa add isitayush secret --site isitayush.dev --tag personal # add a credential with an associated site and/or a tag.

# list
fa list # list all credentials for the default store.
fa list --store bingus_store # list all credentials on bingus store.

# search
fa search meo # search for all credentials beginning with 'meow' on 'default' store
fa search bingus --store bingus_store # search for all credentials beginning with 'bingus' on 'bingus_store'
fa search meo --filter site/isitayush.dev # search for all credentials that match both the 'meow' filter and site 'isitayush.dev' filter.
fa search '' --filter site/isitayush.dev # search for all credetentials that match 'isitayush.dev' site.
fa search '' --filter tag/personal # search for all credentials that match the tag 'personal'

# remove
fa remove [email protected] password # remove the credential from the store.

# store usage
fs store list # list all stores
fs store add spoingus_store # create a new store 'spoingus_store'.
fs store default spoingus_store # set the default store to 'spoingus_store'.
fs store remove spoingus_store # remove the spoingus store.

# export & import
fa import --csv-file ./mock/import/sample_data.csv # import credentails from sample_data.csv (the only required condition is that the csv must contain a username & a password column. it can also contain an optional url column. all other fields would be ignored)
fa export --csv-file ./mock/export/sample_export.csv # export credentials to sample_export.csv (this creates/overwrites the file for you).

# configuration
fa config # display the configuration utilized by 'fa'.

# other
fa store add -h # get help for a specific command
fa -V # print the version

installation.

  • you'll need a gpg key id/fingerprint. read this blog till step 4.
  • goto releases and download the latest version and extract the fa binary.
    • linux: put the binary in /usr/bin/ and run chmod +x /usr/bin/fa. i'm assuming /usr/bin is in your $HOME variable. you can now, run fa init on your terminal.
    • mac: put the binary inside the directory where you store your mac binaries (it has to be on path) and grant it perms to execute itself. i'm sorry, i don't own a mac so i don't know this one for sure.
    • windows: put it anywhere you like, copy it's location and add it to $PATH environment variable and then open command prompt/terminal & run fa init.

if possible! i'll make this easier for future releases.

configuration.

  • 'fa' after intialization, stores it's configuration at $HOME/.config/fa/config.toml.
# $HOME/.config/fa/config.toml
# this autogenerated when you run 'fa init'

[store]
base_path = "/home/ayush/personal/fa/allstores/"
default_store = "dibba"

[security]
gpg_fingerprint = "ABCDEF0123456789" # you can also use the full fingerprint

todo.

  • use thiserror and tidy up slightly.
  • better output and input
  • create, remove and default store command.
  • remove credential
  • import and export (from a csv file)
  • better internal data structure instead of Hashmap<K,V>. it might give me more ways to store more information. such as the
    • assocaited websites
    • tags?
    • post implementation note: Credential struct is meh but it works so i'm not complaining :3.
  • [ ] copy to clipboard ...i'd add this if i ever planned on making a tui. i don't really need this rn.
  • generator
  • better ci and possibly arm64/v8 build.

contributing.

you can always put up a pr solving any of the above todo's or anything that you think is mising. if i think it's good. i'll merge it! just don't make huge changes without creating a discussion first. also, it's nice if you follow conventional commits. it's not a requirement tho but it helps.

license.

it's MIT! if you still wanna read it checkout LICENSE.