Skip to content

Getting Started

CleverNamesTaken edited this page Sep 9, 2025 · 2 revisions

Getting Started

Download or compile the ask binary.

wget https://github.com/CleverNamesTaken/Ask/releases/latest/download/ask_linux_x86_64.bin -O ~/.local/bin/ask

OR

git clone https://github.com/CleverNamesTaken/Ask.git
go build -o ~/.local/bin/ask

Write the config file

ask create conf

For solo play, just use the sqlite database. If you are collaborating with a team, you can use the mysql configuration after setting up your mysql database:

sudo apt install mariadb-server -y
systemctl start mysql
mysqladmin -u <MYSQL_USER> password '<YOUR_PASSWORD>'

Create the database schema

ask create db_schema

Usage

You should then be ready to create, render, edit and export your snippets.

  Ask (Aggregated Snippet Knowledgebase) by the OtherDave (https://github.com/clevernamestaken) is a CLI tool written in
  golang to save, edit, and share code snippets for terminal-based collaborative operations using databases and         
  structured TUI forms.                                                                                                 
                                                                                                                        
  EXAMPLES                                                                                                              
  ask create config                                                                                                     
      #Create the config file to start interacting with a database or create a new one                                  
                                                                                                                        
  ask create template                                                                                                   
      #Create an example snippet file                                                                                   
                                                                                                                        
  ask add example.txt                                                                                                   
      #Ingest the snippet file into the database                                                                        
                                                                                                                        
  ask cat example                                                                                                       
      #Look at the raw snippet text for the snippet named "example"                                                     
                                                                                                                        
  ask edit example                                                                                                      
      #Edit a snippet called "example"                                                                                  
                                                                                                                        
  ask ls                                                                                                                
      #Examine which snippets are in the database                                                                       
                                                                                                                        
  ask ls mple                                                                                                           
      #Examine which snippets in the database have a name containing the string "mple"                                  
                                                                                                                        
  ask render example                                                                                                    
      #Render the snippet named "example" to stdout after being prompted to fill out the variables                      
                                                                                                                        
  ask render text --all --outdir ./text_snippets                                                                        
      #Dump the entire database in text format to a directory called ./text_snippets                                    
                                                                                                                        
  ask render create zip --outfile archive.zip                                                                           
      #Create an archive of the database                                                                                
                                                                                                                        
  ask rm --prune                                                                                                        
      #Remove all of the outdated snippets from the database                                                            
                                                                                                                        
  ask  add archive.zip                                                                                                  
      #Add an archived zip to an existing database.                                                                     
                                                                                                                        
  ask console                                                                                                           
      #Start a metasploit-like console to search for and use snippets                                                   
                                                                                                                        
         
  USAGE  
         
    ask [command] [subcommand] [--flags]  
            
  COMMANDS  
            
    add                         Add new snippets to the database
    browse                      Browse snippets in the database. Aliased to 'ls'
    completion [command]        Generate the autocompletion script for the specified shell
    console                     Start the ask console
    create [command]            Create config file, snippet template files, zip archive or the database schema
    edit                        Edit an existing snippet
    help [command]              Help about any command
    remove [--flags]            Remove snippets from the database. Aliased to 'rm'
    render [command] [--flags]  Render snippets
    show                        Take a quick peek at a raw snippet, excluding the metadata. Aliased to 'cat'
         
  FLAGS  
         
    -c --config                 Config file (default is $HOME/.config/ask/config.yaml)
    -d --debug                  Enable debug output
    -h --help                   Help for ask
    -v --version                Version for ask

Clone this wiki locally